Good day
The problem:
What I have tried:
Any help would he hugely appreciated.
Debugging problems on microcontrollers have two general common methodes.
Hardware Problems:
In this part, it is highly recommended that use an oscilloscope to monitor circuit.
Make sure the microcontroller is powered with a correct and stable power supply.
Check the soldering quality and there is no short circuit on the board (especially between ground pins and other pins).
Check the NRST
pin is high when the board is powered.
Remember that this reset is active low so during programming or debugging this pin should be high. Also, check this pin is debounced
with a capacitor.
Also you can check the JTAG
pins signals with an Oscilloscope to check if the programmer device is working fine.
Sometimes adding a capacitor between debugging pins and GND
increases the bus capacitance and solves the problem. The value of the capacitor should be found by trying.
Software Problems
Check the programmer driver is correctly installed on your PC.
Check the programming method is true(for example maybe the board is designed to be programmed with SWD
, not JATG
).
Sometimes reducing the programming clock of the programmer solved the problem.
If all of these methods didn't work and you are sure that the board is fine, probably the programmer is broken, so change the programmer with another one.