This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using app_sdcard & fatfs with FreeRTOS

Hello everyone!

I want to use the app_sdcard to read/write with fatfs on a uSD card in my app which is based on FreeRTOS. While i was implementing this library, i saw that it use the protothread library.

Can i use protothread along with FreeRTOS? Is there another way around? 

Thank you!

Parents
  • Hi Steve, 

    according to http://dunkels.com/adam/pt/ it should be possible to use protothreads together with an OS. However, I have never tried to integrate protothread in a FreeRTOS project. My suggestion would be to try to add it and if you run into any issues then you can post the issue here for assistance/help.

    Best regards

    Bjørn

  • Hi bjorn-spockeli,

    I have tried to initialize the SD card within the Task that'll be responsible to read/write to the card but i ran into some hardfault after the initialization was done. Moving the init before starting the scheduler remove the hardfault. 

    Now, I get the log "Disk initialization failed." with disk_state=1. Is it because i'm using a microSDHC and not a microSD? (i read a post about app_sdcard not being able to initialize SDHC nor SDXC but i lost the link)

    The fatfs exemple worked with a SD but not with a SDHC/XC.

    I'm using the SDK 15.3.0

Reply
  • Hi bjorn-spockeli,

    I have tried to initialize the SD card within the Task that'll be responsible to read/write to the card but i ran into some hardfault after the initialization was done. Moving the init before starting the scheduler remove the hardfault. 

    Now, I get the log "Disk initialization failed." with disk_state=1. Is it because i'm using a microSDHC and not a microSD? (i read a post about app_sdcard not being able to initialize SDHC nor SDXC but i lost the link)

    The fatfs exemple worked with a SD but not with a SDHC/XC.

    I'm using the SDK 15.3.0

Children
Related