0
\$\begingroup\$

I am currently using a WeAct Studio STM32H562RGT6 development board, and everything is working fine except 4-bit SDIO, which is unreliable if I use a clock divider less than 20 (~2MHz). Ideally I would like to use a divider of 2 (24MHz). The schematic is here.

I need to start laying out my own board, and would like to make the SDIO work better. I have been studying various suggestions: Some seem to be a bit extreme for the speed I want to operate at. Which of the following are the most important, and are there any others that I should consider?

  • add 10k pull-ups on all lines except clock
  • make the track impedance 50ohms (my PCB manufacturer says that means 6 mil tracks)
  • avoid vias (inductance)
  • keep the track lengths within 100mil of each other (to avoid skew)
  • add 30 ohm series resistors by the processor (to absorb reflections)
  • keep the tracks short
\$\endgroup\$
5
  • \$\begingroup\$ Are your trace widths 2x thickness? Rs= 22 to 30 is a good choice then. \$\endgroup\$ Commented yesterday
  • \$\begingroup\$ What is your Vin? U2 Reg has a 2 Ω min drop Rs so Vin min is ? 3.5V?? \$\endgroup\$ Commented yesterday
  • 1
    \$\begingroup\$ The Weact Studio board is normally powered by USB. For my own board, I will use 2xRT9013-3.3 (for STM and SDIO), which is good for 50mV dropout voltage at ~100mA. With a Li-ion battery at 3.7V, the regulated voltage should still be in spec. \$\endgroup\$ Commented 17 hours ago
  • 1
    \$\begingroup\$ Yes, the width will be 2x thickness \$\endgroup\$ Commented 17 hours ago
  • \$\begingroup\$ can you show your stackup design and actual... OK ..50mV dropout voltage at ~100mA. = 0.5 Ohm so 2 what I recalled incorrectly \$\endgroup\$ Commented 16 hours ago

2 Answers 2

1
\$\begingroup\$

The SDIO interface requires 10ns slew rate on the clock signal edges, which means each edge requires an analog signal bandwidth of 35 MHz to transition fast enough, even if you used 1 Hz clock frequency.

The pull-ups are mandatory for compatibility with bus electrical specs, but on the other hand, internal pull-ups inside MCU could suffice. Check the specification. So basically, if you did not enable the pull-ups in your code, the bus doesn't have to work either. Drawing these resistors is a good idea, because if they are not needed, they can be left off the PCB, but if you need them and you don't have a place for them, the design does not have to work.

The series resistors may or may not be mandatory, as again the MCU has internal pin drive strength selection. If those settings are set to too weak or too strong in your software, again, the bus does not have to work. Drawing these resistors is a good idea, because if they are not needed, they can be replaced with 0R jumper resistors, but again if the design requires them and you don't have a place for them, the design does not have to work.

All the other suggestions are basic PCB design suggestions for keeping signal integrity on a high speed buses. I'd consider SDIO as a high speed bus.

The track impedance is important as the devices on bus are expecting to drive signals in a certain way into a certain known impedance to have good signal integrity. As 10ns slew rate means PCB tracks longer than 20cm are considered to require impedance matching, tracks shorter than this should not affect much, unless your clock slews faster and thus the tracks need to be shorter.

Avoiding vias is a good suggestion, as they are an impedance discontinuity and signals reflect off of them. They can be designed in a way that tries to match the impedance so they cause less disturbance. And if you use them in a way that leaves stubs, that also causes reflections. And it is best to have equal amount of vias on all wires to match the length of the wires so that signals on different wires arrive at the same time.

Which is why signals need to be equal length to avoid skew. Electrical buses have requirements how data signals must change in relation to clock edge so that they work stable. 100 mils is only 2.54mm, so on a 1.6mm boards a single via is a significant length mismatch unless considered to add to the signal length. Sometimes the clock signal requires different length to stransition correctly with data.

Tracks need to be short to not accumulate errors from not paying attention to engineer all the above sugwstions, but also because bus has a requirement for host to get data back from the device with certain alignment of the sent clock signal, so bus can't exceed a certain length. I recall some host chips recommended the traces to be 5cm maximum.

So none of the above are most important, some are mandatory if you don't even know what you require unless you measure it, and also when drawing the PCB, it makes no sense to implement only half of the rules that improve signals and ignore the other half which degrades the signals. So all high speed design rules are always important.

If you are thinking why the board you bought does not work well, it might be that the designer did not implement the high speed design rules well enough, as it is just a hobbyist board. Assuming your software configures the interface correctly for that hardware design.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Good points the timing is critical in the datasheet on SDIO. \$\endgroup\$ Commented 15 hours ago
1
\$\begingroup\$

On STM32H5, the I/O compensation cell is not automatically activated.
You have to enable and “calibrate” it in software if you want the improved edge control, high‑speed behavior.

What “activated” means is by default, the compensation cell is disabled and a fixed internal code is used for all I/Os.

“Activated” means you have turned on the cell so it measures current process/voltage/temperature (PVT) and generates an 8‑bit code (4 bits NMOS, 4 bits PMOS) that optimizes slew rate and output impedance.

Once the ready flag is set, you typically copy that code into the software code register and then disable the live cell to save power.
\The I/Os then use that stored code.

As I recall Vol/Io~ 22~33 Ω for ALC CMOS THis is why adding Rs=30 to a 50 ohm microstrip is recommended for echo glitch reduction on long traces.

I ran some simulations for example. You may edit any slider or parameter to simulate logic drive signal, trace and load C.

enter image  here

When risetime is greater than Tpd, the parameters of matching are not critical as long as risetime is fast enough. So I added a rough value for Cout.

enter image here

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.