How to work with DWT in MCUXpresso?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to work with DWT in MCUXpresso?

1,351 次查看
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 项奖励
回复
1 回复

1,269 次查看
john71
Senior Contributor I

one should include "fsl_common.h"

0 项奖励
回复