How to use printf and scanf using uart for stm32h7 boards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-01 12:09 AM
Hello,
I have been using the stm32h757i-eval board for a while. And I want to redirect the printf and scanf functions to the uart. I have referred the forum for the solution but couldn't find any helpful answers . I'm using stm32 cube ide (1.7.0).
Kindly help me to perform the same.
Solved! Go to Solution.
- Labels:
-
STM32CubeIDE
-
STM32H7 Series
-
UART-USART
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-01 12:15 AM
i guess you already tried this https://shawnhymel.com/1873/how-to-use-printf-on-stm32/
I never used a H7 board , i guess you issues come from having two M4 and M7 cores?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-01 12:15 AM
i guess you already tried this https://shawnhymel.com/1873/how-to-use-printf-on-stm32/
I never used a H7 board , i guess you issues come from having two M4 and M7 cores?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-01 5:11 AM
Thank you so much for your response @Javier Muñoz​
This article helps alot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-02 10:58 PM
I have tried the link you suggested @Javier Muñoz​ and configured my board exactly the way mentioned.
But I do not see anything being printed on my console.
I'm not sure if its the issue with dual cores, as according to my understanding you can configure individual cores.
Or if the issue is with my uart configuration.
Kindly help me with with my queries.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-03 12:17 AM
Show us how your Uart is configured, maybe post your code or something so we get a clear picture of your setup.
Quick question: are you using the correct USART1 port (pins PB14 and PB15)? (the one connected to your stm32h757i-eval's stlink)
https://www.st.com/resource/en/schematic_pack/mb1246-b0x_schematic.pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-03 12:59 AM
Hello @Aarra.1​ , you can also try with the STM32 step by step on the wiki.
The Step 3 explain how to print a debug message through UART.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-03 2:14 AM
Thank you very much for your response.
I was going wrong with the usart configuration and have solved the issue now.
