2021-06-21 01:27 AM
I am trying to make composit USB example with MSC and 2 CDC.
Can anyone suggest if its possible with STM32F767VIHx ?
I am using FreeRTOS as well.
I have already started to 5 interface but they seems to be not reliable. I can send messages from one port to another but can not send from freertos task directly.
I can loop back from CDC to Another but CDC_Transmit_FS not working from FreeRTOS task.
I have only one task running and USB interrupt priority is set to 7.
If anyone have the same issue, please let me knew.
2021-06-21 03:32 AM
The number of endpoints depends on whether you are using OTG_FS or OTG_HS (regardless of the actual PHY/speed used).
JW
2021-06-21 06:05 PM
I have configured the application as MSC+ 2 CDC, so it uses total 5 IN end points and 3 OUT end points.
It populate correctly on windows and MSC works perfect.
However, 2 CDC are not working. They only works if I send messages from one port to another in loopback mode. (Receive Packet will forward the messages to opposite CDC).
I am using freertos and CubeMx to generate project code. If I send using CDC_Transmit_FS() function from freertos it doesnt work.
USB interrupt priority set to 7 while FreeRTOS LIB Priorities from 5 to 15.
Has anyone got the same issue?
HAL_PCDEx_SetRxFiFo(&hpcd_USB_OTG_FS, 0x40);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 0, 0x40);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 1, 0x40);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 2, 0x20);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 3, 0x20);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 4, 0x10);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 5, 0x10);
FIFO allocation for the application.