Write to Peripheral Registers

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Andreas Richter on Thu Jan 31 23:59:13 MST 2013

I'm rather new in the ARM-Cortex World, and I have a general Qustion for accessing Peripherals. Is it save to write to the same Peripheral register e.g. LPC_TIM0->MCR from both, an ISR and the Main program (both accessing different Bits of course). It would not be safe if the Compiler translates the modify instruction into:
- fetch value into register
- modify register
- write back register
I don't know if the ARM has the capability to mofify a memory value directly.
In that case it would be safe.

Regards Andreas