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_DRD_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 | 2 | 7 | 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. |
USBD_EP0_RX_BUF_KIND | 0 | 1 | Selects usage of double buffering for reception on Endpoint 0. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP0_RX_RAM_SIZE | 64 | 128 | Defines RAM size for reception on Endpoint 0. |
USBD_EP0_TX_BUF_KIND | 0 | 1 | Selects usage of double buffering for transmission on Endpoint 0. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP0_TX_RAM_SIZE | 64 | 128 | Defines RAM size for transmission on Endpoint 0. |
USBD_EP1_RX_BUF_KIND | 0 | 1 | Selects usage of double buffering for reception on Endpoint 1. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP1_RX_RAM_SIZE | 64 | 128 | Defines RAM size for reception on Endpoint 1. |
USBD_EP1_TX_BUF_KIND | 0 | 1 | Selects usage of double buffering for transmission on Endpoint 1. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP1_TX_RAM_SIZE | 64 | 128 | Defines RAM size for transmission on Endpoint 1. |
USBD_EP2_RX_BUF_KIND | 0 | 1 | Selects usage of double buffering for reception on Endpoint 2. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP2_RX_RAM_SIZE | 64 | 128 | Defines RAM size for reception on Endpoint 2. |
USBD_EP2_TX_BUF_KIND | 0 | 1 | Selects usage of double buffering for transmission on Endpoint 2. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP2_TX_RAM_SIZE | 64 | 128 | Defines RAM size for transmission on Endpoint 2. |
USBD_EP3_RX_BUF_KIND | 0 | 1 | Selects usage of double buffering for reception on Endpoint 3. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP3_RX_RAM_SIZE | 64 | 128 | Defines RAM size for reception on Endpoint 3. |
USBD_EP3_TX_BUF_KIND | 0 | 1 | Selects usage of double buffering for transmission on Endpoint 3. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP3_TX_RAM_SIZE | 64 | 128 | Defines RAM size for transmission on Endpoint 3. |
USBD_EP4_RX_BUF_KIND | 0 | 1 | Selects usage of double buffering for reception on Endpoint 4. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP4_RX_RAM_SIZE | 64 | 128 | Defines RAM size for reception on Endpoint 4. |
USBD_EP4_TX_BUF_KIND | 0 | 1 | Selects usage of double buffering for transmission on Endpoint 4. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP4_TX_RAM_SIZE | 64 | 128 | Defines RAM size for transmission on Endpoint 4. |
USBD_EP5_RX_BUF_KIND | 0 | 1 | Selects usage of double buffering for reception on Endpoint 5. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP5_RX_RAM_SIZE | 64 | 128 | Defines RAM size for reception on Endpoint 5. |
USBD_EP5_TX_BUF_KIND | 0 | 1 | Selects usage of double buffering for transmission on Endpoint 5. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP5_TX_RAM_SIZE | 64 | 128 | Defines RAM size for transmission on Endpoint 5. |
USBD_EP6_RX_BUF_KIND | 0 | 1 | Selects usage of double buffering for reception on Endpoint 6. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP6_RX_RAM_SIZE | 64 | 128 | Defines RAM size for reception on Endpoint 6. |
USBD_EP6_TX_BUF_KIND | 0 | 1 | Selects usage of double buffering for transmission on Endpoint 6. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP6_TX_RAM_SIZE | 64 | 128 | Defines RAM size for transmission on Endpoint 6. |
USBD_EP7_RX_BUF_KIND | 0 | 1 | Selects usage of double buffering for reception on Endpoint 7. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP7_RX_RAM_SIZE | 64 | 128 | Defines RAM size for reception on Endpoint 7. |
USBD_EP7_TX_BUF_KIND | 0 | 1 | Selects usage of double buffering for transmission on Endpoint 7. Value 0 = do not use double buffering, 1 = use double buffering. |
USBD_EP7_TX_RAM_SIZE | 64 | 128 | Defines RAM size for transmission on Endpoint 7. |
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 NUCLEO-H563ZI board schematic.
Required peripherals for the NUCLEO-H563ZI board are listed in the table below:
Peripheral | Mode | Description |
---|---|---|
USB | Device_Only | USB Controller |
PA11 | Alternate Function Push Pull | USB DM Pin |
PA12 | Alternate Function Push Pull | USB DP Pin |
Pin | Functionality |
---|---|
PA11 | USB_DM |
PA12 | USB_DP |
Under Categories: Connectivity select USB:
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_DM | n/a | n/a | n/a | Alternate Function Push Pull | No pull-up and no.. | High | n/a | USB_FS_N |
PA12 | USB_DP | n/a | n/a | n/a | Alternate Function Push Pull | No pull-up and no.. | High | n/a | USB_FS_P |
Under Categories: System Core select NVIC:
Configuration:
NVIC Interrupt Table | Enabled | Preemption Priority | Sub Priority |
---|---|---|---|
USB FS global interrupt | checked | 0 | 0 |
Enabled interrupt table | Select for.. | Generate Enable in.. | Generate IRQ h.. | Call HAL handler |
---|---|---|---|---|
USB FS global interrupt | unchecked | checked | checked | checked |
Under Advanced Settings:
Generated Function Calls:
Generate Code | Function Name | Peripheral Inst.. | Do not generate .. | Visibility (Static) |
---|---|---|---|---|
checked | MX_USB_PCD_Init | USB | unchecked | checked |
Generate source code by clicking on the GENERATE CODE button on the toolbar.