2019-11-08 09:12 PM
2019-11-08 10:49 PM
You can find the description of these registers in the reference manual.
2019-11-08 11:03 PM
Dear berendi
2019-11-09 01:56 AM
STM32 controllers can't be powered with 5V, they can take at most 3.6V, and usually powered with 3.3V.
You can connect pull-up resistors to the pins and set them to open-drain mode (set corresponding bits in GPIOA->OTYPER), as long as they are 5V tolerant - check the pin definitions table in the datasheet for that, PA4 and PA5 are NOT 5V tolerant, pick another pins instead.