I have a small project running with an F303xC which connects to USB just fine, with an external 1.5k resistor on the DP line and a disconnect-macro which pulls the pin low:
Code: Select all
#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL))
#define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14)))
I now switched the controller to a F303xE, which is a version with larger flash. This controller runs into an exception in the USB code and freezes during the initialization. Somewhat unusually this minor flash change is accompanied by some other differences which are hard to find since ST does not provide a list, but I found out that the USB is not an alternate function on these parts, but an additional function. Difference seems to be that the additional function is switched by the peripheral itself and one does not need the pins in alternate but in input mode. Now, when I change the alternate to input mode the exception disappears, but the enumeration fails, windows won't recognize the device.
Has anyone used the USB peripheral with these specific devices (e.g. on the F303 Nucleo) and knows how to adapt the code?
Thanks in advance,
Thomas