cancel
Showing results for 
Search instead for 
Did you mean: 

I can't seem to debug my STM32L010K4 processor, I have been through the layout with a finetooth comb but can't see any hardware issues. The device also does not run unless I go into the STM32 ST;-Link V2 and select run from the MCU_Core menu,

GAitc
Associate II

I am running Kiel uVision under the free LO licence and I can program the board and read it back in ST-Link V2 so i know I have connections to the device, however whenever I try and connect to the device to debug I get an error "Cannot access target. Shutting down debug session" I have tried lowering the speed of the STlink, used a differnt ST-Link and a Nucleo board, all have been updated to the latest firmware. I am about to give up and switch to the STM32F072, but want to give the L010K a last chance. Any ideas to try or suggestions then I am all ears.

4 REPLIES 4

Assume we have next to no insight into your design or implementation.

Make sure you've addressed the state of the BOOT0 pin/options so it starts your code.

Review what you're doing with the SWDIO, SWCLK and NRST for the debugger, if those pins are shared with other functionality, or you reconfigure or change them.

Watch if you put the device into low power modes, turning off the debug interfaces.

Dwell a little at startup to permit debug connectivity.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
GAitc
Associate II

Yes, thanks for that Tesla DeLorean I wasn't expecting such a quick response. To be honest it was more a generalised issue type of question, I have used a lot of STM32s but never had an issue getting a device up and running until trying the L010K. I was wondering if there is something different with the L devices in particular.

In answer to your assumptions, yes BOOT0 is tied down to ground, all VDD and GND lines are connected as they should be and NRST has a decoupling capacitor. SWDIO and SWCLK are used solely for programming and Debug, I am not even attempting to put the device into Low Power mode yet.

I am running an internal clock source to cut-down on external components and complexity.

I have also tried to get in running using the STM32 IDE, same results.

I have also just setup a STM32F072 project on a NUCLEO and works first time, so I am either missing a hardware setup or the L010K is doing something different at start up.

Also just realised that the debugger doesn't look like it is loading a program onto the device, I ran the STM32F072 program successfully and it debugged OK, but when loading the STM32L010K project and debugged it, it didn't complain that it was still connected to the 72 Nucleo and it ran the 72 program.

Will see if anyone else has any general insights into the L devices.

Some of the lower pin count devices bond pins to multiple pads, this can create internal conflicts.

It helps therefore to have the full part number, and some use case context.

The CM0(+) devices have lower clocking expectations on the SWD, notionally 1 - 2 MHz

The newer parts need ST-LINK firmware at least as recent.

I use L011 parts in 20 pin QFP, can't report having any specific issues/problems debugging and programming them.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
GAitc
Associate II

Thanks for that Tesla Delorean, it looks like this one will need some deep debugging. Thanks for your replies.