SparkFun Forums 

Where electronics enthusiasts find answers.

Everything ARM and LPC
By Otatiaro
#129866
Hello,

I have a big problem with my target :(

I can connect to it through JTAG or SWD using the ST Link, I can download an Hex file (with verification ok), but when I go to the core panel and click "run", I have an error message "unable to run application".
I can erase chip and verify blank, no problem.

The first day I was able to debug using Atollic TRUEStudio Pro, but after a few hours, atollic stlinkgdbserver.exe started to crash each time I wanted to start a debug session.

If I flash the HEX file and unplug from the JTAG probe, it doens't run (the program turns on LEDs, I know it works, when I could debug with Atollic it was working).

The probe connection is based on the ST Link documents : http://www.st.com/internet/com/TECHNICA ... 221563.pdf

I'm really stuck, and it sucks, I'm really tight on planning and cannot loose more days.

Any idea ?

Regards,
Thomas.
By Otatiaro
#130084
Ok now it's getting weird ...

I switched to TASKING (evaluation), for 2 days I was able to debug, no problem, dev was going well.
And then yesterday it started to be twitchy. Today I start everything again : impossible to connect to MCU.

The program is running (the LED is turning ON), but no JTAG connection.
I changed the MCU again ... connection ok in STLink utility, I downloaded the HEX file, program starts but no more communication.

My guess is the MCU enters Read Out Protection Level 2, which disable permanently ( :( ) the debug interface.
My second guess is it's exactly what happened with Atollic at first (what caused their gdbserver to crash).

Of course in my code I do not touch to security (only USARTs and TIMs).

TASKING support is searching, but I'm really stuck until I find a solution (already 4 dead MCUs ... and the STM32F205RG is not cheap !).

HELP !

Thomas.
By Otatiaro
#130090
Ok found the solution.

I was ending my main by a infinite loop of "wait for interrupt".
And it seems the JTAG is not an interrupt, si it cannot communicate with the MCU if it's waiting for an interrupt.

The trick to take control is to force the BOOT0 signal high during a full chip erase.

Thomas.