pyOCD icon indicating copy to clipboard operation
pyOCD copied to clipboard

coresight: Fix JTAG initialization sequence for CMSIS-DAP

Open kkitayam opened this issue 1 year ago • 1 comments

This patch fixes JTAG with CMSIS-DAP. CMSIS-DAP must be in Run-Test/Idle state after JTAG initialization.

The PR requires #1448

kkitayam avatar Sep 07 '22 08:09 kkitayam

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.

kkitayam avatar Sep 10 '22 11:09 kkitayam

/azp run

flit avatar Oct 22 '22 20:10 flit

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Oct 22 '22 20:10 azure-pipelines[bot]

Thanks a lot for these JTAG fixes! 😄

flit avatar Oct 22 '22 20:10 flit