Skip to content

Commit

Permalink
Revised atomic: in debug sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
ReinhardKeil committed Jan 21, 2025
1 parent 4e85da3 commit 6c6abdd
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions docs/Experimental-Features.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,15 @@ The start of [debug sequences](https://open-cmsis-pack.github.io/Open-CMSIS-Pack
`blocks:` | | Content
:---------------------------------------------------------|--------------|:------------------------------------
`- info:` | Optional | Descriptive text to display for example for error diagnostics.
    `blocks:` | see Note | A list of command blocks in order of execution.
    `execute:` | see Note | commands for execution.
    `execute_atomic:` | see Note | commands for atomic execution.
    `blocks:` | Optional | A list of command blocks in the order of execution.
    `execute:` | Optional | Commands for execution.
    `atomic:` | Optional | Atomic execution of commands; cannot be used with `execute:`.
    `if:` | Optional | only executed when expression is true
    `while:` | Optional | executed in loop until while expression is true
    `timeout:` | Optional | timeout in milliseconds for while loop

!!! Note
- There must be only of these keys in a list node: `blocks:`, `execute:`, or `execute_atomic:`. The list order defines the order of execution.
- With `atomic:` set, the execution with no interrupts as fast as possible. With [CMSIS-DAP Atomic Commands](https://arm-software.github.io/CMSIS-DAP/latest/group__DAP__atomic__gr.html) are used. It has therefore restrictions and cannot be combined with `blocks:`.

Example: [debugPortSetup](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/debug_description.html#debugPortSetup)

Expand All @@ -278,7 +278,8 @@ sequences:
- if: isSWJ
blocks:
- if: hasDormant
execute_atomic: |
atomic:
execute: |
// Ensure current debug interface is in reset state
DAP_SWJ_Sequence(51, 0x0007FFFFFFFFFFFF);
Expand All @@ -301,7 +302,8 @@ sequences:
DAP_SWJ_Sequence(6, 0x3F);
- if: !hasDormant
execute_atomic: |
atomic:
execute: |
// Ensure current debug interface is in reset state
DAP_SWJ_Sequence(51, 0x0007FFFFFFFFFFFF);
Expand All @@ -312,7 +314,8 @@ sequences:
// Ensure JTAG interface is reset
DAP_SWJ_Sequence(6, 0x3F);
- execute_atomic: |
- atomic:
execute: |
// JTAG "Soft" Reset
DAP_JTAG_Sequence(6, 1, 0x3F);
DAP_JTAG_Sequence(1, 0, 0x01);
Expand All @@ -322,7 +325,8 @@ sequences:
- if: isSWJ
blocks:
- if: hasDormant
execute_atomic: |
atomic:
execute: |
// Ensure current debug interface is in reset state
DAP_SWJ_Sequence(51, 0x0007FFFFFFFFFFFF);
Expand All @@ -346,7 +350,8 @@ sequences:
DAP_SWJ_Sequence(3, 0x00); // At least 2 idle cycles (SWDIO/TMS Low)
- if: !hasDormant
execute_atomic: |
atomic:
execute: |
// Ensure current debug interface is in reset state
DAP_SWJ_Sequence(51, 0x0007FFFFFFFFFFFF);
Expand Down

0 comments on commit 6c6abdd

Please sign in to comment.