This video succinctly describes why the read/modify/store has potential problems when it comes to interrupts. Very clear and understandable.
He uses the TI Stelarris Cortex-M4 as a teaching board and in the minute I linked above describes how that board was designed such that one can write to each GPIO bit or a group of bits as it were a single address using 256 different 32-bit registers.
I am following along with a blue-pill STM32F103C8T6 board and page 150 of the reference manual says:
Note: For atomic bit set/reset, the ODR bits can be individually set and cleared by writing to the GPIOx_BSRR register (x = A .. G).
Dave Welche's code does exactly this. It works exactly as expected and blinks the onboard LED.
My question then: Is there a way to do atomic writes to the blue-pill board in the way that's described in the video? Or is that each manufacturer handles this type of thing differently and in the case of the blue-pill ST has decided to use a single register to handle this?