Detailed description
In this PR we tweak the ensure_idle behaviour introduced in #2072 as while the behaviour established was correct and fine for targets that had entered Test-Logic-Reset (TLR), it would mis-step and transition targets in Run/Test-Idle (RTI) into an invalid state unknowingly. This is patched by always running a full JTAG state machine reset to get back into RTI from an unknown state as part of ensuring idle.
Tested working against STM32L4 and STM32F4 parts.
Your checklist for this pull request
Closing issues
Fixes #2241
<!-- Filling this template is mandatory -->
## Detailed description
In this PR we tweak the ensure_idle behaviour introduced in #2072 as while the behaviour established was correct and fine for targets that had entered Test-Logic-Reset (TLR), it would mis-step and transition targets in Run/Test-Idle (RTI) into an invalid state unknowingly. This is patched by always running a full JTAG state machine reset to get back into RTI from an unknown state as part of ensuring idle.
Tested working against STM32L4 and STM32F4 parts.
## 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))
* [x] 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
Fixes #2241