2023-11-24 05:54 AM
I am trying to write something using printf with STM32-nucleo-h743zi board, windows 10. I can run programs that make a led turn on, and make connections via uart and all the things, but when i open tera term or Putty, i can not see any word in there.. I link my nucleo with other stm32 chip to do other stuff and it works via uart, but nothing about writing in Tera term or Putty.
My COM configuration is ok for sure, and i use the same baud that is written in my code.
I just use this method, i saw this tutorial: https://community.st.com/t5/stm32-mcus/how-to-redirect-the-printf-function-to-a-uart-for-debug-messages/ta-p/49865
I saw different videos in youtube and all the people do it in the same way.
I connect my board using USB. It must be simple, but i can't reach this thing...
Any suggestions??
Thank you.
Solved! Go to Solution.
2023-11-28 05:52 AM
Well, you don't see anything via Putty or Teraterm because you parameterised USART3 correctly (asynch, 115200 Bits/s, etc) but accidentally stumbled over the pin multiplexing. In the STM32H743, PB11/PB10 is unfortunately selected as the default for USART3 RX/TX, but in the NUCLEO-H743ZI (MB1364) PD9/PD8 are connected to T_VCP_RX/_TX via SB12/SB19. So the USART3 permanently writes the data to the TX channel - but you have checked on a different TV channel... :smiling_face_with_smiling_eyes:
Solution: simply remap the alternative pins for USART3_RX/TX in the CubeMX overview of the STM32H743ZITx as described in UM1718, section 4.45:
To manually remap a function to another pin, follow the sequence below:
...i.e. drag them one after the other to PD9/PD8.
Hope that helps?
Regards
/Peter
2023-11-24 06:28 AM
Welcome @rubenles, to the community!
The Knowledge base article mentioned uses USART2 - your NUCLEO-H743ZI uses USART3. Have you perhaps forgotten to adjust this?
Regards
/Peter
2023-11-26 10:38 PM
Hi! I am trying to fix it... I created a new project just using the things i need to do this.
So first i make a new project in stm32cubemx, i choose my board, then i go to connectivity and i configure it like in the photo:
Then i generate code, i write between /* USER CODE BEGIN 3 */ and /* USER CODE END 3 */ the next lines:
Then i build my project, open tera term clicking on new connection with the same baud as in the upper photo here and nothing appears in the screen...
What am i doing wrong?
Thank you!
2023-11-27 12:16 AM - edited 2023-11-27 12:21 AM
Well, you haven't posted an IOC file, so you can't see where the error might lie.
By the way, you can also insert source code instead of screenshots if you click on the three dots in the text field at the top right and select </>.
I have thrown your three lines of code into an otherwise empty project for a NUCLEO-F767ZI as a test - it works, both with Teraterm and other terminal programs if you have selected the correct port (STMicreoelectronics STLink Virtual COM Port):
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
uint8_t Test[] = "Hello World!\r\n"; // should be placed in the block PV
HAL_UART_Transmit(&huart3, Test, sizeof(Test)-1, 10);
HAL_GPIO_TogglePin(LD1_GPIO_Port, LD1_Pin); // make the while loop visible via LD1
HAL_Delay(1000);
}
/* USER CODE END 3 */
There are two notes on this, but they do not change the fact that it works in principle:
Regards
/Peter
2023-11-27 12:48 AM - edited 2023-11-27 12:49 AM
2023-11-27 01:29 AM - edited 2023-11-27 01:29 AM
> By the way, you can also insert source code instead of screenshots if you click on the
> three dots in the text field at the top right and select </>.
@Peter BENSCH the "insert source code" thingy should be in the first line in a forum where lots of code is posted, that's really annoying that it isn't. Especially the new people here never find this...
Could you please foward that?!
Sorry for OT...
2023-11-27 07:55 AM
Thanks, @LCE, that's exactly what we've been rebuilding for some time.
Regards
/Peter
2023-11-27 10:33 PM
Am i doing something wrong in the forum? @Peter BENSCH @LCE
2023-11-27 10:46 PM
No, the forum itself could do better! ;)
2023-11-28 12:06 AM
Any more recommendations that i can see anything getting out from Putty or Tera term?? I have no idea what to do :(