Can I use the STM32F4 BSRR with a 32 bit write to set/reset GPIO bits simultaneously?
I've defined the lower 8 bits of a STM32F4 GPIO port as a negative-true open-drain output. My current code uses two 16-bit writes, first to set all 8 bits, then another to selectively clear them. It would seem that I could do this with a single 32 bit write to BSRR by setting the 8 bit complement of the value to be written, and then clearing the bits specified by the value, all with a single write. I haven't tried this yet, but will it work?
In other words, if I want to output (negative logic) 0x12, I'd write 0x001200ed to BSRR.
