Hi. I want to send an "int" with the HAL_UART_Transmit method. But the strange shapes that I added appear in the picture. Why could it be?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-23 06:31 AM
Hi. I want to send an "int" with the HAL_UART_Transmit method. But the strange shapes that I added appear in the picture. Why could it be?
Labels:
- Labels:
-
LPUART
-
UART-USART
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-23 06:33 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-23 06:51 AM
'%d' is not a string. Change it to "%d".
GCC provides a warning when you do this that you should have noticed:
../Core/Src/main.c:120:19: warning: multi-character character constant [-Wmultichar]
../Core/Src/main.c:120:19: warning: passing argument 2 of 'sprintf' makes pointer from integer without a cast [-Wint-conversion]
If you feel a post has answered your question, please click "Accept as Solution".