MicroSD with STM32 and SPI mode – pull-ups and EMI filters

emcprotectionpullupsdstm32

In the context of using the STM32F103C8T6 microcontroller I wonder I am thinking about the most practical and relevant method of the microsd application in the device from the point of device security.

enter image description here

PLAN:

  1. There are three modes:
    a) SPI
    b) SD card 1 bit mode
    c) SD 4 bit mode (4 bits at a time)
    I would like to use SPI mode, so DAT1 and DAT2, as a rule says, will not be connected to a microcontroller.

Question

  1. Among the information and example applications on the Internet, I realized that despite the existence of internal pull-up resistors in STM32, it is worth using external pull-ups and placing them as close to the Microsd socket as possible due to the potential interference with long paths between the microsd card and the microcontroller. However, if this is true, should the unused pins DATA1 and DATA2 also be connected to 3.3V in the SPI mode of the Microsd card control, or only these four resistors, as in my diagram? Or maybe additional capacitors are required
  2. EMI Filter – Is it worth using an EMI filter between the MicroSD and the microcontroller? I've seen a complex CM1624 IC here:

https://www.acmesystems.it/pcb_microsd

but in very small size. I wonder if are there any simpler protection systems that you have tested?

Best Answer

  1. Yes, it reads in the SD specs that unused pins must have pull-ups. The pull-ups are not according to specs, 4k7 is too strong. And it does not make any difference if they are at the connector or MCU end. I don't see bypass caps for the card so you should add them.

  2. What would EMI filters improve here, does it radiate too much EMI out? It would not affect communication between MCU and SD card much; it would only help if you have bad design that radiates too much, and that should be preventable also with other means so adding EMI filters is only band-aid for problems elsewhere.