cortexm.c: Fix DWT Mask (#516)

See #513
This commit is contained in:
UweBonnes 2019-09-04 13:28:55 +02:00 committed by GitHub
parent 00937348b3
commit 6663da7ff5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -144,10 +144,12 @@ extern long cortexm_wait_timeout;
#define CORTEXM_FPB_CTRL_KEY (1 << 1)
#define CORTEXM_FPB_CTRL_ENABLE (1 << 0)
/* Data Watchpoint and Trace Mask Register (DWT_MASKx) */
#define CORTEXM_DWT_MASK_BYTE (0 << 0)
#define CORTEXM_DWT_MASK_HALFWORD (1 << 0)
#define CORTEXM_DWT_MASK_WORD (3 << 0)
/* Data Watchpoint and Trace Mask Register (DWT_MASKx)
* The value here is the number of address bits we mask out */
#define CORTEXM_DWT_MASK_BYTE (0)
#define CORTEXM_DWT_MASK_HALFWORD (1)
#define CORTEXM_DWT_MASK_WORD (2)
#define CORTEXM_DWT_MASK_DWORD (3)
/* Data Watchpoint and Trace Function Register (DWT_FUNCTIONx) */
#define CORTEXM_DWT_FUNC_MATCHED (1 << 24)