I'm trying to set two alarms with the RTC. I'm currently using CYBLE-416045-EVAL EZ-BLE.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KyWe_1936431
Level 2
Level 2
Welcome!

Hello,

I figured out with the example code PSoC 6 MCU – MCWDT and RTC Interrupts (Dual CPU) how to set an alarm that goes to the function Cy_RTC_Alarm1Interrupt() and now copied it down so I could use Cy_RTC_Alarm2Interrupt() with a different alarm. I can only have one alarm active at a time and I believe its due to Cy_RTC_SetInterruptMask(CY_RTC_INTR_ALARM2) disabling the alarm 1 interrupt. Is there a way I can use the RTC to have 2 different alarms with two different interrupts?

Thank you,

Kyle

0 Likes
1 Solution
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi,

You can use Cy_RTC_SetInterruptMask(CY_RTC_INTR_ALARM1 | CY_RTC_INTR_ALARM2) to use both alarms.

>> Is there a way I can use the RTC to have 2 different alarms with two different interrupts?

Since there is only one RTC interrupt it will only take care of both you just have to OR the masks.

Regards

Alakananda

Alakananda

View solution in original post

0 Likes
1 Reply
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi,

You can use Cy_RTC_SetInterruptMask(CY_RTC_INTR_ALARM1 | CY_RTC_INTR_ALARM2) to use both alarms.

>> Is there a way I can use the RTC to have 2 different alarms with two different interrupts?

Since there is only one RTC interrupt it will only take care of both you just have to OR the masks.

Regards

Alakananda

Alakananda
0 Likes