STM3220F-EVAL board serial driver example code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-03-29 12:06 PM
STM3220F-EVAL board serial driver example code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:30 AM
Where did you get the STM3230F-EVAL board?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:30 AM
Can't be profoundly different from the STM32F1xx examples with IAR/Keil.
Why don't you post what you have, and we'll see if there anything obviously wrong with it.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:30 AM
I can't post my driver because it is company IP but the USART is identical to the one on the STM32F1xx, but the GPIO setup is completely different. So I'm looking for the GPIO settings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:30 AM
I can't post my driver because it is company IP
And you want people here to share code with you, that's pretty rich. Nobody is asking for you to post your application, just enough demo or harness code for review.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:30 AM
Turns out the board documentation was wrong and that USART4 is the correct one. After making that change, serial now works. This issue can be closed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:30 AM
/* Enable Clock for GPIOC on AHB1 */
ENABLE_PERIPHERAL_CLOCK(AHB1, GPIOC);
/* Select Alternate function for USART3 pins */
//USART3_TX : MODER[21-20] PC10
//USART3_RX : MODER[23-22] PC11
temp = GPIO_READ(C, MODER);
temp &= 0xFF0FFFFF;
GPIO_WRITE(C, MODER, (temp | 0x00A00000));
/* Set output to max speed 50MHz */
temp = GPIO_READ(C, OSPEED);
temp &= 0xFFCFFFFF;
GPIO_WRITE(C, OSPEED, (temp | 0x00200000));
/* Set output to pull-up */
temp = GPIO_READ(C, PUPDR);
temp &= 0xFFCFFFFF;
GPIO_WRITE(C, PUPDR, (temp | 0x00100000));
/* Select Alternate Function 7 for USART3 pins */
//USART3_TX : AFRH[11:8] PC10
//USART3_RX : AFRH[15-12] PC11
temp = GPIO_READ(C, AFRH);
temp &= 0xFFFF00FF;
GPIO_WRITE(C, AFRH, (temp | 0x00007700));
/* Reset USART3 on APB1 */
RESET_PERIPHERAL(APB1, USART3);
/* Enable Clock for USART3 */
ENABLE_PERIPHERAL_CLOCK(APB1, USART3);
