cancel
Showing results for 
Search instead for 
Did you mean: 

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

user44
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions

>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 .

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

6 REPLIES 6
AScha.3
Chief

Hi,

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

If you feel a post has answered your question, please click "Accept as Solution".
user44
Associate II

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.

user44
Associate II

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

>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 .

If you feel a post has answered your question, please click "Accept as Solution".
user44
Associate II

(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!!

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 ! 

If you feel a post has answered your question, please click "Accept as Solution".