diff options
author | Damien George <damien.p.george@gmail.com> | 2020-01-07 23:59:29 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-01-07 23:59:29 +1100 |
commit | e3187b052f14872fdb5e2d2338d359013a544fae (patch) | |
tree | abd2950849e31413abfc6d96827811adbb5ec952 | |
parent | 54a2584de10103ba3e559de1034cc76962ec681e (diff) |
stm32/boards/PYBD: Change RTC asynch prediv from 1 to 4.
This change has the following effects:
- Reduces the resolution of the RTC sub-second counter from 30.52us to
122.07us.
- Allows RTC.calibration() to now support positive values (as well as
negative values).
- Reduces VBAT current consumption in standby mode by a small amount.
For general purpose use 122us resolution of the sub-second counter is
good enough, and the benefits of full range calibration and minor reduction
in VBAT consumption are worth the change.
-rw-r--r-- | ports/stm32/boards/PYBD_SF2/mpconfigboard.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/stm32/boards/PYBD_SF2/mpconfigboard.h b/ports/stm32/boards/PYBD_SF2/mpconfigboard.h index 4ce17abd8..757dacf9a 100644 --- a/ports/stm32/boards/PYBD_SF2/mpconfigboard.h +++ b/ports/stm32/boards/PYBD_SF2/mpconfigboard.h @@ -56,8 +56,8 @@ void board_sleep(int value); #define MICROPY_HW_FLASH_LATENCY (FLASH_LATENCY_3) // There is an external 32kHz oscillator -#define RTC_ASYNCH_PREDIV (0) -#define RTC_SYNCH_PREDIV (0x7fff) +#define RTC_ASYNCH_PREDIV (3) +#define RTC_SYNCH_PREDIV (0x1fff) #define MICROPY_HW_RTC_USE_BYPASS (1) #define MICROPY_HW_RTC_USE_US (1) #define MICROPY_HW_RTC_USE_CALOUT (1) |