cancel
Showing results for 
Search instead for 
Did you mean: 

PRIMASK bit always reading 0, unexpected behaviour when changed using debugger.

PWint
Associate III

I am writing an app to evaluate the STM32L433. I am using the RTC peripheral, setting an Alarm, and processing an interrupt on it.

During my development, I wanted to disable interrupts momentarily using the debugger. For this, I tried to modify PRIMASK but I realised it is always reading back 0x0.

I found that if I use the debugger to set PRIMASK to 0x1, then interrupts are disabled and my Alarm does not trigger. When I used the debugger to set it back to 0x0, I expected my interrupt to trigger since the correct flag is set in the ICPR1 register but this did not happen.

Should I be able to manipulate PRIMASK using the debugger? If I should, then why did my interrupt not trigger after changing PRIMASK back to 0.

0 REPLIES 0