2024-09-20 12:14 AM
Hi,
I am working on USB CDC on STM32F469NI. For USB_OTG_FS and USB_OTG_HS, the auto generated USB handles are
Is there any macro in HAL or while auto generation, that I can get to know which of the USB_OTG_xx is being used, so that I can extern the proper variable into my firmware?
Thanks,
Himanshu
2024-09-20 02:14 AM
You can define your own macros, PCD Speed is defined in HAL and you should select one of these predefined constants:
#define PCD_SPEED_HIGH USBD_HS_SPEED
#define PCD_SPEED_HIGH_IN_FULL USBD_HSINFS_SPEED
#define PCD_SPEED_FULL USBD_FS_SPEED
Using CubeMX you can select which instance to be used.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-09-20 06:43 AM
There isn't a macro, but the choice is based on the peripheral you've configured in CubeMX. It shouldn't be a mystery. Similar to if you used I2C1 or I2C2.