What is Read-modify-write?

A sequence that reads a value, changes part of it and writes it back. If interrupted midway, other changes can be lost.

Field: Embedded Systems & Firmware

Questions that mention Read-modify-write (1)

  1. While the main code updates a register bit with "reg |= mask;" (read-modify-write), an interrupt handler changes a different bit of the same register. Which pairs the possible problem with a fix correctly?

Related terms

Interrupt handler Interrupt Baud rate Bootloader Brown-out detection Contact bounce Debouncing Duty cycle GPIO Hard real-time

Back to the glossary