cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L152RBT6 board problem with SWD

mishellaway
Associate II
Posted on February 21, 2014 at 16:56

Hello,

I am working on my own board designed around STM32L152RBT6 and I'm facing some problems with connecting to device. I use STM32L Discovery Kit SWD to flash it, jumpers on CN3 are off, all 5 pins for swd connected. My board was checked couple times and is 100% without any trace issues. I would be pleased if some of you could check my schematic, if the PCB is desgined okey, or it's some design issue. Sometimes I'm lucky and can get a connection, most of the time I can't.  

0690X000006056wQAA.png0690X0000060564QAA.png

#stm32l152rbt6
8 REPLIES 8
Posted on February 21, 2014 at 17:12

Sounds like an NRST issue...

 

''SB100 must be OFF if you use CN2 pin 5 in your external application.''
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mishellaway
Associate II
Posted on February 21, 2014 at 18:22

I don't think this is the problem, I can let it disconnected and still no device connection in ST-Link. SWD connected with 4 pins makes no difference for me.

Posted on February 21, 2014 at 19:11

You WANT it to have control over NRST

Schematic doesn't appear unreasonable, haven't checked pin assignments

Check the supplies

Check what NRST does as you power on

Restart with BOOT0 High, and see if you can get signs of life from the USART in System Mode. ie at 9600 8E1 send an 0x7F character, and check for 0x79 response. RealTerm supports hex
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mishellaway
Associate II
Posted on February 21, 2014 at 19:50

By saying it has to be OFF, it means I have to remove it from board? And what about if I want to use both devices, Discovery Kit and my board after flashing my board? Then I have to remove, flash and solder it again?

Posted on February 21, 2014 at 21:36

Hi Michaela,

Is VCC stable? Did you/can you check it? Is C13 a ceramic or a Ta capacitor? If former, chances are, that the LDO is unstable, may oscillate in surprising ways. Check out the LDO's datasheet. Incidentally, this has been discussed on list.hw.cz today (and you are of course more than welcome to come for some discussion there 😉 )...

I also doubt LED3 will light up if it is connected as drawn... 🙂

Ground distribution might also be a problem.

I also experienced problems when used a too long SWD cable. 10cm might be OK, shorter is better.

NRST is not a requirement - three wires (GND, SWCLK and SWIO) are enough for fully functional SWD, but the software (IDE) you are using must support soft reset and you have to set it so.

JW

mishellaway
Associate II
Posted on February 22, 2014 at 11:40

The capacitors used are all ceramic, the LDO is http://www.farnell.com/datasheets/1748668.pdf, I changed it after the PCB was ordered, but should be mounted ok. 

LED3 everyone is wondering about in fact shines bright like a diamond after I power PCB. Seems to be working just fine.

Another thing are cables, I'm using some random cables from e-bay, they are too long :\ Maybe something around 15cm, so that may be a problem I guess.

Posted on February 24, 2014 at 09:45

> The capacitors used are all ceramic, the LDO is http://www.farnell.com/datasheets/1748668.pdf,

That still might be unstable with the ceramic load capacitor. Look at Fig.17 of the datasheet. Use a tantallum, or place a 1Ohm resistor in series with the ceramic.

> LED3 everyone is wondering about in fact shines bright like a diamond after I power PCB.

Then you did not follow your own schematic when mounting the LED... 🙂

JW
mishellaway
Associate II
Posted on March 14, 2014 at 15:09

Lately I was so lucky to get to osciloscope and few measurements showed the 32k crystal was not working. After replacing it whole PCB works as charm 🙂 Thanks to everyone for help.