Reset HiFive Rev b using dtr and rts

I’m wondering how can i reset my HiFive Reb b. I use the module Serial from python.
I saw something like this:
serial.setDTR(False)
serial.setRTS(False)
time.sleep(0.1)
serial.setDTR(True)
time.sleep(0.1)
serial.setDTR(False)
time.sleep(0.1)
My script is succesfully connected and it does not work for me. When pressing the red reset button it does reset and a green light blinks. I don’t see that light when running the script and I don’t see the ususal ‘bench clock reset done’ message. For ESP32 there are some tips to reset it using dtr and rts, but I couldn’t find some for HiFive Rev b

OpenOCD knows how to reset the board, via the debug module:

I read a bit of the pdf you posted, but still don’t know how to reset my device using only python. Tried to use ser.setDTR(False), time.sleep(0.1), ser.setRTS(False). In this case ser is my serial connection to ttyACM1. This is working. The terminal with the command screen on dev/ttyACM1 shows the exact same text when pressing the resetbutton, but the part where bench clock reset shows up on the dev/ttyACM0 screen is missing.

Update: there is one difference on the reset log on ttyACM1:

When running the code: rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)

When pressing the reset button: rst:0xc (SW_CPU_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)