2020-06-05 11:44 AM
Hello
I wrote UART sending command. I use cp210x from Silicon labs.
But i didnt see numbers in putty or termite .
Please tell me what is wrong ?
[url=https://hizliresim.com/dABfK1[/url]
My code:
My code:
#include "string.h"
char com_giden[50];
int ix = 0;
sprintf(com_giden,"merhaba dunya : %d\r\n",ix++);
HAL_UART_Transmit(&huart1,(uint8_t*)com_giden,strlen(com_giden),10);
my usb ttl:
HAL_Delay(500);
2020-06-05 03:58 PM
The most common issues with UART not working are probably incorrect clock settings and uninitialized or incorrectly initialized pins.
I don't see anything wrong with the code you posted. A logic probe can help debug things immensely.
2020-06-05 11:25 PM
Dear TDK
You are right. I had mistake in clock configuration.
I think that I dont find out how i have to set clock configuration.
Please see tthose pictures. and pls tell me what is wrongin clock settings. about pll clock.
This pic is sample setting for STM32F103C8T6:
[url=https://hizliresim.com/Pex4Ts[/url]
This picture UART is not working via clock configuration:
[url=https://hizliresim.com/OuI[/url]
This pictre UART is working perfectly:
[url=https://hizliresim.com/zC5ml9[/url]
Please advice me how can i set clock configuration .
sincerely.
2020-06-06 05:07 AM
Your images do not show up.
STM32CubeMX can be used to generate clock settings for you.