aboutsummaryrefslogtreecommitdiff
path: root/stmhal/rtc.c
AgeCommit message (Collapse)Author
2017-09-06ports: Make new ports/ sub-directory and move all ports there.Damien George
This is to keep the top-level directory clean, to make it clear what is core and what is a port, and to allow the repository to grow with new ports in a sustainable way.
2017-08-30all: Convert remaining "mp_uint_t n_args" to "size_t n_args".Damien George
This is to have consistency across the whole repository.
2017-08-13all: Raise exceptions via mp_raise_XXXJavier Candeira
- Changed: ValueError, TypeError, NotImplementedError - OSError invocations unchanged, because the corresponding utility function takes ints, not strings like the long form invocation. - OverflowError, IndexError and RuntimeError etc. not changed for now until we decide whether to add new utility functions.
2017-07-31all: Use the name MicroPython consistently in commentsAlexander Steffen
There were several different spellings of MicroPython present in comments, when there should be only one.
2017-07-03stmhal: Clean up some header includes.Damien George
2017-05-06stmhal: Convert all module and method tables to use MP_ROM macros.Damien George
2017-01-04all: Consistently update signatures of .make_new and .call methods.Paul Sokolovsky
Otherwise, they serve reoccurring source of copy-paste mistakes and breaking nanbox build.
2016-04-17stmhal: L4: Modify rtc.c to support L4 MCU.Tobias Badertscher
2016-01-11py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.Damien George
The first argument to the type.make_new method is naturally a uPy type, and all uses of this argument cast it directly to a pointer to a type structure. So it makes sense to just have it a pointer to a type from the very beginning (and a const pointer at that). This patch makes such a change, and removes all unnecessary casting to/from mp_obj_t.
2015-12-04stmhal: Add rtc.init() method to force RTC to re-initialise.Damien George
2015-11-23stmhal: Implement delayed RTC initialization with LSI fallback.T S
If RTC is already running at boot then it's left alone. Otherwise, RTC is started at boot but startup function returns straight away. RTC startup is then finished the first time it is used. Fallback to LSI if LSE fails to start in a certain time. Also included: MICROPY_HW_CLK_LAST_FREQ hold pyb.freq() parameters in RTC backup reg MICROPY_HW_RTC_USE_US option to present datetime sub-seconds in microseconds MICROPY_HW_RTC_USE_CALOUT option to enable RTC calibration output CLK_LAST_FREQ and RTC_USE_CALOUT are enabled for PYBv1.0.
2015-11-07stmhal: Fix RTC code to work on the F7Dave Hylands
2015-11-06stmhal/rtc: LSx oscillator is only initialized upon initial power up.T S
Initial power up also includes VBAT. If LSE is configured but fails to start, LSI is used until next full power cycle. Also handles STM32F7xx variant.
2015-11-01stmhal: Add symbolic #defines for interrupt levels in irq.h.Dave Curtis
2015-10-30stmhal: f7: Fix recent RTC change to build on F7.Dave Hylands
2015-10-30stmhal: Make RTC init skip startup if LTE is already enabled and ready.Peter Hinch
This prevents the loss of RTC time when exiting from standby mode, since the RTC is paused while it is being re-inited and this loses about 120ms. Thanks to @chuckbook for the patch.
2015-10-20stmhal/rtc: Fix indentation to use spaces rather than tabs.Damien George
2015-10-20stmhal/rtc: Init uses YMD rather than backup register to detect powerup.Peter Hinch
2015-10-08stmhal: Fix RTC.wakeup so it correctly calculates WUT for large periods.Damien George
Thanks to Peter Hinch. Addresses issue #1488.
2015-10-06stmhal: In RTC.wakeup, fix setting of wucksel to get correct period.Damien George
Thanks to Peter Hinch. See issue #1490.
2015-07-30stmhal: Replace #include "stm32f4xx_hal.h" with #include STM32_HAL_H.Dave Hylands
2015-05-11sthmal/rtc.c: Add calibration() method to get/set RTC fine-tuning value.blmorris
2015-03-16stmhal: Add config option to use LSE/LSI for RTC.Damien George
Most boards (except the pyboard) don't have a 32kHz crystal so they should use the LSI for the RTC.
2015-03-15stmhal: Add rtc.wakeup method, to set wakeup timer.Damien George
This allows to wake from low-power modes at a regular interval. This method is preliminary, pending testing and API overhaul.
2015-01-01stmhal: Prefix includes with py/; remove need for -I../py.Damien George
2014-12-02stmhal: Move RTC HAL init functions to rtc.c, where they belong.Damien George
So can remove unnecessary stm32f4xx_hal_msp.c file.
2014-08-30Change some parts of the core API to use mp_uint_t instead of uint/int.Damien George
Addressing issue #50, still some way to go yet.
2014-07-03Rename machine_(u)int_t to mp_(u)int_t.Damien George
See discussion in issue #50.
2014-06-28stmhal: Include mpconfig.h before all other includes.Paul Sokolovsky
It defines types used by all other headers. Fixes #691.
2014-05-10stmhal: Fix setting of RTC: was BCD now BIN encoded.Damien George
Addresses issue #592.
2014-05-03Add license header to (almost) all files.Damien George
Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
2014-05-03Fix incorrect fix ;)Andrew Scheller
2014-05-03Updated doc fixAndrew Scheller
2014-05-03RTC doc fixAndrew Scheller
2014-05-03stmhal: Add example use to RTC doc; add rtc.c to gendoc.py.Damien George
2014-05-03stmhal: Add documentation for RTC class.Damien George
2014-04-21stmhal: Clean up rtc.c a bit.Damien George
2014-04-20stmhal: Add SPI class.Damien George
Also some updates to compile with latest changes to core py.
2014-04-19stmhal: Improve RTC class; make fatfs use RTC for time stamping files.Damien George
2014-03-15stmhal: Get RTC working.Damien George