2012-11-07 11:24 AM
I'm trying to verify that I can program an STM32L on the Discovery board using an external ST-Link V2 debugger. As far as I know, I only need the SWDIO and SWCLK pins (7 and 9 respectively) and ground. The SWDIO line goes to PA13 and the SWCLK goes to PA14.
I have the jumpers on CN3 disconnected in hopes that cuts the built-in SWD debugger off from the STM32L. I've powered it on externally, not through USB to avoid contention. However I either get an ''Internal Command Error'' when I try to ping the STM32L or the core is stuck in reset (it depends on how I power it up). Is there any way I can actually use an external debugger to talk to the STM32L on the Discovery board? I would like to verify I can do this before we spin a prototype CCA. #st-link #stm32l-discovery2012-11-07 12:25 PM
I suspect you will need to break SB100 and SB101 on the backside so the STM32F103 (internal ST-LINK) doesn't interfere.
If you're building a board, you'd probably want to be exposing SWO, NRST and 3V3 too. Ideally a standard ARM debug 10-pin or 20-pin header, as it opens a lot of choices later and doesn't require hacking up custom cables. If that is too big, consider the 6-pin ST header as an option. Being able to drive reset make automation so much easier.2012-11-07 01:06 PM
Thanks Clive,
I took out those jumpers and got just the MCU powered on. I have the SWDIO, SWCLK, NRST, and GND connected, but I still get an internal command error. SWO shouldn't be necessary should it? I'm trying use the ST-Link utility to talk to the MCU EDIT: Just for craps and laughs, I put the jumpers for CN3 back on, now the embedded ST Link is having the same issue. However, I do notice the MCU doesn't seem to run (the app on it just turns on the LEDs) until I try to talk to the device. If I disconnect after I get the ''Internal Command Failed'', the MCU turns off. EDIT 2: Ah, never mind. I have the wrong reset line hooked up. I have pin 3, not pin 15. EDIT 3: Which that didn't help either. One more thing: I looked over the ARM spec on the debug connectors and they require 100K pull ups on the debug lines ( http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka14540.html ). Though I don't know if this is on the debugger side or the target side2012-11-08 10:54 AM
I have success! Maybe this can be useful to other people.
That should do it.
2014-08-15 01:57 AM
2014-08-15 05:17 AM
Hello, i have a problem with st link utility: i'm writing a bootloader for stm32l but when i'm trying to read in a mapped mode the device disconnect and when i try to write it say that there is a problem in the start address please can help me ....
Please TOP POST responses, otherwise they are hidden. Your description of the problem doesn't give me enough information to work with, can you provide some more specific data and error messages, or attach a project file.