Skip to content

Commit 4eb983d

Browse files
author
Marcus Chang
committed
Add more details to itm.md
1 parent fdb4638 commit 4eb983d

File tree

1 file changed

+3
-3
lines changed
  • docs/reference/contributing/target

1 file changed

+3
-3
lines changed

docs/reference/contributing/target/itm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ For targets with Arm CoreSight (for example, Cortex-M3 and Cortex-M4), the Instr
66

77
##### Defined behavior
88

9-
When initialized, writing data to the ITM stimulus registers results in the data being transmitted over the SWO line.
9+
When the ITM has been initialized (by the SerialWireOutput class or other application), writing data to the ITM stimulus registers will result in the ITM transmitting the data over the SWO line.
1010

1111
##### Undefined behavior
1212

@@ -25,8 +25,8 @@ Some SWO viewers do not allow an arbitrary frequency to be set. Make sure that t
2525
#### Implementing the ITM API
2626

2727
- You must implement the function `itm_init`. When the function is called:
28-
- The debug clock for the ITM must be initialized.
29-
- The SWO pin must be configured for debug output.
28+
- The function must initialize the debug clock for the ITM.
29+
- The function must configure the SWO pin for debug output.
3030
- You must add `ITM` to the `device_has` section in `target.json`.
3131

3232
It is not necessary to modify any of the ITM registers in `itm_init`, except for the one related to the clock prescaling, `TPI->ACPR`. The helper function `mbed_itm_init` is responsible for calling `itm_init` and initializing the generic ITM registers. `mbed_itm_init` only calls the function `itm_init` once, making it unnecessary to protect `itm_init` against multiple initializations.

0 commit comments

Comments
 (0)