2020-01-27 04:02 AM
Hello All,
I am using Nucleo-F44rZE board. From my nucleo board, I want to send a new line char to my terminal which actually has to fee a line in terminal when it recieves it.
I have the following code, which actually prints 0A in my terminal instead of feeding a new line.
uint8_t nl = 0x0A; // ascii value for new line feed
HAL_UART_Transmit(&huart5, &nl, 1, 100); // Go to the next line
Please help to understand this behavior and find the solution for this.
2020-01-27 04:13 AM
Is your terminal printing in hex and not interpreting the ascii meaning of a character?
2020-01-27 06:23 AM
Your question makes sense, in my view.
@TH.16.336 What happens if you send other data values (0x31 => "1" or 0x42 => "B") ?
2020-01-27 07:42 AM
What Terminal application, in what mode?
Try different terminal software. Some will show CR LF info
Things like RealTerm have an ASCII, ANSI and HEX mode
2020-01-27 09:46 AM
As already asked, what "terminal" are you using?
What happens if you connect two instances of that terminal together (via a "null modem") ?
If you get the same behaviour (LF printing as "0A" instead of doing a line-feed) with that - then it's clearly an issue with your terminal, not the Nucleo!
Note that LF = Line Feed, and CR = Carriage Return - you may need both to get a new line ...
2020-01-27 10:08 PM
Hi Bonnes,
Yes it was printing in hex. when I switched to ASCII mode, the issue resolved. It was feeding the new line.
Thanks for the reply.
2020-01-27 10:10 PM
Yes it was printing in hex. I am using real term.
when I switched to ASCII mode, the issue resolved. It was feeding the new line.
Thanks for the reply.
2020-01-27 10:10 PM
Yes it was printing in hex. I am using real term.
when I switched to ASCII mode, the issue resolved. It was feeding the new line.
Thanks for the reply.
2020-01-27 11:06 PM
As informed, it's working in ASCII mode.
But the terminal evening printing the ASCII char of that value like LF or CR and then feeding a new line.
Is there any way to avoid printing it on terminal and just feed new line?
2020-01-28 12:55 AM
So this is a terminal configuration issue - nothing to do with the STM32 or Nucleo.
You need to correctly configure the terminal - RTFM for details.