stm32_common: unified RTC driver#6448
Conversation
|
Nice ! |
aabadie
left a comment
There was a problem hiding this comment.
Changes look good out there except a minor copyright thing. I'll try asap on the boards I have here and which cover most of the stm32 family.
cpu/stm32_common/periph/rtc.c
Outdated
| * Copyright (C) 2016 OTA keys S.A. | ||
| * Copyright (C) 2015 Lari Lehtomäki | ||
| * 2016 Laksh Bhatia | ||
| * 2016 OTA keys S.A. |
There was a problem hiding this comment.
Maybe 2016-2017 for OTA keys ?
|
Tested tests/periph_rtc on a few boards:
|
|
I opened #6462 about the crash with the nucleo-l1 which is already in master. |
| #include "periph/rtc.h" | ||
| #include "periph_conf.h" | ||
|
|
||
| #if defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32F2) || \ |
There was a problem hiding this comment.
Why not checking the stm32 F1 family ?
the stm32 F1 is not taken into account, why ? |
|
@aabadie the RTC is different on stm32f1 so this driver won't work |
|
ok, it makes sense. For the nucleo-l1, we have #6462 for keeping track of the problem (not introduced by this PR). |
|
and please squash ;) |
de246fe to
05475f9
Compare
|
Squashed |
|
@aabadie ACK holds? I see green lights!!! |
|
So go ! |
Hi,
This PR unify the stm32f0, f2, f3, f4 and l1 RTC driver.
The init behavior is changed a little bit to avoid resetting the counter if the RTC was already enabled.
According to this: http://www.st.com/content/ccc/resource/technical/document/application_note/7a/9c/de/da/84/e7/47/8a/DM00025071.pdf/files/DM00025071.pdf/jcr:content/translations/en.DM00025071.pdf
all these families share (almost) the same RTC.
Tested on f0 and f2 with tests/periph_rtc and default example. Compiled on f3, f4 and l1 (I modified some board to compile the RTC code) but as I don't have any board with these mcu I can't test.