cancel
Showing results for 
Search instead for 
Did you mean: 

openOCD not reseting my chip :_(

Javier1
Principal

Trying to build my own raspberryPi wireless SWD debugger.(bitbanging SWD, without stlink)0693W00000FDmMGQA1.gifI am able to flash and halt the code trough cubeIDE but openOCD is not able to reset the chip, i have to do it manually for now (see gif above).

Pesky errors im getting:

error in procedure 'ocd_process_reset'

0693W00000FDmFZQA1.pngError executing event reset-start on target

Error executing event reset-init on target0693W00000FDmFKQA1.png 

we dont need to firmware by ourselves, lets talk
1 ACCEPTED SOLUTION

Accepted Solutions
Javier1
Principal

0693W00000FDobSQAT.jpgi gave up, im sticking an stlink to my raspi

openocd.cfg file changes :

source [find interface/stlink.cfg]
transport select hla_swd

it works first try, everything

we dont need to firmware by ourselves, lets talk

View solution in original post

6 REPLIES 6
Javier1
Principal

My openocd.cfg looks like:

source [find interface/sysfsgpio-raspberrypi.cfg]
transport select swd
set WORKAREASIZE 0x2000
source [find target/stm32f0x.cfg]
reset_config srst_only srst_nogate
adapter srst delay 100
adapter srst pulse_width 100
bindto 0.0.0.0
init
targets

 My sysfsgpio-raspberrypi.cfg looks like:

#
# Config for using RaspberryPi's expansion header
#
# This is best used with a fast enough buffer but also
# is suitable for direct connection if the target voltage
# matches RPi's 3.3V
#
# Do not forget the GND connection, pin 6 of the expansion header.
#
 
interface sysfsgpio
 
# Each of the JTAG lines need a gpio number set: tck tms tdi tdo
# Header pin numbers: 23 22 19 21
sysfsgpio_jtag_nums 11 25 10 9
 
# Each of the SWD lines need a gpio number set: swclk swdio
# Header pin numbers: 23 22
sysfsgpio_swd_nums 11 25
 
# If you define trst or srst, use appropriate reset_config
# Header pin numbers: TRST - 26, SRST - 18
 
# sysfsgpio_trst_num 7
# reset_config trst_only
 
# sysfsgpio_srst_num 24
sysfsgpio_srst_num 7
reset_config srst_only srst_push_pull
 
# or if you have both connected,
# reset_config trst_and_srst srst_push_pull

we dont need to firmware by ourselves, lets talk
Javier1
Principal

0693W00000FDmn2QAD.pnglooks like i got the pin number right but im going to try other nRST pins just in case

0693W00000FDmprQAD.png

we dont need to firmware by ourselves, lets talk

changing the sysfsgpio_srst_num , didnt worked, i tried gpio8 and gpio24, same errors

we dont need to firmware by ourselves, lets talk

tried changing the openocd.cfg file and no luck neither

reset_config srst_only srst_push_pull srst_nogate connect_assert_srst

im just raindancing at this point while i read this https://www.openocd.org/doc/html/Reset-Configuration.html

we dont need to firmware by ourselves, lets talk
Javier1
Principal

0693W00000FDobSQAT.jpgi gave up, im sticking an stlink to my raspi

openocd.cfg file changes :

source [find interface/stlink.cfg]
transport select hla_swd

it works first try, everything

we dont need to firmware by ourselves, lets talk

Thanks for letting us know, Javier.

It's good to be reminded, from time to time, that things that look to be tricky are usually tricky.

Jan