Skip to main content
Visitor II
September 3, 2024
Question

f_open(&fil, "w_test.txt", FA_CREATE_ALWAYS | FA_WRITE)

  • September 3, 2024
  • 3 replies
  • 738 views

Could you show me that "f_open(&fil, "w_test.txt", FA_CREATE_ALWAYS | FA_WRITE)" get "NOT READY FR_OK" ?

When I used "NUCLEO F722", I get "NOT READY FR_OK". But when I used "NUCLEO L476", I get FR_OK.

I checked wiring so many times.

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    September 10, 2024

    Hello,

    STM32F7 and STM32F4 are not the same product.

    Answering to your question according to what provided is not obvious.

    Meanwhile, I suggest you to refer to this video how to setup FatFs with SDCard on F7 product.

     

    Super User
    September 10, 2024

    @OLYMPIA wrote:

    I get "NOT READY FR_OK".


    Do you mean FR_NOT_READY ?

    http://elm-chan.org/fsw/ff/doc/rc.html#:~:text=FR_NOT_READY,device%20has%20broken.

     


    @OLYMPIA wrote:

    When I used "NUCLEO F722", I get "NOT READY FR_OK". But when I used "NUCLEO L476", I get FR_OK.


    So step through both, and see where they differ.

    Have you used a logic analyser to see what's going on in the hardware?

    Graduate II
    September 10, 2024

    You can't debug the block IO furnished via the DISKIO layer at the top-level.

    There's more involved than wiring.. but you've presented none of that.

    Not Ready is usually from the GPIO pin associated with the socket card detection switch, but can also come from the card itself.