I am programming a Nucleo-STM32H563ZI and get a problem while trying to get subseconds value in RTC.
Below is the main code:
unsigned prev_ssr = 0;
char print_buf[32] = { 0 };
unsigned this_ssr;
int count;
while (1)
{
this_ssr ...
@Peter BENSCHThanks for attention.I read the topic you mentioned. I get the knowledge that CR.BYPSHAD and ICSR.RSF work together to synchronize the 3 registers: SSR, TR, DR. Thank you for your information.The problem in that topic looks like the same...
There is something wrong in your code. For example, you should not call HAL_UART_Receive_IT in the main while loop.Maybe you should look at the example code from ST that shows you how to code with USART in interrupt mode.
You have only one uart, but you initialize it twice: MX_USART2_UART_Init();
/* USER CODE BEGIN 2 */
SEGGER_UART_init(250000);Note that "MX_USART2_UART_Init()" has initialized the uart with baudrate 115200.Then "SEGGER_UART_init(250000)" does thi...