Skip to content
Snippets Groups Projects
Commit 7b452e74 authored by Damien George's avatar Damien George
Browse files

stm32/usbd_conf: Allocate enough space in USB HS TX FIFO for CDC packet.

The CDC maximum packet size is 512 bytes, or 128 32-bit words, and the TX
FIFO must be configured to have at least this size.
parent 5f92756c
No related branches found
No related tags found
No related merge requests found
...@@ -456,13 +456,13 @@ USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev, int high_speed) { ...@@ -456,13 +456,13 @@ USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev, int high_speed) {
HAL_PCD_Init(&pcd_hs_handle); HAL_PCD_Init(&pcd_hs_handle);
// We have 1024 32-bit words in total to use here // We have 1024 32-bit words in total to use here
HAL_PCD_SetRxFiFo(&pcd_hs_handle, 512); HAL_PCD_SetRxFiFo(&pcd_hs_handle, 464);
HAL_PCD_SetTxFiFo(&pcd_hs_handle, 0, 32); // EP0 HAL_PCD_SetTxFiFo(&pcd_hs_handle, 0, 32); // EP0
HAL_PCD_SetTxFiFo(&pcd_hs_handle, 1, 256); // MSC / HID HAL_PCD_SetTxFiFo(&pcd_hs_handle, 1, 256); // MSC / HID
HAL_PCD_SetTxFiFo(&pcd_hs_handle, 2, 32); // CDC CMD HAL_PCD_SetTxFiFo(&pcd_hs_handle, 2, 8); // CDC CMD
HAL_PCD_SetTxFiFo(&pcd_hs_handle, 3, 64); // CDC DATA HAL_PCD_SetTxFiFo(&pcd_hs_handle, 3, 128); // CDC DATA
HAL_PCD_SetTxFiFo(&pcd_hs_handle, 4, 32); // CDC2 CMD HAL_PCD_SetTxFiFo(&pcd_hs_handle, 4, 8); // CDC2 CMD
HAL_PCD_SetTxFiFo(&pcd_hs_handle, 5, 64); // CDC2 DATA HAL_PCD_SetTxFiFo(&pcd_hs_handle, 5, 128); // CDC2 DATA
#else // !MICROPY_HW_USB_HS_IN_FS #else // !MICROPY_HW_USB_HS_IN_FS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment