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?
As far as I can tell: is there no formula. ST manual UM0892 tells us that the default frequency is
4000KHz
(aka4MHz
) and can be set as low as5KHz
.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)