2022-12-21 10:49 PM
2022-12-22 12:31 AM
"Correct" depends on context.
Generally, it's better to change output pins using the GPIOx_BSRR register, as it changes only those pins which you intend to change, leaving others untouched. But if you always change all output pins of one GPIO at once, using ODR is OK.
JW
2022-12-22 01:09 AM
Use BSRR to get the right way before implementing niche situations that won't likely copy paste next time. While not perfect, check HAL_GPIO functions to get familiar with interacting with HW registers. Then think multitask, interrupt, shared HW registers, volatility....
2022-12-22 08:27 PM
hi, i have checked BSRR .
16bit & 32bit
GPIOB->ODR = 0xFFFF; and GPIOB->BSRR = 0x0000FFFF; what is exact difference . which is faster .
which one deliver as parallels port output data .
correct me if i understood wrong .