1

I'm trying to connect to my board with SWD(serial wire debug) for frequency=4000khz with MCU which fixed frequency is 15KHz but it failed to connect.

Is there a specified relation or formula between this tow frequency to have max SWD frequency for MCU frequency 15KHz?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
RAMZI
  • 21
  • 6
  • the swd frequency would have to be slower than the mcu main/system clock of course. when you tried slowing down the swd frequency at what point did it start to work? – old_timer Oct 19 '19 at 01:31
  • This relation should be documented in the data sheet of your MCU or an application note. Did you look into them? – the busybee Oct 19 '19 at 08:43
  • it start working from 250KHz. i did look to them but i didn't find anything.do you have any idea about the relation or the formula to calculate the max SWD frequency for this MCU frequency? – RAMZI Oct 19 '19 at 19:46

1 Answers1

0

As far as I can tell: is there no formula. ST manual UM0892 tells us that the default frequency is 4000KHz (aka 4MHz) and can be set as low as 5KHz.

My explanation for the lower options is the possibility to communicate with faulty/buggy hardware or hardware in a difficult situation where software/environmental conditions have made it so that communication at 4MHz isn't reliable.

Lower frequencies have bigger amounts of time wherein the line is pulled to '0' or '1' which makes it harder for noise to mess with it. It also allows for more distance between the transition edges which might have spurious effects on the line because of possible factors (bad board design, PSU noise, etc etc)

Tarick Welling
  • 3,119
  • 3
  • 19
  • 44