Non-atomic volatile reads cause corrupted multi-byte counters shared with ISR
Shared multi-byte counter shows torn reads An Arduino Uno sketch uses a volatile uint32_t counter incremented inside a pin-change ISR and read periodically in loop() for telemetry. The ISR executes in a few microseconds and the main loop prints the value every 100 ms. Despite volatile preventing register caching, occasional printed values show impossible jum