EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: ricko_uk on November 15, 2024, 08:44:50 pm

Title: STM32 SWO pin isolation from SDMMC data line
Post by: ricko_uk on November 15, 2024, 08:44:50 pm
Hi,
I am using a STM32U5G9VJT6Q and I would like to enable the SWO signal on the SWD connector, but one of the SDMMC data pins is already using that line.

To avoid creating a long stub on the SDMMC bus leading to the SWD connector—which could cause line reflection issues due to the potentially high speeds of the SDMMC—I’m considering isolating the connection to the SWD connector with a resistor. This would allow the SDMMC line to be directly connected to the microcontroller while the signal to the SWD connector is "isolated" through the resistor.

A resistor with too high a value might degrade the SWO signal (?). Could you recommend an appropriate resistor value that ensures reliable SWO operation?

Additionally, what are the best practices in this situation? For example, would implementing line termination at the SWD connector side be advisable?

Thank you!
Title: Re: STM32 SWO pin isolation from SDMMC data line
Post by: ataradov on November 15, 2024, 11:49:33 pm
Given the conflict, you are not going to use SDMMC and SWO at the same time, so just put a 0 Ohm resistor that you can populate when using SWO and remove normally.
Title: Re: STM32 SWO pin isolation from SDMMC data line
Post by: thm_w on November 16, 2024, 12:39:27 am
I think SWO frequency depends on the SWD frequency which is settable right? So it shouldn't be a major issue unless you are worried about long programming times.

Typically 2MHz but could be as high as 40MHz, depending on your part and what you want to use it for.

I would throw in 1k and see how that looks on the scope.
Title: Re: STM32 SWO pin isolation from SDMMC data line
Post by: ataradov on November 16, 2024, 12:53:56 am
SWO frequency is independent and is pre-scaled from the core clock. And usually it is quite low. But the issue is not SWO, the issue is long stubs on the SDMMC, which is fast and needs decent signal integrity. Whether this stub will be an issue - I don't know, and I kind of doubt it. But if it is a concern, then  0 Ohm link is a good solution. It can be populated for development and removed on production units.

This does not sound like a real problem.
Title: Re: STM32 SWO pin isolation from SDMMC data line
Post by: thm_w on November 16, 2024, 02:14:49 am
SWO frequency is independent and is pre-scaled from the core clock. And usually it is quite low. But the issue is not SWO, the issue is long stubs on the SDMMC, which is fast and needs decent signal integrity. Whether this stub will be an issue - I don't know, and I kind of doubt it. But if it is a concern, then  0 Ohm link is a good solution. It can be populated for development and removed on production units.

This does not sound like a real problem.

Oh I didn't mean SWO was the problem, just thinking the highest reasonable resistor value that would still pass the SWO signal. So the resistor could be left in place.

Though as you say it should never be needed for production anyway.
Title: Re: STM32 SWO pin isolation from SDMMC data line
Post by: ricko_uk on November 16, 2024, 08:39:37 pm
Thank you all.
I was trying to avoid doing that but yes, I think it might be the safest solution.

Thank you