Poll

Good Evening,

Debugging
1 (50%)
Procedure
1 (50%)

Total Members Voted: 1

Author Topic: Debugging of ST Controller  (Read 1594 times)

0 Members and 1 Guest are viewing this topic.

Offline nallamuthuTopic starter

  • Newbie
  • Posts: 1
  • Country: in
Debugging of ST Controller
« on: January 27, 2020, 01:53:10 pm »
Good Evening,
   As I am trying to debug the program from STM32L072CZ controller using ST-Link/V2 by using the software of Keil and AC6. I am getting the error as No target device found. Can anyone suggest now to debug the program.
 

Offline rhodges

  • Frequent Contributor
  • **
  • Posts: 364
  • Country: us
  • Available for embedded projects.
    • My public libraries, code samples, and projects for STM8.
Re: Debugging of ST Controller
« Reply #1 on: January 27, 2020, 05:05:14 pm »
First, make sure BOOT0 is low. :)

Look at pages 50 and 53 of the datasheet. Pins 34 and 37 are primary for A13 and A14. SWDIO and SWCLK are alternate functions. I would expect them to be enabled until you choose A13 and A14 GPIO, but it looks like you have to enable them yourself. Page 53 shows.that you want AF0 for both.

I had the other problem. I accidentally turned off SWDIO and SWCLK on stm32f030 during the GPIO init.  :palm:
Currently developing embedded RISC-V. Recently STM32 and STM8. All are excellent choices. Past includes 6809, Z80, 8086, PIC, MIPS, PNX1302, and some 8748 and 6805. Check out my public code on github. https://github.com/unfrozen
 

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: Debugging of ST Controller
« Reply #2 on: January 27, 2020, 10:48:45 pm »
I had the other problem. I accidentally turned off SWDIO and SWCLK on stm32f030 during the GPIO init.  :palm:

So did I  :palm:

However I found OPENOCD still erased the chip if  started during the short period after mcu reset and before my user program disabled SWDIO and SWCLK. It was a bit hit and miss but did get me to thinking "what have I done to cause this? "
 

Offline kamtar

  • Regular Contributor
  • *
  • Posts: 62
Re: Debugging of ST Controller
« Reply #3 on: January 28, 2020, 01:56:03 am »
I had the other problem. I accidentally turned off SWDIO and SWCLK on stm32f030 during the GPIO init.  :palm:

So did I  :palm:

However I found OPENOCD still erased the chip if  started during the short period after mcu reset and before my user program disabled SWDIO and SWCLK. It was a bit hit and miss but did get me to thinking "what have I done to cause this? "

The easiest way to resolve this is to switch into bootloader mode (that's why it's always useful to have pulldown on BOOT0 if you can).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->