Part Number: MSP432P401R
Hi folks,
I would like to be able to use DWT->CYCCNT for some hardware-based timing during low-level initialization. However, it appears that the IAR Embedded Workbench automatically initializes the appropriate registers to enable up-counting of DWT->CYCCNT. When run without the debugger, however, this initialization does not take place, so DWT->CYCCNT does not increment.
Can someone please provide some example code to enable the DWT module and enable DWT->CYCCNT so that the cycle counter will run even when my code is running stand-alone, without a debugger or IDE attached to it?
Many thanks!