cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L151 jtag problem

Mikhail Polyakov
Associate II
Posted on April 08, 2012 at 16:18

Hello !

I

I start working

with STM32L151  + Keil + ULINK2 ,  and  met a problem : after some code,  likely  it was  scommand 

GPIOA->BSRRL=GPIO_BSRR_BS_2;

processor

stop

the

debugging

, and a can not start 

a new

debugging

or program or erase

it  flash ,  in all cases I see message ''Jtag communication failure'' .

Moreover

, I found that  processor holds NRST low !  On my board BOOT0 connected to ground and BOOT1

is not connected

to anything

.

Please explain

me

what happened to

the processor and

how to get

it in

working

.

Thank you!

#stm32-stm32l151-jtag-problem
2 REPLIES 2
Posted on April 08, 2012 at 18:36

Hard to say, but NRST being held low doesn't sound good. JTAG and  SWD can fail if the pins they use are reconfigured, but without looking at the code, or debugging, I'm not going to be able to give a specific cause. You could also have damaged the board, or have a problem with the regulators, again hard to know without doing some measurements.

If the problem is with your code setting up pins wrong, you can always try pulling BOOT0 high, and allowing the device to restart in the System ROM loader. JTAG connectivity can take hundreds, or thousands, of cycles to wrestle control of the CPU after reset, if your code interferes with that you might not be able to get control, and therefore using the System ROM is an effective/safe way of getting control, and then erasing the errant user code.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
rosarium
Associate II
Posted on April 09, 2012 at 10:54

can you also connect the BOOT1 to ground and try.

Is your u-link working ok with other boards??