Skip to main content
Explorer
May 5, 2024
Solved

problem with st-link/v2 and st-link/v2.1 with stm32f070

  • May 5, 2024
  • 4 replies
  • 1914 views

Hi,

For some time now I was using cheap bluepill and stm32f030-demo boards to debun my project with st-link probes. It all works perfect. But recently the stmf030 become too small, so I decided to replace it with stm32f070 (same tssop20 package as original stmf030) ... and problems started:

1) I use linux Debian-12 with gcc/gdb/openocd toolchain

2) first stm32f070 I've burned with my code using gdb "load" command. It is now completely unaccesable fo st-link ... although my code works just fine (the code uses USART1 as sort of a "console", and blinks the LED as it should).

3) I've taken it out off the board (unsoldered) and replaced it with another brand new stm32f070, this time I've used usart1 bootloader to burn up the code,

4) this time the code works, st-link can connect, and even gdb using st-link and openocd is able to repeatedly burn new versions of code .... only it cannot restart the chip. The chip always restarts in "bootloader mode", its IP=0x1FFFxxxx istead of 0x08000xxx and debugging is impossible. This happens no matter if I reset the chip using openocd command (reset halt/run) or if I press the RESET button. The only way to make the chip execute user code (my code) is to power-cycle it.

Any ideas why reset doesn't work? Any ideas what could have happen?

    This topic has been closed for replies.
    Best answer by AScha.3

    >stm32f070 the setting of the boot0 jumper don't matter at all 

    Both F030 and F070 have boot0 on pin 1 . So if not "respect" what you set on jumper :

    A: pin floating (solder it again . believe me.)

    B: chip defect (pin 1 ..)

    C : check option bytes...

    AScha3_0-1714931230431.png

     

    +

    Can you connect with swd / st-link ? To check, what's going on here .

    4 replies

    Super User
    May 5, 2024

    Hi,

    what you doing with Boot0  pin ? (You didnt write.)

    user44Author
    Explorer
    May 5, 2024

    I'm using this board (https://stm32-base.org/boards/STM32F030F4P6-VCC-GND). It allows full control over boot0. Hoever, with stm32f070 the setting of the boot0 jumper don't matter at all (and I checked the wiring with omhometer) - the board always resets to bootloader, and only power-cycle make it execute user code. Also, pls remember, that the board worked exactly as expected (meaning - respect the boot0 pin) hundreds of times when it had the original stm32f030 installed.

    AScha.3Answer
    Super User
    May 5, 2024

    >stm32f070 the setting of the boot0 jumper don't matter at all 

    Both F030 and F070 have boot0 on pin 1 . So if not "respect" what you set on jumper :

    A: pin floating (solder it again . believe me.)

    B: chip defect (pin 1 ..)

    C : check option bytes...

    AScha3_0-1714931230431.png

     

    +

    Can you connect with swd / st-link ? To check, what's going on here .

    user44Author
    Explorer
    May 5, 2024

    Sorry, my fault, the board is actually this one: https://stm32-base.org/boards/STM32F030F4P6-STM32F030-DEMO-BOARD-V1.1

    user44Author
    Explorer
    May 5, 2024

    (A) did it ... which is quite a shock to me, since I really checked it with the meter, and the jumper pin did have a connection. Admittedly insufficient :7

    But THENX a LOT for the hint!!

    Super User
    May 5, 2024

    Sometimes you get a win in Lotto  :

    solder joint looks good, normal, but pin floats some micrometers above the solder....and when you check it, with DMM or scope probe, you press a little bit on it - enough to have good contact now. Now you know...

    :)

    This is the Way !