RTCv2 and stm32_registry.h

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
User avatar
lilvinz
Posts: 130
Joined: Sat Dec 21, 2013 2:56 pm
Has thanked: 1 time
Been thanked: 6 times

RTCv2 and stm32_registry.h

Post by lilvinz »

Hi again,

STM32L4xx has RTC periodic wakeups. This seems to be wrong in the stm32_registry.h.
While researching this, i wondered why all stm32 do have STM32_RTC_HAS_INTERRUPTS set to FALSE even though at least some do have interrupts. Also in rtc_lld.h STM32_RTC_HAS_INTERRUPTS is used to set if the driver supports callbacks but there seems to be no implementation of rtc_lld_set_callback().

Cheers

Vinz
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: RTCv2 and stm32_registry.h

Post by Giovanni »

Hi,

RTCv2s have their interrupt connected to EXTI, you need to use the EXT driver to handle the callback.

Giovanni
User avatar
lilvinz
Posts: 130
Joined: Sat Dec 21, 2013 2:56 pm
Has thanked: 1 time
Been thanked: 6 times

Re: RTCv2 and stm32_registry.h

Post by lilvinz »

Thanks, that makes sense.

Still stm32_registry.h for STM32L4xx has to be changed to

Code: Select all

#define STM32_RTC_HAS_PERIODIC_WAKEUPS      TRUE


Cheers

Vinz
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: RTCv2 and stm32_registry.h

Post by Giovanni »

Fixed, thanks.

Giovanni
Post Reply