This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

OUT register in NRF52832

What is the use of OUT register in NRF52832 data sheet ? It seem OUT register is affected by changing OUTSET and OUTCLR, Can you show with an example ?

Parents
  • When you write a value to the OUT register, all bits are changed to the value you write to it, this is what you are expecting from a register-write.

    The OUTSET register allows you to set only a selected set of bits in the OUT register. The OUTCLR register allows you to clear only a selected set of bits in the OUT register.

    OUT := 0x12345678   => OUT is now 0x12345678
    OUTSET := 0xF0000001 => OUT is now 0xF2345679
    OUTCLR := 0xFFFF0000 => OUT is now 0x00005679
    
Reply
  • When you write a value to the OUT register, all bits are changed to the value you write to it, this is what you are expecting from a register-write.

    The OUTSET register allows you to set only a selected set of bits in the OUT register. The OUTCLR register allows you to clear only a selected set of bits in the OUT register.

    OUT := 0x12345678   => OUT is now 0x12345678
    OUTSET := 0xF0000001 => OUT is now 0xF2345679
    OUTCLR := 0xFFFF0000 => OUT is now 0x00005679
    
Children
No Data
Related