RT685 Freertos + FatFS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RT685 Freertos + FatFS

369 Views
jwprice100
Contributor I

I'm working with the evkmimxtrt685 eval board. I want to use FreeRTOS and FatFS to read/write files on a exfat partition on a SD card. The only example project with fatfs is bare metal. The FreeRTOS SD card example is just block reads/writes. 

There does seem to be a FreeRTOS OS abstraction layer. So I've put all those pieces together and it compiles. Unfortunately when I try f_mkdir like in the bare metal example the task is blocked indefintely. It looks like its stuck deep down mounting the volume and in turn initializing the disk and so on deep down until eventually it gets stuck in the SDMMCHOST_TransferFunction. It's stuck on SDMMC_OSAEventWait which waits on a FreeRTOS semaphore. I find this perplexing as there's no other task that will ever give the semaphore. 

Since there are no examples I'm not sure if this is user error or if FatFS + FreeRTOS support for this board is simply incomplete. Can anyone offer any advice? 

Labels (1)
0 Kudos
1 Reply

348 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @jwprice100 ,

  1. Whether the baremetal sdcard+fatfs works ok on your side or not? I mean this code:

SDK_2_13_0_EVK-MIMXRT685\boards\evkmimxrt685\sdmmc_examples\sdcard_fatfs

2. About the freertos+fatfs

  RT685 SDK didn't add it, but you can refer to the RT1050 code:

SDK_2_13_0_EVKB-IMXRT1050\boards\evkbimxrt1050\sdmmc_examples\sdcard_fatfs_freertos

  The SDK download link is:

https://mcuxpresso.nxp.com/en/builder?hw=EVKB-IMXRT1050

 

Wish it helps you!

Best Regards,

Kerry

 

0 Kudos