STM32F3 and STM32F4 GPIO.

STM32F3 and STM32F4 GPIO.
STM32

An article about configuring STM32 pins was published on this site earlier; it was dedicated to the F1 series microcontrollers, although the article didn't say so explicitly. This article covers the F3 and F4 series microcontrollers. Before configuring any MCU pin, you must enable the clock for the corresponding port!!! Each MCU pin can be configured in one of the states. In...

STM32 BSRR VS ODR.

STM32

I think those reading this article know that you can write a one to bit zero of port A in two ways: GPIOA->ODR |= GPIO_ODR_ODR0; or GPIOA->BSRR = GPIO_BSRR_BS0; And everyone writes that the second way is more correct, because setting the bit is then atomic. That's hard to argue with. Now let's imagine a situation: we have an eight-bit bus over which data is transmitted, connected...