Commit Graph

35 Commits (082ba151ac39262e42775f066581ef0f787160bb)

Author SHA1 Message Date
Martin Kojtal d28d13cc9b
Merge pull request #7790 from jeromecoutant/PR_LPTICKER_RTC
STM32 LPTICKER : RTC wake up timer is reset before setting a new one
2018-08-22 14:04:58 +02:00
jeromecoutant a0fa0b6a5a STM32 RTC : remove compilation warning with unused variable 2018-08-14 14:00:25 +02:00
jeromecoutant e455d74f3d STM32 : Sunday value is different for STM32F1 2018-08-13 17:04:56 +02:00
jeromecoutant 1052993236 STM32 RTC : bypass shadow registers
- RTC_SSR for the subseconds
- RTC_TR for the time
- RTC_DR for the date

These registers were accessed through shadow registers which are synchronized with PCLK1 (APB1 clock).
They are now accessed directly in order to avoid waiting for the synchronization duration.
2018-07-11 10:08:02 +02:00
jeromecoutant 433ba46132 TARGET_STM astyle 2018-06-27 14:21:07 +02:00
jeromecoutant e3deaecc27 STM32 LPTICKER update for targets supporting RTC 2018-05-25 12:29:54 -05:00
jeromecoutant 39a9801675 STM32 LPTICKER : clean include file 2018-05-25 12:29:54 -05:00
jeromecoutant 1c4174d3eb STM32 RTC Init minor update 2018-05-25 12:26:05 -05:00
Bartek Szatkowski 6e9f04bf2f Rename DEVICE_LOWPOWERTIMER to DEVICE_LPTICKER
That's to match DEVICE_USTICKER.
2018-05-25 12:20:09 -05:00
jeromecoutant 7b5a79f56e STM32 RTC Init minor update 2018-04-24 13:50:57 +02:00
Cruz Monrreal d7dfab5c7e
Merge pull request #6370 from jeromecoutant/PR_LPT_RTC_OPTIM
STM32 LPTICKER : optimize RTC wake up timer init
2018-03-20 14:19:07 -05:00
jeromecoutant 882f3312c3 STM32 LPTICKER : optimize RTC wake up timer init
Division in a while loop is removed
2018-03-15 14:23:57 +01:00
jeromecoutant 2f86b3a7bb STM32 RTC init
When LSE is configured for RTC, LSI is not affected
2018-03-14 11:12:29 +01:00
jeromecoutant 961c8da51c STM32F1 RTC : Date read after reset
F1 is the only STM32 family where RTC date is not saved into registers
2018-02-27 11:02:49 +01:00
jeromecoutant 45cbdc889f STM32 RTC : update free function
- LSI specific implementation is removed

- Remove RTC clock disable
2018-02-27 10:45:43 +01:00
jeromecoutant 9fb865ae57 STM32 LPT optimisation 2018-01-16 15:16:13 +01:00
jeromecoutant a816e93e9a 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-09 14:10:14 +01:00
jeromecoutant 8c662132f4 STM32 : issue to exit deepsleep when RTC has not been initialized 2017-12-21 10:50:47 +01:00
Martin Kojtal be52ba2156
Merge pull request #5363 from mprse/extended_rtc
Add support and tests for extended RTC
2017-12-12 17:36:44 +00:00
jeromecoutant 17a54840c7 STM32 RTC : update and comment prescaler values 2017-12-05 12:52:52 +01:00
Przemyslaw Stekiel 106561669f Update RTC drivers for extended RTC. 2017-12-05 07:54:02 +01:00
jeromecoutant 01b2b1baf3 STM32: RTC_LSI macro is replaced by lse_available config 2017-12-04 17:35:31 +01:00
jeromecoutant 354ed44a65 STM32 LOW_POWER_TIMER update : use error 2017-12-04 17:35:30 +01:00
jeromecoutant 85c337d0b9 STM32 LOW_POWER_TIMER update : rtc_init procedure 2017-12-04 17:35:29 +01:00
jeromecoutant 0bf364ea55 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-04 17:35:28 +01: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