[riot-notifications] [RIOT-OS/RIOT] cpu/stm32/rtc: add unlock/lock to rtc_clear_alarm (#15796)

Francisco notifications at github.com
Tue Jan 19 13:36:46 CET 2021


### Contribution description

#15628 (because a `rtc_clear_alarm` call was added to the test) exposed a bug on `stm32/rtc` where the RTC was not `locked`/`unlocked` when calling `rtc_clear_alarm`. This caused `tests/periph_rtc` to hang at least on `nucleo-f207zg`.

### Testing procedure

`BOARD=nucleo-f207zg make -C tests/periph_rtc flash test -j3`

```
main(): This is RIOT! (Version: 2021.04-devel-66-g7c12e-pr_rtc_lock_unlock)

RIOT RTC low-level driver test
This test will display 'Alarm!' every 2 seconds for 4 times
  Setting clock to   2020-02-28 23:59:57
Clock value is now   2020-02-28 23:59:57
  Setting alarm to   2020-02-28 23:59:59
   Alarm is set to   2020-02-28 23:59:59
  Alarm cleared at   2020-02-28 23:59:57
       No alarm at   2020-02-28 23:59:59
  Setting alarm to   2020-02-29 00:00:01

Alarm!
Alarm!
Alarm!
Alarm!
```

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/15796

-- Commit Summary --

  * cpu/stm32/rtc: add unlock/lock to rtc_clear_alarm

-- File Changes --

    M cpu/stm32/periph/rtc_all.c (8)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/15796.patch
https://github.com/RIOT-OS/RIOT/pull/15796.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15796
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210119/713eb351/attachment.htm>


More information about the notifications mailing list