RTC Oscillator

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

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

Tabulous
Posts: 509
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 17 times

RTC Oscillator

Postby Tabulous » Tue Oct 03, 2017 8:06 am

Hi Gents,
as you may know some the STM32 range are quite sensitive to the type of crystal that can be used on the OSC32(LSE).

On the STM32F411 this is especially true, running a standard watch crystal with load capacitance's in the 20-30pf will not work. The F411 is design to use very low CL crystals, i.e. around 5pf. When these are running the signal is small, this is by design to ensure lowest power consumption etc.....

We hit this issue, and what it showed was, if you have LSE selected and it does not startup, the lld will sit in a while loop.......Sitting in a loop is not really an acceptable failure mode. So started to think what if.

So this has brought up a question, if there is a timeout to break the while loop, and if the startup of LSE has failed, fall back onto RTC running on LSI.
This way your system does not fail, the system can report the LSE failure. Yes the RTC may not be accurate but system not running is more important.

Whats the thoughts on this ?

KR

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: RTC Oscillator

Postby Giovanni » Tue Oct 03, 2017 8:25 am

The clock initialization code would require a significant rework. Probably it will be possible to implement this when a specific clock driver will be introduced.

You may add code the the "early startup" rountine in board.c in order to check the oscillator functionality before going through the normal clock initialization.

Giovanni


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 24 guests