USB_Host_Library / FreeRTOS Problem
- February 14, 2024
- 5 replies
- 3604 views
Hello All,
We've been struggling with getting hard faults originating in FreeRTOS generated code, but triggered by initialization of a USB optical mouse. The symptoms and stack trace are nearly identical to a previous unreproduced / unresolved post:
https://community.st.com/t5/stm32cubemx-mcus/problem-with-usb-host-library/td-p/57379
Environment:
MCU STM32H7B3NIHx
STM32CubeMX 6.8.1
IAR EW IDE 8.50.9
FreeRTOS 10.3.1
CMSIS 2.00
We decided to start from scratch with a new CubeMX project with nothing enabled but UBS_HS_OTG and USB_Host. (attached) The application ran great and mouse actions were accurately received. When FreeRTOS was enabled a hard fault was generated when the mouse was plugged in.
Stack Trace:
HardFault_Handler
<Exception frame>
uxListRemove
xTaskRemoveFromEventList
xQueueGenericSendFromISR
osMessageQueuePut
USBH_LL_PortEnabled
HAL_HCD_PortEnabled_Callback
HCD_Port_IRQHandler
HAL_HCD_IRQHandler
OTG_HS_IRQHandler
<Exception frame>
HAL_GetTick
HAL_Delay
USB_ResetPort
HAL_HCD_ResetPort
USBH_LL_ResetPort
USBH_Process
USBH_Process_OS
prvTaskExitError
There is very little custom code involved here, and execution doesn't make it past USB device initialization, so my code never runs. This is all USB_Host_Library and FreeRTOS generated code. Please advise as to next steps or things to try.
Thanks!
