Is it bug or specification? Wake up from the low power mode by RTC overflow interrupt.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Is it bug or specification? Wake up from the low power mode by RTC overflow interrupt.

跳至解决方案
1,194 次查看
yasuhikokoumoto
Senior Contributor I

Hi all,

I found a strange behavior which seems to be bug on FRDM-K20D50M board,
When Kinetis MCU wake up from the low power mode by RTC overflow interrupt, bit 28 of NVIC interrupt pending register (i.e. NVIC_ISPR0 and NVIC_ICPR0) will be set instead of bit 29. Although the interrupt enable (NVIC_ICER0) bit of the overflow interrupt is set, it will be ignored.
Therefore LLWU_ME should be assigned by the value of LLWU_RTCA_ME (i.e. 0x20) instead of LLWU_RTCS_ME (i.e. 0x80).

I think right way to set RTC overflow interrupt for wake up would be as following.
   enable_irq(LLWU_irq_no);
   enable_irq(RTCS_irq_no);
   LLWU_ME =LLWU_RTCS_ME;

However I actually set as following to work successfully.

   enable_irq(LLWU_irq_no);
   LLWU_ME =LLWU_RTCA_ME;

I would like to get comments from the Kinetis MCU (Kinetis K20 only?) designer.
For your information, even on FRDM-KL25Z, the situation was the same.

Best regards,

Yasuhiko Koumoto.

标签 (2)
0 项奖励
回复
1 解答
912 次查看
yasuhikokoumoto
Senior Contributor I

Hi all,

the following is my conclusion.

Both RTC overflow interrupt and RTC alarm interrupt use the common vector of RTC alarm.

RTC time seconds interrupt causes only by RTC_TSR change when RTC_IER[TSIE] is set.

Best regards,

Yasuhiko Koumoto.

在原帖中查看解决方案

0 项奖励
回复
1 回复
913 次查看
yasuhikokoumoto
Senior Contributor I

Hi all,

the following is my conclusion.

Both RTC overflow interrupt and RTC alarm interrupt use the common vector of RTC alarm.

RTC time seconds interrupt causes only by RTC_TSR change when RTC_IER[TSIE] is set.

Best regards,

Yasuhiko Koumoto.

0 项奖励
回复