STM32GENERIC icon indicating copy to clipboard operation
STM32GENERIC copied to clipboard

USB doesnt work for STM32F3xx

Open Hoel opened this issue 8 years ago • 1 comments

Hi, i made a target folder for STM32F303CCT6 based on the indications so using a USB VCP STM32CubeMx project, in variant.c i used the clock configuration from the STM32CubeMX project, i also added usbd_conf_F3.c in the core USB folder (taken from the working STM32CubeMX project).

When i test with blink example If i set USB : Serial (Virtual COM port) the board stalls at runtime, if i set USB : disabled, it blinks as it should, what could be the problem? variant.c.zip usbd_conf_F3.c.zip

Hoel avatar Dec 16 '17 03:12 Hoel

I got it working here: https://github.com/arpruss/STM32GENERIC The trick was to drop in the usbd_conf_F3.c file and add this to the USBDevice.cpp:

//F3 extern "C" void USB_LP_CAN_RX0_IRQHandler(void) { HAL_PCD_IRQHandler(&hpcd_USB_FS); }

arpruss avatar May 16 '18 14:05 arpruss