cancel
Showing results for 
Search instead for 
Did you mean: 

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

meierbenjamin
Associate
Posted on September 09, 2013 at 10:05

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!

#stm32 #ulink #debug #reset
2 REPLIES 2
Posted on September 09, 2013 at 13:45

If it's booting into RAM check the BOOT1 (PB2) pin

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
meierbenjamin
Associate
Posted on September 10, 2013 at 13:36

The BOOT1-Pin is a ''don't care'' when BOOT0 is tied to 0V...   But:

I've got the solution now. It's quite simple.

Throw away the uLink/ME and do it with a ST-Link/V2 for almost no money!

I changed not a thing on my hardware, with the ST-Link it runs perfectly, no chance with uLink.

Thanks anyway.