53 views
in Embedded Wizard Studio by
Hey guys,

I am using Bezier Clock code example, everything works fine, But when I set the time of this month say for example RTC_DEFAULT_TIME =1702941840. Then the program doesn't run and I see a white screen. Can someone explain me why this happens and the solution?

I see that the program gets stuck at cyhal_rtc_write( &Rtc, &dateTime );

Looks like it is december that is causing the problem, whenever I set december as the month no matter which year, this occurs.

Update: So what I saw is that int tm_mon takes value from [​0​, 11], and the program is assigning 12 to it if December. So this is causing the error.

Thanks.

1 Answer

+1 vote
by
 
Best answer
Hi,

thanks for your message! It seems that cyhal_rtc_write() expects the months from 0...11 - but the current implementation in ew_bsp_clock.c provides the months from 1...12.

I just raised a ticket.

Due to the fact that this part is always provided as source code, it can be easily adapted.

Thanks and best regards,

Manfred.
by

Hey Manfred,

Thanks for the quick reply.

I tried to change the switch cases of CoreTime_getMonthName in Core.cm and removed "+1" in make time function, it does fix December but still causes some problem when it is Jan. Looks like this is because month is being used somewhere else and there is a change required to it too, quiet complicated to understand all the time and date calculation to perfect this all.

 I would really appreciate if you guys can fix the code asap and drop an update once done smiley

Thanks again!

 

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...