2014-02-21 07:56 AM
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. #stm32l152rbt62014-02-21 08:12 AM
Sounds like an NRST issue...
''SB100 must be OFF if you use CN2 pin 5 in your external application.''
2014-02-21 09:22 AM
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.
2014-02-21 10:11 AM
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 hex2014-02-21 10:50 AM
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?
2014-02-21 12:36 PM
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. JW2014-02-22 02:40 AM
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.2014-02-24 12:45 AM
> 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... :) JW2014-03-14 07:09 AM
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.