Firmware/STM32

stm32f103 Virtual COM port (USB CDC) / CAN bus

또난 2023. 3. 12. 18:14

시중에 돌아다니는 STM32 블루필이라는 아두이노 보드로 테스트..

 

1. Cube IDE에서 ST-link로 (가짜?라고) 실시간 디버깅이 안됨. hex 만들어 cube 프로그래머로 다운은 가능..      

     => keil 은 가짜도 다운 잘 되는 것 같음..밑에 keil버전.

SMT103.zip
0.66MB

# cmsis dap (open ocd)로는 디버깅 가능함.

https://luckydream.tistory.com/523

 

Cube IDE 에 OpenOCD 연결. / stm32 blue pill

Cube IDE에서 st-link로 실시간 디버깅시 ST MCU가 아니라고 하면서 정지됨. 정품 MCU 사용하면 되지만 시중(중국)에서 stm32f103 정품 부착된 제품 구하기가 쉽지 않음. st-link로 연결하는것은 불가능한것

luckydream.tistory.com

 

2. USB cdc 기능 그대로 하면 알수없는 장치라고 인식이 안되서 하기 링크보고 적용하면 동작됨.

https://github.com/philrawlings/bluepill-usb-cdc-test

 

GitHub - philrawlings/bluepill-usb-cdc-test: Basic test of USB Virtual COM port (USB Communications Device Class) - using STM32

Basic test of USB Virtual COM port (USB Communications Device Class) - using STM32 BluePill - GitHub - philrawlings/bluepill-usb-cdc-test: Basic test of USB Virtual COM port (USB Communications Dev...

github.com

 

3. CAN 만 활성화하면 USB 인식이 안되서 찾아보니...해당 MCU는 동시 사용 못함..ㅡㅡ;;

 

https://community.st.com/s/question/0D53W00000BJZd2SAH/stm32f103c8-usb-and-can-using-together-unrecognised-usb-problem

 

STM32f103C8 USB and CAN using together (Unrecognised USB problem)

 

community.st.com

 

결론은 USB CDC 로 CAN 로그 확인하려고 했는데, 실패함.

UART 포트로 CAN 로그 확인해야 함.

 

주말..반나절 날림..