Nucleo-U031R8 UART examples do not work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-02 1:13 AM - last edited on ‎2025-04-02 1:17 AM by Andrew Neil
Hi to all.
I'm testing the Nucleo U031R8. To avoid the Package issue i switch also to the old package firmware version (1.0.0), but same error.
The example is UART_HyperTerminal_IT and i simple cloned (or compiled directly in the repository), then execute without cars sending on the virtual comm port.
The progran stuck in function "UART_CheckIdleState", because the timeout of function "UART_WaitOnFlagUntilTimeout" is set to 0x1FFFFFFU via macro.
Is my new board damaged or similar?
I've tried to rebuild the project via CubeMX (even in the recent 1.2.0 libs). No way.
Thanks.
Solved! Go to Solution.
- Labels:
-
STM32U0 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-07 11:11 PM
Did it, but nothing.
I tried playing with clock, changing the PLL and clocksourge (still in the examples).
Suddenly, everything work fine. Really donnow what happen. Never seen before (had abot 20+ Nucleos board).
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-02 1:17 AM
@TheRaprus wrote:To avoid the Package issue .
What "Package issue" ?
@TheRaprus wrote:The example is UART_HyperTerminal_IT .
Before adding the complexity of interrupts, can you get basic polled functions working?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-02 2:07 AM
Here the package issue:
https://community.st.com/t5/stm32cubemx-mcus/package-error-when-importing-examples-of-nucleo-u031r8/td-p/753894
So, i tried the previous library.
Concerning the 2nd question, the stuck occour in the MX_USART2_UART_Init() function, a couple of codeline below the SystemClock_Config().
The stack is this:
MX_USART2_UART_Init() -> HAL_UART_Init -> UART_CheckIdleState(...)
MX_USART2_UART_Init() is defined in the main.c example (attached), the other two are stm32u0xx* library.
In this point the program stuck unsing both library: 1.0.0 and the latest 1.2.0
Here, in UART_CheckIdleState the program wait for the timeout.
I don't touch the example, simply connect the board, compile ad (try to) run. This is why I presume an HW error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-02 12:27 PM
Might be a clock issue. Upload your IOC file.
TimerCallback tutorial! | UART and DMA Idle tutorial!
If you find my solution useful, please click the Accept as Solution so others see the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-07 11:11 PM
Did it, but nothing.
I tried playing with clock, changing the PLL and clocksourge (still in the examples).
Suddenly, everything work fine. Really donnow what happen. Never seen before (had abot 20+ Nucleos board).
Thanks
