The following comment from os/hal/platforms/STM32/RTCv1/rtc_lld.c is incorrect:
Code: Select all
* @note Fractional part will be silently ignored. There is no possibility
* to change it on STM32F1xx platform.
There is a possibility to change it if the prescaler is less than 32767. If we allow the user to define a different prescaler for the application, then subsecond precision is available. It is then a fairly straightforward matter to make the conversion from tv_sec/tv_msec to and from the CNTH:CNTL register format (RTC clock ticks). The default functionality would be unchanged, but if the user defines the prescaler to less than 32767, then the time conversion to/from CNT register would be altered, giving subsecond precision.
I am willing to work on this if it sounds reasonable, Giovanni.