2024-07-03 12:40 AM
Currently i am working with nucleo-h743zi2 board. I set the Baud rate in CubeMx to 115200. In the Hercules program, when I set the baud rate to 115200, the data does not flow correctly, but when I set the baud rate to 38400, it flows correctly. Why might this problem occur? My CubeMx settings can also be seen in the photo.
2024-07-03 01:16 AM - edited 2024-07-03 01:35 AM
Hello,
Could you please share a minimal project that reproducers the issue?
Are you using USART3 and STLINK Virtual comport?
2024-07-04 12:37 AM
I solved the problem. I was using HSE as clock. When I looked at the UART documentation for this card, I saw that clocks such as HSI, LSE should be used instead of HSE. Indeed, when I changed the HSE, the problem disappeared and communication took place smoothly with the same baudrate on the transmitter and receiver sides. If anyone knows a way to use HSE here, please let me know.
2024-07-04 12:58 AM
Hello,
When I looked at the UART documentation for this card, I saw that clocks such as HSI, LSE should be used instead of HSE.
Where did you find this information? could you please share screenshot of that? because this doesn't make sense!
2024-07-05 01:42 AM
You can find it in the document in ST website which name is "STM32H7-Peripheral-USART interface (USART)". Write it google you will find this document. I attached the photo of the part where I solved my own problem.
2024-07-05 02:46 AM - edited 2024-07-05 02:55 AM
Hello,
Missing HSE in the documentation doesn't mean that HSE should not be used. So how did you select HSE for the USARt if you are using CubeMx? that doesn't make sense. The USART should not select HSE for it. So in that case how did you use HSE as clock source for USART?
For example the UART examples on the STM32H743I-EVAL board use HSE as source clock. So your issue is something else. You need to share your project.
From void SystemClock_Config(void):
static void SystemClock_Config(void)
{
.
.
/* Enable HSE Oscillator and activate PLL with HSE as source */
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.HSIState = RCC_HSI_OFF;
RCC_OscInitStruct.CSIState = RCC_CSI_OFF;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
Sorry, I need to unmark the solution untill the issue is well understood.
2024-07-05 04:15 AM
Before the problem is solved, i chose the HSE from the clock configuration in CubeMX. After i read the documentation, i chose the HSI clock and my problem is solved. Uart receiver and transmitter is working fine now. I dont change anything except this.
2024-07-05 04:27 AM
Could you please share your ioc file where you selected HSE as clock source?