Commit Graph

17 Commits (72c648ae62834db9109823de08d24f34b8fbb418)

Author SHA1 Message Date
jeromecoutant 72c648ae62 STM32 LOWPOWERTIMER : introduce LPTIM feature
STM32L0, L4, F7 and few F4 chip are supporting LPTIM feature.
We propose to allow user to use LPTIM for MBED LowPowerTimer API instead of using RTC wakeup timers.

By default, all targets that are supporting this feature have been configured.
2018-01-27 00:57:22 -06:00
jeromecoutant fd800caced STM32 : issue to exit deepsleep when RTC has not been initialized 2018-01-12 15:01:47 +00:00
jeromecoutant 990fb1c18a STM32 RTC : update and comment prescaler values 2017-12-20 16:05:43 +00:00
jeromecoutant 3264b21e40 STM32: RTC_LSI macro is replaced by lse_available config 2017-12-20 16:05:43 +00:00
jeromecoutant 8359253666 STM32 LOW_POWER_TIMER update : use error 2017-12-20 16:05:43 +00:00
jeromecoutant 3d3a83e99b STM32 LOW_POWER_TIMER update : rtc_init procedure 2017-12-20 16:05:43 +00:00
jeromecoutant 9b8ecab9a9 STM32 LOW_POWER_TIMER update : rtc_api.c
Add RSF synchro during init
Set a better WakeUp clock for long wake up period in order to stay in sleep mode
Use rtc_isenabled function before init as rtc_init is called at each set_time call
2017-12-20 16:05:43 +00:00
Jimmy Brisson 410ef0cc6c Merge pull request #5289 from LMESTM/test_api_ticker
STM32: RTC: Call irq_handler whenever interrupt fires
2017-10-13 09:28:18 -05:00
Laurent MEUNIER e15ebd3c53 STM32: RTC: Call irq_handler whenever interrupt fires
lp_ticker driver is the known registered user of RTC handler API.

In case, a lp_ticker is set in the past, the lp_ticker_fire_interrupt
will be called which itself sets the RTC interrupt as pending by calling
NVIC_SetPendingIRQ(RTC_WKUP_IRQn). This all happens without actual
programing of the RTC wake-up.

As a result the RTC HW and corresponding HAL layer doesn't expect an
interrupt to happen and will not call HAL_RTCEx_WakeUpTimerEventCallback.

To sove this situation, we will not use HAL_RTCEx_WakeUpTimerEventCallback
weak definition but rather call handler whenever an RTC interrupt fires.
2017-10-10 17:05:45 +02:00
bcostm 992722df2a Initialize State variable 2017-10-10 16:47:05 +02:00
bcostm c571d8d6f8 STM32 RTC: initializes structures 2017-10-10 16:23:35 +02:00
Sam Grove 547320e99c Rename function st_rtc_localtime with _rtc_localtime 2017-06-07 23:24:48 -05:00
Vincent Coubard f880e44145 remove usage of mktime/localtime in favor of dedicated functions.
The use of mktime was causing a fault when called in interrupt handler because on GCC it lock the mutex protecting the environment, To overcome this issue, this patch add dedicated routine to convert a time_t into a tm and vice versa.
In the process mktime has been optimized and is now an order of magnitude faster than the routines present in the C library.
2017-06-07 22:06:22 -05:00
Laurent MEUNIER 675d78d180 STM32 remove usage of deprecated MACROs 2017-05-09 16:48:34 +02:00
jeromecoutant 3a83fc8a21 STM32 RTC api minor update
Add more detailed information in comments
Issue with sunday corrected
Issue with wrong rtc_isenabled status corrected
2017-02-22 08:50:58 +01:00
jeromecoutant 2b4d83ef1e Run astyle 2016-12-21 16:54:19 +00:00
jeromecoutant ab28a5e5cb STM32: Refactor lp_ticker.c + rtc_api.c + sleep.c + rtc_api_hal.h files 2016-12-21 16:54:18 +00:00