STM32F373 can't set GPIOB->AFRL for PB3 to USART
I'm using USART2 on PB3 and PB4 which means setting the AFR bits for those GPIO pins to 7. The CubeMX wizard and HAL GPIO libraries agree with this, but the AFR bits for PB4 stubbornly revert to 0 and my USART wont transmit. What is going on? I've tried my own code and the behaveiour doesn't seem any different. Using a data access breakpoint I can catch the expected writes and in the debugger I can set the AFR momentarily, but then it reverts. The lock register reads zero.
Is it a hardware issue?
