AnsweredAssumed Answered

STM32F105R8 uLink/ME able to download code but can't reset the core.

Question asked by meier.benjamin on Sep 9, 2013
Latest reply on Sep 10, 2013 by meier.benjamin
Hi all.

I just got the prototype of a new hardware last week and had some trouble in debugging.
I use a quite simple setup:
- STM32F105R8
- External 16MHz Crystal
- Outputs to control indication LEDs
- SWD for debugging with uLink/ME
- Reset-Pin is floating (internal pull-up)

I can download the application code to the targets flash via uLink/ME, but in the first attempt I will mostly get "Flash Timeout. Reset the Target and try it again." error. With the second attempt I succeed.

When the code is downloaded the hardware should run (I checked the "Reset and Run" option). But it won't. I have to toggle the power to get the controller started. So I am able to download and run an application.

Now to the interesting part:
When I enter the debug mode the core isn't at the reset address as expected. Actually it isn't running from flash at all. It is at the RAM-address 0x20000000 where I suppose the flash-download-algorithm is placed.

I checked the BOOT0 pin, it is connected to 0V.

If I push the reset-button in the Keil-IDE, the core doesn't seem to respond to it at all. PC stays the same.
However when searching the start of Flash (0x08000000) and setting the PC there manually and then run the core, my application will start as expected. I can even debug it in any way wanted.

I tried with different SWD clock-speeds, no difference, except for a longer time to wait...

I then included the External Oscillator in the application so I could run at full speed of 72MHz. After doing so I couldn't download the application even once again. I had remove the Quartz so the core would get stuck in the initialization in order to be able downloading code again.

I can test the rest of my hardware this way. But it really isn't a clean solution.
Any ideas what the cause of this particular problem could be?

I've already done a dozen of different STM32-designs, but such a problem I never had...

Thanks for any help!

Outcomes