Question
STM32L476 No GPIO->AFRL OR ->AFRH
Posted on August 02, 2017 at 01:35
Reference manual RM0351 STM32L4xx, section 8.4.9 and 8.4.10 GPIO registers AFRL and AFRH are not defined in the stm32l4xx.h file, except as __IO uint32_t AFR[2]; /*!< GPIO alternate function registers, Address offset: 0x20-0x24 */
so building will fail because GPIOx->AFRL or GPIOx->AFRH are not defined. GPIOx->AFR[0] gives me the low and ->AFR[1] gives me the high.