2016-08-08 08:52 PM
All,
I believe that I have all my registers configured correctly for my I2C interface on the STM32F429ZIT6 but I have a question regarding the settings of the GPIO alternate function settings in GPIOx_AFRL and GPIOx_AFRH.1.) I want to have the alternate function of I2C3 enabled for PA8 (pin 100) and PC9 (pin 99).2.) When I call the following functions using the standard peripheral drivers GPIO_PinAFConfig(GPIOA, GPIO_Pin_8, GPIO_AF_I2C3); GPIO_PinAFConfig(GPIOC, GPIO_Pin_9, GPIO_AF_I2C3);I don't see the registers GPIOA_AFRL, GPIOA_AFRH, GPIOC_AFRL and GPIOC_AFRH get updated in the debugger. I just see all the bits remain zero's. I am looking int the debugger in AC6.Thanks for your thoughts. -Mike2016-08-08 09:20 PM
You need to use GPIO_PinSourceX (an index) and not GPIO_Pin_X (a mask), as the parameter to GPIO_PinAFConfig()
2016-08-09 07:00 PM
Thank you clive1! You were 100% correct! AF looks to be configured correctly now!
You are the best!-Mike