2021-10-26 05:13 AM
Trying to build my own raspberryPi wireless SWD debugger.(bitbanging SWD, without stlink)I 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'
Error executing event reset-start on target
Error executing event reset-init on target
Solved! Go to Solution.
2021-10-26 09:01 AM
i 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
2021-10-26 05:44 AM
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
2021-10-26 06:11 AM
looks like i got the pin number right but im going to try other nRST pins just in case
2021-10-26 06:37 AM
changing the sysfsgpio_srst_num , didnt worked, i tried gpio8 and gpio24, same errors
2021-10-26 07:06 AM
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
2021-10-26 09:01 AM
i 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
2021-10-26 09:09 AM
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