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.

  • 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 233 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
  • 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