I'm trying to do a small board using the STM32F412CE. I'm using HSI and also LSI to save space on the board (very size constrained). I have something working for the most part, but am having significant issues with time accuracy. Over a 120 second period micropython is only counting 104 seconds (ie >10% off). I realise the LSI is inaccurate but I'm surprised it is this inaccurate and am wondering if I have a setting wrong?
I have the below setup on the RTC:
Code: Select all
#define MICROPY_HW_RTC_USE_LSE (0)
#define MICROPY_HW_RTC_USE_US (0)
#define MICROPY_HW_RTC_USE_CALOUT (0)
I noticed the file linked below defines a value for LSI of 40KHz? This is incorrect according to the datasheet that suggests it runs around 32KHz. I tried updating this value but it made no difference.
https://github.com/micropython/micropyt ... onf_base.h
Any help on this would be really appreciated!
Thanks