Unable to see watchpoint related register values at runtime

1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0



I am trying to read watchpoint register values at runtime  in SAML11(cortex-M23). I added the below code snippet  to my C program. I am getting zero as  output though the datasheet mentions 2. I can see value 2 in the I/O dialog box of atmel studio in debugging.  Not sure, if we can read these values at runtime like in cortex M4.


#define  ARM_DWT_CTRL   (*(uint32_t *)0xE0001000)

const size_t num_comparators = (ARM_DWT_CTRL>>28) & 0xF;
printf("\n\rNumber of watchpoint comparators supported =%d\n\r", num_comparators);

Register values can be found from the manual


Last Edited: Mon. May 23, 2022 - 12:52 PM