This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Clear or Set NVIC Interrupts with NVIC->ICER[0] and ISER[0] causes error

When setting or clearing NVIC Interrupts without library functions the |= operator doesnt work. When I used it, all other interrupts were cleared.

The stm32F103 Datasheet says that the actual enable state can be read from both ICER or ISER register.

Doesnt work: (IR29 just an example):


NVIC->ICER[0] |= (1UL << 29)  // Disables all other interrupts too !!

.

Writing with = operator works:


NVIC->ICER[0] = (1UL << 29)  // Disables only Interrupt 29

.

Keil uvision 4.71.2.0