libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
dwt.h File Reference
Include dependency graph for dwt.h:

Go to the source code of this file.

Macros

#define DWT_CTRL   MMIO32(DWT_BASE + 0x00)
 DWT Control register Purpose Provides configuration and status information for the DWT block, and used to control features of the block Usage constraints: There are no usage constraints. More...
 
#define DWT_PCSR   MMIO32(DWT_BASE + 0x1C)
 
#define DWT_COMP(n)   MMIO32(DWT_BASE + 0x20 + (n) * 16)
 
#define DWT_MASK(n)   MMIO32(DWT_BASE + 0x24 + (n) * 16)
 
#define DWT_FUNCTION(n)   MMIO32(DWT_BASE + 0x28 + (n) * 16)
 
#define DWT_LSR   MMIO32(DWT_BASE + CORESIGHT_LSR_OFFSET)
 
#define DWT_LAR   MMIO32(DWT_BASE + CORESIGHT_LAR_OFFSET)
 
#define DWT_CTRL_NUMCOMP_SHIFT   28
 
#define DWT_CTRL_NUMCOMP   (0x0F << DWT_CTRL_NUMCOMP_SHIFT)
 
#define DWT_MASKx_MASK   0x0F
 
#define DWT_FUNCTIONx_MATCHED   (1 << 24)
 
#define DWT_FUNCTIONx_FUNCTION   15
 
#define DWT_FUNCTIONx_FUNCTION_DISABLED   0
 

Functions

bool dwt_enable_cycle_counter (void)
 
uint32_t dwt_read_cycle_counter (void)