Using HAL_RTC in TouchGFX
Hello All,
forgive me if this as an obvious mistake but I'm completely new to TouchGFX. I'm using STM32 MPU, with Cube, FreeRTOS and TouchGFX
I have created a page in TouchGFX using the digital clock object, I have created a TickEvent to update the clock.
The Tick even is being called and if I put literal numbers into setTime24Hour, they are displayed correctly and can even be updated.
The RTC is used throughout the rest of the code and is working fine, the code complies without any warnings.
When I use the code (below) I only get 00:00:00 on the display
Any ideas?
All the best
Dren
*****************************
extern RTC_HandleTypeDef hrtc;
void PageView::handleTickEvent()
{
RTC_TimeTypeDef sTime;
if ( HAL_RTC_GetTime(&hrtc, &sTime, RTC_FORMAT_BCD) != HAL_OK )
Fatal_Error();
digitalClock1.setTime24Hour(sTime.Hours, sTime.Minutes, sTime.Seconds);
}
