We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 93056b8 + a7e61bb commit 0779932Copy full SHA for 0779932
1 file changed
libs/trace/include/orbcode/trace/dwt.h
@@ -197,6 +197,7 @@ extern "C"
197
void DWTSetup(const DWTOptions* options)
198
{
199
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk; // Enable ITM and DWT
200
+ DWT->LAR = 0xC5ACCE55; // Unlock DWT access via magic number
201
202
uint32_t ctrl = 0;
203
ctrl |= (options->FoldedInstructionCounterEvent ? 1 : 0) << DWT_CTRL_FOLDEVTENA_Pos;
@@ -265,4 +266,4 @@ extern "C"
265
266
267
#ifdef __cplusplus
268
}
-#endif
269
+#endif
0 commit comments