platform: STM32F4 on STM32F4 Discovery Board
toolchain: Sourcery G++ Lite
I’m trying to merge two working projects (USB HID Device and a FreeRTOS based simple project) but i’m having some problems. After a quick debug of the project I found out that it’s a problem with the delay function used by USB Module:
void USB_OTG_BSP_uDelay (const uint32_t usec)
__IO uint32_t count = 0;
uint32_t utime = (120 * usec / 7);
if ( ++count > utime )
After a call to this delay function, the debugger can’t return to the previous level and seems to run continuously. When I pause the execution, the debugger seems to be in a function from task.c vTaskSwitchContext( void ) and I can’t continue the debugging.
I have to mention that I call the USB init function before the creation of tasks and the start of scheduler.