Fix ITM unlock

This commit is contained in:
Steve Evans 2021-10-07 01:42:17 +01:00
parent 42f2fc28e3
commit fb09cdb116
1 changed files with 3 additions and 1 deletions

View File

@ -67,8 +67,10 @@ void cycleCounterInit(void)
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
#if defined(DWT_LAR_UNLOCK_VALUE)
#if defined(STM32F7) || defined(STM32H7)
#if defined(STM32H7)
ITM->LAR = DWT_LAR_UNLOCK_VALUE;
#elif defined(STM32F7)
DWT->LAR = DWT_LAR_UNLOCK_VALUE;
#elif defined(STM32F3) || defined(STM32F4)
// Note: DWT_Type does not contain LAR member.
#define DWT_LAR