cancel
Showing results for 
Search instead for 
Did you mean: 

usb host fat32 does not work with freeRTOS

Javad
Associate III

I have stm32f429discovery and i used stm32cubeMx to set up usb host with fast32. when I connect flash it works OK. but when I configure freeRTOS it didn't work. when i debug it, I found that the "id" in "USBH_UserProcess" function is "HOST_USER_CONNECTION".

i increase heap and stack size to 0x8000 and 0x5000 respectively but still I have that problem.

I check freeRTOS scheduler, it return "taskSCHEDULER_RUNNING"

in this program I just have 2 task (one of them is empty. i add it for test) but in my final program I have 5 task. I ran LTDC with wmwin and ADC and Usart. everything worked well.  after I add OTG task my program did not work so I built new code just for OTG while I can debug it.

this is my task:

void StartDefaultTask(void const * argument)

{

 /* init code for FATFS */

 MX_FATFS_Init();

 /* init code for USB_HOST */

 MX_USB_HOST_Init();

 /* USER CODE BEGIN 5 */

 /* Infinite loop */

 for(;;)

 {

schedulerstate= xTaskGetSchedulerState();

MX_USB_HOST_Process();

  osDelay(1);

 }

 /* USER CODE END 5 */ 

}

i attach "usb_host.c" and "cub.ioc" files

0 REPLIES 0