cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F030 multiple UART problems

ejongerius9
Associate
Posted on June 11, 2016 at 18:07

 

 

The original post was too long to process during our migration. Please click on the attachment to read the original post.
2 REPLIES 2
Posted on June 11, 2016 at 22:53

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ejongerius9
Associate
Posted on June 12, 2016 at 22:49

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.