embeded/Cortex-M3 STM2025. 11. 22. 19:40

단순하게 전원만 연결되는줄 알았는데

윈도우에서는 잘못된 장치라고 떠서, 리눅스에서 확인

 

boot0 - 0  / boot1 - 0 에 usb 연결

[   50.788963] usb 1-1.1: new full-speed USB device number 4 using ehci-pci
[   50.853992] usb 1-1.1: device descriptor read/64, error -32
[   51.023960] usb 1-1.1: device descriptor read/64, error -32
[   51.196938] usb 1-1.1: new full-speed USB device number 5 using ehci-pci
[   51.261946] usb 1-1.1: device descriptor read/64, error -32
[   51.429943] usb 1-1.1: device descriptor read/64, error -32
[   51.533019] usb 1-1-port1: attempt power cycle
[   52.113007] usb 1-1.1: new full-speed USB device number 6 using ehci-pci
[   52.524932] usb 1-1.1: device not accepting address 6, error -32
[   52.589928] usb 1-1.1: new full-speed USB device number 7 using ehci-pci
[   53.004924] usb 1-1.1: device not accepting address 7, error -32
[   53.005142] usb 1-1-port1: unable to enumerate USB device

 

boot0 - 1 / boot1 - 0에 usb 연결. 차이는 없다.

[  225.014866] usb 1-1.1: new full-speed USB device number 8 using ehci-pci
[  225.079866] usb 1-1.1: device descriptor read/64, error -32
[  225.253817] usb 1-1.1: device descriptor read/64, error -32
[  225.420787] usb 1-1.1: new full-speed USB device number 9 using ehci-pci
[  225.485801] usb 1-1.1: device descriptor read/64, error -32
[  225.654762] usb 1-1.1: device descriptor read/64, error -32
[  225.756872] usb 1-1-port1: attempt power cycle
[  226.337664] usb 1-1.1: new full-speed USB device number 10 using ehci-pci
[  226.756996] usb 1-1.1: device not accepting address 10, error -32
[  226.820602] usb 1-1.1: new full-speed USB device number 11 using ehci-pci
[  227.236577] usb 1-1.1: device not accepting address 11, error -32
[  227.236751] usb 1-1-port1: unable to enumerate USB device

 

 

일단 PA9이 USART1_TX / PA10이 USART1_RX니까 USB TTL을 이용해서 적당히 연결해줘본다.

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

 

USB TTL이 /dev/ttyUSB0으로 인식해서 설정하고 읽어보면 잘 읽힌다.

$ stm32flash /dev/ttyUSB0
stm32flash 0.5

http://stm32flash.sourceforge.net/

Interface serial_posix: 57600 8E1
Warning: the interface was not closed properly.
Version      : 0x30
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0410 (STM32F10xxx Medium-density)
- RAM        : Up to 20KiB  (512b reserved by bootloader)
- Flash      : Up to 128KiB (size first sector: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB

 

프로그램이 없어서 그런가 boot0 - 0, boot1 - 0 으로 되어있어도 내부 부트로더가 작동한다.

[링크 : https://eteo.tistory.com/417]

 

무언가 구으면 boot0 - 1, boot1 - 0 으로 하고 리셋눌러줘야 stm32flash에 응답한다.

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

stm32f103c8t6 blue pill board  (0) 2025.11.22
stm32f103 dfu (Device Firmware Upgrade)  (0) 2025.11.19
stn32f103 usb cdc(communication device class)  (0) 2025.11.19
stm32f103 도착  (0) 2025.11.19
stm32 adc + dma.. part 2?  (0) 2025.10.29
Posted by 구차니