pyOCD
pyOCD copied to clipboard
coresight: Fix JTAG initialization sequence for CMSIS-DAP
This patch fixes JTAG with CMSIS-DAP. CMSIS-DAP must be in Run-Test/Idle state after JTAG initialization.
The PR requires #1448
Current version pyOCD doesn't work with JTAG on CMSIS-DAP. Because pyOCD sets JTAG state to Test-Logic-Reset
after initialized.
We can see that JTAG_Transfer (DAP_Transfer invokes the function) sets JTAG state to Select-DR-Scan
at first. It seems that CMSIS-DAP expects that JTAG state is in Run-Test/Idle
after initialization.
See also arm document. It is shown that all JTAG states.
This PR adds a state transition to Run-Test/Idle
. I had confirmed that this PR fixes the issue and JTAG works with our board.
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
Thanks a lot for these JTAG fixes! 😄