Detailed description
- This is not a new feature.
- The existing problem is BMDA getting stuck in some busy-IO-loop in
riscv_dmi_init() when operating a BMP with RISC-V acceleration enabled. BMP standalone not affected.
- This PR solves it by mirroring the logic to increment DMI idle cycles.
Tested on BMDA via blackpill-f411ce against modified Hazard3 v1.0.1 softcore on 1BitSquared Icebreaker v1.0e. I have added 10k pull-up options in PCF on JTAG pins, this improved the connection but the described bug didn't go away.
It should really be tested on other JTAG DTM RISC-V targets (like GD32VF103); e.g. RP2350 has a custom ADI DTM and will not be affected.
I can't say whether DTMCS Idle hint of 4 is correct https://github.com/Wren6991/Hazard3/blob/v1.0.1/hdl/debug/dtm/hazard3_jtag_dtm_core.v , the debugger is probably supposed to make do anyways.
Your checklist for this pull request
Closing issues
## Detailed description
* This is not a new feature.
* The existing problem is BMDA getting stuck in some busy-IO-loop in `riscv_dmi_init()` when operating a BMP with RISC-V acceleration enabled. BMP standalone not affected.
* This PR solves it by mirroring the logic to increment DMI idle cycles.
Tested on BMDA via `blackpill-f411ce` against modified Hazard3 v1.0.1 softcore on 1BitSquared Icebreaker v1.0e. I have added 10k pull-up options in PCF on JTAG pins, this improved the connection but the described bug didn't go away.
It should really be tested on other JTAG DTM RISC-V targets (like GD32VF103); e.g. RP2350 has a custom ADI DTM and will not be affected.
I can't say whether DTMCS Idle hint of 4 is correct https://github.com/Wren6991/Hazard3/blob/v1.0.1/hdl/debug/dtm/hazard3_jtag_dtm_core.v , the debugger is probably supposed to make do anyways.
## Your checklist for this pull request
* [x] I've read the [Code of Conduct](https://codeberg.org/blackmagic-debug/blackmagic/src/CODE_OF_CONDUCT.md)
* [x] I've read the [guidelines for contributing](https://codeberg.org/blackmagic-debug/blackmagic/src/CONTRIBUTING.md) to this repository
* [x] It builds for hardware native (see [Building the firmware](https://codeberg.org/blackmagic-debug/blackmagic?tab=readme-ov-file#building-the-firmware))
* [x] It builds as BMDA (see [Building the BMDA](https://codeberg.org/blackmagic-debug/blackmagic?tab=readme-ov-file#building-black-magic-debug-app))
* [ ] I've tested it to the best of my ability
* [x] My commit messages provide a useful short description of what the commits do
## Closing issues