embeded/Cortex-M3 STM2025. 11. 19. 19:39

간단하게.. ft232 같은 것 없어도 usb를 통해서 바로 통신이 가능한 com 포트를 생성해주는 기능

cubeIDE에서 따라해봐야겠다.

[링크 : https://jeonhj.tistory.com/m/29]

 

 

 

PA11 / PA12가 CAN or USB 포트로 사용을 해야 하는것 같군..

[링크 : https://www.st.com/resource/en/datasheet/stm32f103c8.pdf]

[링크 : https://www.st.com/en/microcontrollers-microprocessors/stm32f103c8.html]

 

 

뚫어져라 보니

B7 / A6 + B8 으로 연결되어서 쭈욱 따라가니 A11 / A12로 연결된 듯.

[링크 : https://electronics.stackexchange.com/questions/610007/how-to-wire-usb-c-connector]

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32f103 usb c 연결 + usb ttl 연결  (0) 2025.11.22
stm32f103 dfu (Device Firmware Upgrade)  (0) 2025.11.19
stm32f103 도착  (0) 2025.11.19
stm32 adc + dma.. part 2?  (0) 2025.10.29
stm32 부트로더로 부팅 전환하기  (0) 2025.10.21
Posted by 구차니
embeded/Cortex-M3 STM2025. 11. 19. 19:26

micro USB인줄 알았는데 usb c로 왔다 -ㅁ-!

[링크 : http://mitem.auction.co.kr/vip?itemNo=F241860522] 2,970 * 2 + 3000

 

상면에는 리셋, BOOT0/BOOT1 핀을 위한 점퍼

STM32F103C8T6 MCU

8MHz / 32.768kHz 클럭

 

U1 - LDO LB2K 3.3V 500mA 인듯한데.. ams1117 같은 레귤레이터도 비싸다고 이런걸 넣은건가?

[링크 : https://www.alibaba.com/product-detail/Hainayu-Electronic-chip-SOT-23-5_1601244058700.html]

 

 

 

BOOT0 - 1

BOOT1 - 0 으로 점퍼를 셋팅하고 A9 / A10을 시리얼로 연결하면 stm32flash 등으로 올릴수있나 보다.

[링크 : https://medium.com/@paramaggarwal/programming-an-stm32f103-board-using-usb-port-blue-pill-953cec0dbc86]

 

 

USB는 전원공급전용인가?

[링크 : https://ko.aliexpress.com/item/1005009880645839.html]

RT9193-33GB  3.3V 300MA SOT23-5

[링크 : https://www.eleparts.co.kr/goods/view?no=210486]

Posted by 구차니
embeded/esp322025. 11. 18. 18:58

esp32 s3나 esp32나 비슷하고

esp8266과 esp32 c3(risc v) 비슷하다

 

esp8266이 l106

esp32 가 lx6

esp32-s2 s3가 lx7

esp32 c 는 risc-v 인데

[링크 : https://www.reddit.com/r/esp32/comments/wfiije/has_anyone_done_any_benchmarking_o f_the_esp32_vs/]

 

simd는 있으나 컴파일러에는 통합 안 되었고 deep learning 으로 가속 가능한 듯

[링크 : https://github.com/espressif/esp-dl]

 

esp32-s2/3에서는 어떻게 쓸수는 있는데 eps32 에는 simd가 없나?

[링크 : https://github.com/espressif/esp-dsp]

[링크 : https://www.reddit.com/r/esp32/comments/1hm91t0/simd_instructions_on_the_s3_are_fast/]

 

arm에서는 neon 혹은 sve 라고 하는데

esp 에서는 PIE 표기한다. 명령어 확장이 맞긴 한디... 흐음...

4.1.1.2 Processor Instruction Extensions (PIE)
ESP32-S3 contains a series of new extended instruction set in order to improve the operation efficiency of
specific AI and DSP (Digital Signal Processing) algorithms.
Feature List
• 128-bit new general-purpose registers
128-bit vector operations, e.g., complex multiplication, addition, subtraction, multiplication, shifting, comparison, etc
• Data handling instructions and load/store operation instructions combined
• Non-aligned 128-bit vector data
• Saturation operation

[링크 : https://documentation.espressif.com/esp32-s3_datasheet_en.pdf]

 

The PIE (Processor Instruction Extensions) has the following features:
• 128-bit general-purpose registers
• 128-bit vector operations, e.g., multiplication, addition, subtraction, accumulation, shifting, comparison,etc.
• Integration of data transfer into arithmetic instructions
• Support for non-aligned 128-bit vector data
• Support for saturation operation

[링크 : https://documentation.espressif.com/esp32-s3_technical_reference_manual_en.pdf#pie]

'embeded > esp32' 카테고리의 다른 글

esp32 lvgl  (0) 2025.11.15
esp32 계열 정리  (0) 2025.07.08
esp32devkitc v4  (0) 2025.01.06
esp32cam sdio wifi  (0) 2024.09.11
esp32 wifi/bt on linux  (0) 2024.08.13
Posted by 구차니
embeded/esp322025. 11. 15. 19:40

당근보다가 신기한 보드가 있어 찾아보는데.

 

오피셜하게 보이는건 esp32-s3 계열 같은데

[링크 : https://lvgl.io/boards]

[링크 : https://docs.lvgl.io/8.0/get-started/espressif.html]

 

[링크 : https://github.com/lvgl/lv_port_esp32]

[링크 : https://github.com/lvgl/lvgl_esp32_drivers]

 

1.5만에 팔아서 검색해보다

조금 싸긴 한데.. esp-wroom-32 기반이라 esp32-s3는 아닌것 같고..

[링크 : https://itempage3.auction.co.kr/DetailView.aspx?itemno=E586493868]

[링크 : https://ko.aliexpress.com/item/1005006284154750.html]

 

어떤걸 사야 되는걸까?

 

스펙상으로는 SPI 채널을 제외하면 크게 차이가 없어 보이는데...

일단 고속(?) UI를 위한거니까 SPI 외에는 내부 cpu 성능으로 하는거라면 머...

esp32-s3 32-bit MCU & 2.4 GHz Wi-Fi & Bluetooth 5 (LE)
Xtensa® 32-bit LX7 dual-core processor that operates at up to 240 MHz
512 KB of SRAM and 384 KB of ROM on the chip, and SPIDual SPIQuad SPIOctal SPI, QPI, and OPI interfaces that allow connection to flash and external RAM
Additional support for vector instructions in the MCU, which provides acceleration for neural network computing and signal processing workloads
Peripherals include 45 programmable GPIOs, SPI, I2S, I2C, PWM, RMT, ADC, DAC and UART, SD/MMC host and TWAI™
Reliable security features ensured by RSA-based secure boot, AES-XTS-based flash encryption, the innovative digital signature and the HMAC peripheral, “World Controller”
Fully certified with integrated antenna and software stacks
esp32 32-bit MCU & 2.4 GHz Wi-Fi & Bluetooth/Bluetooth LE
ESP32 embedded, two or one Xtensa® 32-bit LX6 microprocessor(s) with adjustable clock frequency, ranging from 80 MHz to 240 MHz
+19.5 dBm output power ensures a good physical range
Classic Bluetooth for legacy connections, also supporting L2CAP, SDP, GAP, SMP, AVDTP, AVCTP, A2DP (SNK) and AVRCP (CT)
Support for Bluetooth Low Energy (Bluetooth LE) profiles including L2CAP, GAP, GATT, SMP, and GATT-based profiles like BluFi, SPP-like, etc
Bluetooth Low Energy (Bluetooth LE) connects to smart phones, broadcasting low-energy beacons for easy detection
Sleep current is less than 5 μA, making it suitable for battery-powered and wearable-electronics applications
Peripherals include capacitive touch sensors, Hall sensor, SD card interface, Ethernet, high-speed SPI, UART, I2S and I2C
Fully certified with integrated antenna and software stacks

[링크 : https://www.espressif.com/en/products/modules]

'embeded > esp32' 카테고리의 다른 글

esp32 benchmark  (0) 2025.11.18
esp32 계열 정리  (0) 2025.07.08
esp32devkitc v4  (0) 2025.01.06
esp32cam sdio wifi  (0) 2024.09.11
esp32 wifi/bt on linux  (0) 2024.08.13
Posted by 구차니
embeded/Cortex-M4 STM2025. 11. 3. 15:24

g 시리즈는 f 시리즈보다 먼가 옵션이 많네..

 

stm32f103은 아래처럼 좀 조촐하다.

 

----

clock prescaler. sync와 async의 차이는 좀 찾아봐야 할 듯.

sync는 1/1~4 async는 1/1~256 까지 된다.

 

f103에서는 adc가 별도 클럭으로 설정이 가능했는데 

 

g473 에서는 SYSCLK로 고정되어 있는것 같고, 별도로 클럭 디바이더를 지정해 주어야 한다.

어떤 의미로는 퇴화이려나?

 

resolution. 신기한디.. 하드웨어적으로 고정된게 아니라니?

아니면 12bit 해상도인데 줄때 줄여서 주나?(LSB 날리기!)

 

scan mode. 멀 잘못횄나 왜 enabled가 없어?

 

여러채널 읽어봐야하나.. 아무튼 single / seqeunce conversion 별로 end를 보낼지 결정

 

DMA 사용하도록 되어있지 않으면 Enabled를 비활성화 된다.

 

overrun은 머지.. 멀티채널에서의 작동이려나? 

'embeded > Cortex-M4 STM' 카테고리의 다른 글

stm32g4 cordic fmac  (0) 2025.11.28
STM32CubeProgrammer / uart / parity  (0) 2025.11.28
stm32flash 0.5 0.7 버전과 stm32g473  (0) 2025.11.28
stm32g473 ADC calibration  (0) 2025.11.28
stm32f411 black fill board  (0) 2025.11.22
Posted by 구차니
embeded/Cortex-M3 STM2025. 10. 29. 14:45

cluade.ai의 도움으로 해결 -_-

아무튼,  값이 밀리는 것 처럼 보였던 이유는 dma를 circular로 하지 않아서 수동으로 시작했고, 첫 adc는 버려야 하는데

버리니까 두번째 들어오지 않는 문제 발생. 그래서 매번 dma_start를 해줘서 문제가 되었던 듯 하다.

 

ADC_Settings 에서 Continuous Conversion Mode 를 Disable -> Enable

 

DMA는 Mode Normal 에서 Circular로 해주면 끝

 

NVIC는 DMA1만 인터럽트 활성화 해주면 된다.

 

코드에서는 main() 에서 while() 들어가기 전에

HAL_ADC_Start_DMA() 한번 호출해주고 그 이후로는

adc callback 에서 다 받아왔을 때 값을 옮겨주고 처리루틴 부르면 끝

void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
{
  if(hadc->Instance == ADC1)
  {
//    memcpy(ADCRaw, ADCResult, sizeof(uint16_t) * 4);
//    adc_dma_flag = 2;
  }
}

 

2024.11.04 - [embeded/Cortex-M3 STM] - stm32f103 adc + dma

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stn32f103 usb cdc(communication device class)  (0) 2025.11.19
stm32f103 도착  (0) 2025.11.19
stm32 부트로더로 부팅 전환하기  (0) 2025.10.21
EEPROM emulation for stm32  (0) 2025.10.16
stm32 cpp  (0) 2025.08.08
Posted by 구차니
embeded/전자회로2025. 10. 22. 14:11

싸니 한번 사서 가지고 놀아볼까?

 

[링크 : https://m.blog.naver.com/emperonics/222108739792]

[링크 : https://itempage3.auction.co.kr/DetailView.aspx?itemno=E793636330] 590원

'embeded > 전자회로' 카테고리의 다른 글

스위칭 파워(스텝다운 컨버터) MP1584 사용  (0) 2025.10.18
스위칭 파워  (0) 2025.10.11
아 어쩐지 부품이 두개더라 -_-?  (0) 2025.10.08
1.8인치 TFT SPI 128x160  (0) 2025.10.07
열전대 써모커플러  (0) 2025.07.17
Posted by 구차니
embeded/Cortex-M3 STM2025. 10. 21. 18:21

stm32 시리즈 마다 달라서  boot_addr를 확인해야 하지만

아무튼 아래와 같이 작성된 코드를 호출하면 boot0 쇼트한것 처럼 부트로더가 시작된다고 한다.

/* USER CODE BEGIN 4 */
#define BOOT_ADDR 0x1FFFF000 // my MCU boot code base address
#define MCU_IRQS 70u // no. of NVIC IRQ inputs

struct boot_vectable_ {
    uint32_t Initial_SP;
    void (*Reset_Handler)(void);
};

#define BOOTVTAB ((struct boot_vectable_ *)BOOT_ADDR)

void JumpToBootloader(void)
{
/* Disable all interrupts */
__disable_irq();

/* Disable Systick timer */
SysTick->CTRL = 0;

/* Set the clock to the default state */
HAL_RCC_DeInit();

/* Clear Interrupt Enable Register & Interrupt Pending Register */
for (uint8_t i = 0; i < (MCU_IRQS + 31u) / 32; i++)
{
NVIC->ICER[i]=0xFFFFFFFF;
NVIC->ICPR[i]=0xFFFFFFFF;
}

/* Re-enable all interrupts */
__enable_irq();

// Set the MSP
__set_MSP(BOOTVTAB->Initial_SP);

// Jump to app firmware
BOOTVTAB->Reset_Handler();
}

/* USER CODE END 4 */

[링크 : https://community.st.com/t5/stm32-mcus/how-to-jump-to-system-bootloader-from-application-code-on-stm32/ta-p/49424]

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32f103 도착  (0) 2025.11.19
stm32 adc + dma.. part 2?  (0) 2025.10.29
EEPROM emulation for stm32  (0) 2025.10.16
stm32 cpp  (0) 2025.08.08
stm32 eeprom emulation  (0) 2025.07.29
Posted by 구차니
embeded/전자회로2025. 10. 18. 16:43

언제 샀는지도 기억안나는 부품..(!!)

언제나의 습관대로 2개씩 구매해놔서 한번 배터리 터질 각오로 시도

PCB에도 칩에도 MP1584라고 써있다.


배터리 쪽은 만충이라 8.0V

 

원래있던 셋팅(?) 으로는 7.7V가 나오고 있다. 전압이 올라가면 달라지려나?

 

암튼 올바른 위치(?)의 + 에서 약간 돌리고 나서

 

5.3V 정도로 나온다.

 

18650 2개짜리 홀더가 있으니, 3.7*2 = 7.4V 를 입력받아 서보모터를 돌리는게 목적인데

2A까진 히트싱크 없어도 되지만 3A는 있어야 한다고. 흐음.. 그럼 없어도 될 듯

[링크 : https://www.coupang.com/vp/products/298245200?itemId=939169411]

'embeded > 전자회로' 카테고리의 다른 글

로터리 엔코더  (0) 2025.10.22
스위칭 파워  (0) 2025.10.11
아 어쩐지 부품이 두개더라 -_-?  (0) 2025.10.08
1.8인치 TFT SPI 128x160  (0) 2025.10.07
열전대 써모커플러  (0) 2025.07.17
Posted by 구차니
embeded/Cortex-M3 STM2025. 10. 16. 18:29

stm32용 eeprom 에뮬레이션 패키지.

cube ide에서 packs 에서 설치가 될 줄 알았는데 없고, 수동으로 풀어서 넣어주어야 한다.

 

[링크 : https://community.st.com/t5/stm32cubemx-mcus/how-to-install-x-cube-eeprom-on-stm32cube/td-p/78773]

[링크 : https://community.st.com/t5/stm32cubemx-mcus/how-can-i-install-and-use-x-cube-eeprom-middleware-in/m-p/122931]

 

받고, 풀고

[링크 : https://www.st.com/en/embedded-software/x-cube-eeprom.html#tools-software]

 

적당히 때려넣어주면 끝

[링크 : https://blog.naver.com/chcbaram/223153496808]

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32 adc + dma.. part 2?  (0) 2025.10.29
stm32 부트로더로 부팅 전환하기  (0) 2025.10.21
stm32 cpp  (0) 2025.08.08
stm32 eeprom emulation  (0) 2025.07.29
stm32f103ret flash program / erase 테스트  (0) 2025.07.28
Posted by 구차니