Skip to main content
jean_prieur
Associate III
June 18, 2015
Question

SD card mounted causes a lot of interference, perturbing the ADC

  • June 18, 2015
  • 4 replies
  • 862 views
Posted on June 18, 2015 at 13:29

Hello everybody,

I use a SD card (SDIO).

- When the SD card is inserted but not mounted, my analog inputs convert voltages with a very good precision.

- When I mount the SD card, my analog inputs starts to convert voltages with a very poor precision.

- When I unmount the SD card, same problem. 

- When I unplug the SD card, my analog inputs convert voltages with a very good precision.

- When I re-plug the SD card, same problem of precision.

I think it's because the SD card plugged and mounted causes a lot of interference? I tried to analyze the electromagnetic field near the SD card and it's true, when the SD is mounted there is a lot more interference.

The fact is, in my board design, the analog inputs tracks are routed near the SD card. There is a high probability that the analog inputs capture the noise of the SD, do you ever experienced this problem?

Do you think there is any workaround? I can't change my electronic design... For example, can I fully deactivate the SD after the unmount? Because the unmount is not enough and there is still interference.

Thanks a lot for your help, I hope there is solution!

    This topic has been closed for replies.

    4 replies

    Tesla DeLorean
    Guru
    June 18, 2015
    Posted on June 18, 2015 at 20:24

    Does the unmount turn off the SDIO peripheral and deinit the pins?

    Do you see a clock signal?

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    jean_prieur
    Associate III
    June 19, 2015
    Posted on June 19, 2015 at 11:26

    Hello Clive,

    I only use the fatfs library to unmount the SD card,

    /*-----------------------------------------------------------------------*/
    /* Mount/Unmount a Logical Drive */
    /*-----------------------------------------------------------------------*/
    FRESULT f_mount (
    BYTE

    vol,

    /* Logical drive number to be mounted/unmounted */

    FATFS *fs

    /* Pointer to new file system object (NULL for unmount)*/

    )
    {
    FATFS *rfs;
    if

    (vol >= _VOLUMES)

    /* Check if the drive number is valid */

    return

    FR_INVALID_DRIVE;
    rfs = FatFs[vol];

    /* Get current fs object */

    if

    (rfs) {
    #if _FS_LOCK
    clear_lock(rfs);
    #endif
    #if _FS_REENTRANT /* Discard sync object of the current volume */
    if

    (!ff_del_syncobj(rfs->sobj))

    return

    FR_INT_ERR;
    #endif
    rfs->fs_type = 0;

    /* Clear old fs object */

    }
    if

    (fs) {
    fs->fs_type = 0;

    /* Clear new fs object */

    #if _FS_REENTRANT /* Create sync object for the new volume */
    if

    (!ff_cre_syncobj(vol, &fs->sobj))

    return

    FR_INT_ERR;
    #endif
    }
    FatFs[vol] = fs;

    /* Register new fs object */

    return

    FR_OK;
    }

    I do not deinit the SDIO pins after the unmount, is it safe to init the pins each time I want to read/write the card?

    Tesla DeLorean
    Guru
    June 19, 2015
    Posted on June 19, 2015 at 12:17

    I do not deinit the SDIO pins after the unmount, is it safe to init the pins each time I want to read/write the card? 

    I have no idea, but it's probably more practical then removing and reinserting the card. Perhaps you can writing enough data in a burst that the card goes into sleep mode between them.
    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    jean_prieur
    Associate III
    June 19, 2015
    Posted on June 19, 2015 at 12:45

    I try to deinit the SD card and power off it after each communication and now it's working well! I use the SD card only for some save/load (with lot of datas, no real time) so I think it might be not a problem to init/deninit each time.

    I can see that there is no interference any more. It's a good point for EMC standards I think :)