How to work with DWT in MCUXpresso?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to work with DWT in MCUXpresso?

920 Views
john71
Senior Contributor I

I want to use DWT

    void DWT_Init(void)
    {
       CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
        DWT->CYCCNT = 0;
        DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
    }

I get errors in the file. So I include #include "core_cm7.h" and I have no errors in the file but I have multiple errors in core_cm7.h when I try to compile. What header file should I include to work with DWT?

0 Kudos
Reply
1 Reply

838 Views
john71
Senior Contributor I

one should include "fsl_common.h"

0 Kudos
Reply