This driver supports USB Full and Low speeds.
Hardware resource relating to driver instance is shown in the table below:
| Driver Instance | Hardware Resource |
|---|---|
| Driver_USBD0 | USB_OTG_FS |
Definitions used for compile-time configuration of this driver are shown in the table below:
| Definition | Default value | Max value | Description |
|---|---|---|---|
| USBD_MAX_ENDPOINT_NUM | 5 | 5 | Defines maximum number of IN/OUT Endpoint pairs that the driver will support with Control Endpoint 0 not included. This value impacts driver memory requirements. |
The USB Device driver requires:
These settings are relevant for this board, for different board please refer to the board schematic for proper configuration.
Link to B-U585I-IOT02A board schematic.
Required peripherals for the B-U585I-IOT02A board are listed in the table below:
| Peripheral | Mode | Description |
|---|---|---|
| USB_OTG_FS | Device_Only | USB Controller |
| PA11 | Alternate Function Push Pull | USB DM Pin |
| PA12 | Alternate Function Push Pull | USB DP Pin |
| Pin | Functionality |
|---|---|
| PA11 | USB_OTG_FS_DM |
| PA12 | USB_OTG_FS_DP |
Under Categories: Connectivity select USB_OTG_FS:
Mode:
Configuration:
| Pin Name | Signal on Pin | Pin Context.. | Pin Priv.. | GPIO output.. | GPIO mode | GPIO Pull-up/Pull.. | Maximum out.. | Fast Mode | User Label |
|---|---|---|---|---|---|---|---|---|---|
| PA11 | USB_OTG_FS_DM | n/a | n/a | n/a | Alternate Function Push Pull | No pull-up and no.. | High | n/a | USB.C_N |
| PA12 | USB_OTG_FS_DP | n/a | n/a | n/a | Alternate Function Push Pull | No pull-up and no.. | High | n/a | USB.C_P |
Under Categories: System Core select NVIC:
Configuration:
| NVIC Interrupt Table | Enabled | Preemption Priority | Sub Priority |
|---|---|---|---|
| USB OTG FS global interrupt | checked | 0 | 0 |
| Enabled interrupt table | Select for.. | Generate Enable in.. | Generate IRQ h.. | Call HAL handler |
|---|---|---|---|---|
| USB OTG FS global interrupt | unchecked | checked | unchecked | n/a |
Under Advanced Settings:
Generated Function Calls:
| Generate Code | Function Name | Peripheral Inst.. | Do not generate .. | Visibility (Static) |
|---|---|---|---|---|
| checked | MX_USB_OTG_FS_PCD_Init | USB_OTG_FS | unchecked | checked |
Generate source code by clicking on the GENERATE CODE button on the toolbar.