cancel
Showing results for 
Search instead for 
Did you mean: 

f_mount freeze the system if _FS_REENTRANT is enabled. I had to disable it in order to mount my USB stick. Anybody know why?

Mvill.17
Associate III

I' m working on an stm32F429discovery board and I want to read an image from an USB stick

I initialized the USB stack, registered the MSC class and started the USB. Really CubeMX did it for me calling MX_USB_HOST_Init() and FAT_FS_init at the beginning.

In USBH_UserProcess() (called by INT when the USB stick is put on ) I called f_mount and having the _FS_REENTRANT=1 it tries to call a semaphore and at this point everything freezes.

I'm using FreeRTOS an the 1st thing I did is to increase the size of the stack but nothing changes and indeed I don't think it's a problem of size but must be something connected to the semaphore and to the INT and I don't understand.

Any idea?

0 REPLIES 0