Skip to main content
Javier1
Principal
October 26, 2021
Solved

openOCD not reseting my chip :_(

  • October 26, 2021
  • 4 replies
  • 9532 views

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 

    This topic has been closed for replies.
    Best answer by Javier1

    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

    4 replies

    Javier1
    Javier1Author
    Principal
    October 26, 2021

    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

    hit me up in https://www.linkedin.com/in/javiermuñoz/
    Javier1
    Javier1Author
    Principal
    October 26, 2021

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

    0693W00000FDmprQAD.png

    hit me up in https://www.linkedin.com/in/javiermuñoz/
    Javier1
    Javier1Author
    Principal
    October 26, 2021

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

    hit me up in https://www.linkedin.com/in/javiermuñoz/
    Javier1
    Javier1Author
    Principal
    October 26, 2021

    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

    hit me up in https://www.linkedin.com/in/javiermuñoz/
    Javier1
    Javier1AuthorBest answer
    Principal
    October 26, 2021

    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

    hit me up in https://www.linkedin.com/in/javiermuñoz/
    waclawek.jan
    Super User
    October 26, 2021

    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