STM32L4 RTC interrupts ?

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

Moderator: RoccoMarco

Post Reply
geoffrey.brown
Posts: 122
Joined: Thu May 07, 2015 9:47 pm
Has thanked: 3 times
Been thanked: 18 times

STM32L4 RTC interrupts ?

Post by geoffrey.brown »

I can't seem to find the support for the RTC Alarm interrupts. In other threads there is some indication that these used to be handled (e.g. for the STM32F4) through the EXTI driver, but that doesn't seem to be the case anymore. How are RTC interrupts handled and where ? If not, what I need to touch for the shortest path to RTC interrupts.

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

Re: STM32L4 RTC interrupts ?

Post by Giovanni »

Hi,

The RTCv2 requires a change for alarms handling now that EXT is gone, in the meanwhile you may enable the RTC EXTI channel and handle the IRQ directly.

Giovanni
geoffrey.brown
Posts: 122
Joined: Thu May 07, 2015 9:47 pm
Has thanked: 3 times
Been thanked: 18 times

Re: STM32L4 RTC interrupts ?

Post by geoffrey.brown »

Thanks ! I had pretty much come to that conclusion, but wanted to make sure that was the simplest path.
Geoffrey
faisal
Posts: 382
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 45 times
Been thanked: 62 times

Re: STM32L4 RTC interrupts ?

Post by faisal »

So we would create a new OSAL_IRQ_HANDLER(VectorE4) [RTC Alarm as an example], and manipulate the NVIC and EXTI registers directly - or is there a cleaner way to do it with existing ChibiOS APIs?
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32L4 RTC interrupts ?

Post by Giovanni »

Hi,

Exactly that way, it should offer a callback just like RTCv1 does.

I would just add some kind of EXTIv1 mini-driver (macros basically) in order to not make drivers touch EXTI registers directly (PAL, RTC and possibly others).

Giovanni
Post Reply