2016-06-11 09:07 AM
2016-06-11 01:53 PM
With stack based local variables it is *critical* that you fully initialize them otherwise the contain random junk, and then the library will misconfigure the hardware.
So along with AF, you must set PP (Push Pull) and the pull-up/down/none setting 20. GPIO_InitStruct.GPIO_Pin = GPIO_Pin_9; 21. GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF; 22. GPIO_InitStruct.GPIO_OType = GPIO_OType_PP; 23. GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NONE; 24. GPIO_InitStruct.GPIO_Speed = GPIO_Speed_2MHz; 26. GPIO_Init(GPIOA, &GPIO_InitStruct); 27.2016-06-12 01:49 PM
Hi Clive1,
Thank you very much for your great response. Once again you point out some obvious things that didn't came up in my mind to look at. I'm testing now and everything seems to function as required.