AnsweredAssumed Answered

STM32L476 No GPIO->AFRL OR ->AFRH

Question asked by john doe on Aug 2, 2017
Latest reply on Aug 2, 2017 by Clive One

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.

Outcomes