was "chTimeNow() precision", now "RTC precision"

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

User avatar
russian
Posts: 368
Joined: Mon Oct 29, 2012 3:17 am
Has thanked: 16 times
Been thanked: 14 times

Re: was "chTimeNow() precision", now "RTC precision"

Post by russian »

Yes STM32_RTCSEL_LSI and yes LSE not fitted. I guess STM32_RTCSEL_HSEDIV is not an option for some reason, otherwise it probably would have be enabled by default?

chTimeNow is just a system variable read, why would it care for lock context?
Anyway I have enabled CH_DBG_SYSTEM_STATE_CHECK and with this option it seems like it hangs on "pwmStart(&TEST_PWMD, &pwmcfg);" call. I had no luck making chDbgPanic() function print the msg to USART and I still have to figure out a stable debug 'server' - that's a totally different subject I guess.
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: was "chTimeNow() precision", now "RTC precision"

Post by Giovanni »

The problem is that LSI is very inaccurate, this is why you see that difference. If you need an accurate RTC then you should fit on the discovery the 32768kHz crystal and the missing two capacitors.

Giovanni
Post Reply