1
\$\begingroup\$

I'm using a TLE9879 BLDC Shield as a development kit, that is, I'm programming the SoC itself rather than controlling it with an Arduino. The board has a Cortex 10 pin SWD interface, to which I connect a JLink debugger.

When I supply the 12V SoC with 5V, I can flash it and debug the ARM core. The SoC appears slightly under-volted with around 4V on low-voltage pins instead of 5V, but it works. However, when I supply it with 12V, I get "Could not halt CPU after reset" / "CPU could not be halted" errors in Keil, and flashing/debugging doesn't work. I'm certain the chip supports debugging at nominal voltage, my SW can be flashed and debugged on a different dev board with the same chip.

I looked at the SWD line with the scope, and I don't see any problems with signal integrity. The first difference between a successful session and a failed one appears about 2ms after the initial rising edge on the SWD (blue is successful):

enter image description here

Any ideas what I could try to get the SWD working?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

I traced the issue to the P0.2 pin which is connected to the red LED on this board. After reset, the level on this pin desides whenever a debug session is allowed or not:

enter image description here

The debug cable must pull this pin low (pin 5 of the debug connector), otherwise it will have the voltage of Vdd - Vled. If the cable doesn't pull the pin low, and the chip is properly powered, Vdd = 5V and the voltage on the pin is high enough to be interpreted as 1, so debug mode is disabled.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.