[ABANDONED] Code freezes while mounting SD card once in a while

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] Code freezes while mounting SD card once in a while

    Hi,

    We're using emFile version: V4.04a
    What we observed was 1-2/10 times the code is unable to mount the SD card as it gets stuck at FS_Mount("");
    Any hint on what might be happening? I've attached the code snippet.

    Regards,
    Gautam
    Images
    • Capture.PNG

      15.8 kB, 668×272, viewed 1,291 times
  • Hello Gaugan,

    Would it be possible to enable the debug output of the SD / MMC driver and post the log?
    The debug output can be enabled by adding the following two defines to FS_Conf.h:

    C Source Code

    1. #define FS_DEBUG_LEVEL 5
    2. #define FS_LOG_MASK_DEFAULT FS_MTYPE_DRIVER

    Thank you.

    Best regards,
    Marius
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello Gaugan,

    I analyzed the logs but I was not able to find any reason why the mounting of the SD card fails
    The communication to SD card seem to work properly.

    Could you please post a screen capture of the call stack showing in which
    function the code actually blocks? Thank you.

    Best regards,
    Marius
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Marius,

    Sorry for the late reply, holidays here. Did lots of testing and here's one thing I observed wrt sd cards and let me share the same with you:
    So I tried bootloading process using various SD cards, 5nos 4GB, 2nos 8GB and 1 32GB. 4GB sd cards behaved similarly as mentioned above - 1 to 2/10 times the bootloader is unable to mount/access sd card. While the 8GB sd cards have not displayed any such issue - tried around 250+ times. I've also tried with 32GB sd cards, was not able to replicate the issue - works flawless. Only the 4GB ones seem to replicate the same. I've not tried with the lower memory sd cards than 4GB.
    Do you feel the higher SPI speeds might be an issue here for randomness in 4GB cards behaviour? Do share your thoughts and other possibilities.

    Regards,
    Gautam