Skip to main content
4 events
when toggle format what by license comment
Oct 1, 2023 at 9:20 comment added Tirdad Sadri Nejad @CassieSwett The BSRR high 16 bits work the same as BRR. However the BRR still provides the same functionality without using a right shift.
Sep 30, 2023 at 20:01 comment added Sophie Swett According to my copy of the reference manual, BRR and BSRR do both exist. However, it's not necessary to use the BRR register. As the name implies, the BSRR register (bit set/reset register) can be used both for setting bits and resetting bits; you can turn some outputs on and others off in a single operation. For example, if you want to turn outputs 0 and 2 off, and turn outputs 1 and 3 on, then you can write 0x0005000A to the BSRR register.
Sep 30, 2023 at 17:46 comment added Justme BRR and BSRR may not be two separate members of GPIO struct any more. That would at least not compile on my latest STM32 project which uses a single 32-bit struct member to access the 32-bit IO port directly - because you may want to atomically set and clear things on a single 32-bit write.
Sep 30, 2023 at 17:22 history answered Tirdad Sadri Nejad CC BY-SA 4.0