Skip to content

Commit 7309bd9

Browse files
TacoGrandeTXCruz Monrreal II
authored andcommitted
Remove ITM from NRF52_DK and DELTA_DFBM_NQ620 targets
The NRF52_DK and DELTA_DFBM_NQ620 have the SWO pin (p0_18) mapped to LED2. This means that on startup LED2 turns on after the ITM is initialized which is confusing. Since most users want LED2 usage instead of SWO we remove the ITM for these targets. The nRF52 readme is updated to instruct users how to get SWO support if they need it.
1 parent 7a716b5 commit 7309bd9

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

targets/TARGET_NORDIC/TARGET_NRF5x/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,16 @@ The assert handler is defined in mbed-os/features/FEATURE_BLE/targets/TARGET_NOR
153153
* It is not possible to do an asynchronous write from flash and receive non-asynchronously at the same time since the non-asynchronous receive buffer is being used as the temporary transmission buffer.
154154
* The driver will flush the DMA buffer after a configurable timeout. During this process the UART will be halted and therefor unable to receive data. Hardware flow control should be enabled to avoid missing any data during this window.
155155

156+
#### Serial Wire Output (SWO)
157+
158+
On the nRF52832 pin 18 (p18 or p0_18) is the SWO pin and a GPIO pin. On the nRF52_DK and DELTA_DFBM_NQ620 targets p18 is also mapped to LED2, so the ITM has been removed from these targets to avoid contention. If you need SWO capability instead of LED2, add the ITM through ```mbed_app.json```:
159+
```
160+
"target_overrides": {
161+
"*": {
162+
"target.device_has_add": ["ITM"]
163+
}
164+
}
165+
```
156166

157167
## SoftDevice
158168

targets/targets.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6848,7 +6848,8 @@
68486848
"device_name": "nRF52832_xxAA",
68496849
"macros_add": [
68506850
"WSF_MAX_HANDLERS=10"
6851-
]
6851+
],
6852+
"device_has_remove": ["ITM"]
68526853
},
68536854
"SDT52832B": {
68546855
"inherits": ["MCU_NRF52832"],
@@ -6892,7 +6893,8 @@
68926893
"supported_form_factors": ["ARDUINO"],
68936894
"inherits": ["MCU_NRF52832"],
68946895
"release_versions": ["5"],
6895-
"device_name": "nRF52832_xxAA"
6896+
"device_name": "nRF52832_xxAA",
6897+
"device_has_remove": ["ITM"]
68966898
},
68976899
"MCU_NRF52840": {
68986900
"inherits": ["Target"],

0 commit comments

Comments
 (0)