I am trying to use the USB Device library on STM32Cube but when I execute using the debugger or that I try to turn an LED on in CDC_Receive_FS, it never reaches that point.
Here is how I set up everyting:
- My board is a NUCLEO-F746ZG
- I enabled USB_OTG_FS in
Device_Only
mode, activated_VBUS
and_SOF
. Left everything else by default andUSB On The Go FS global interrupt
is enabled! - I set up USB_DEVICE:
Class For FS IP
set toVirtual Port Com
, left everything by default - Main loop left empty
CDC_Receive_FS
: put breakpoint in it and/orHAL_GPIO_WritePin(LD1_GPIO_Port, LD1_Pin, GPIO_PIN_SET);
- I have TIM2 set up for the things I would like to do when it will work
Then I tried to send data to the board, first using Python using serial
with a baudrate of 921600 but got nothing. Then using PuTTY with a baudrate of 9600, still nothing...
If anyone has a clue, I have been struggling with it the whole day.
Here is the whole project: https://ecloud.global/s/cjGYqK6z9g58Lm4