STM32F030 multiple UART problems
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-06-11 9:07 AM
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.
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-06-11 1:53 PM
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..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-06-12 1:49 PM
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.