cancel
Showing results for 
Search instead for 
Did you mean: 

RTC Running only in Debug Mode

VijayRakeshM
Associate III

Hi,

I had generated RTC code for STM32L072CZ using cubemx, I'm reading the time and sending data via uart, when I'm in debug mode i can able to see the time via UART and when i stop debug mode then timer doesn't increment instead the initial value is transmitted continuously.

Thanks & Regards,

Vijay Rakesh.

while(1)
{
			 HAL_RTC_GetTime(&hrtc,&Time,RTC_FORMAT_BIN);
			 sprintf(Buff,"Time : %d:%d:%d\n",Time.Hours,Time.Minutes,Time.Seconds);
			 HAL_UART_Transmit(&huart2,(uint8_t *)Buff,strlen((const char*)Buff),500);
			 HAL_Delay(1000);
}

0 REPLIES 0