modbusm rtc alarm irq disabled and it stopped responding after merge.
On merging to the bitbucket.org/nuttx/nuttx/ only the first poll of the sensors happened. Further polls failed.
On investigating, the rtc alarm interrupt never happened.
This change had been incorporated in the tip
https://bitbucket.org/nuttx/nuttx/pull-requests/80/efm32-lcp43-stm32-stm32l4-disable/diff
Once the following change was incorporated in the modbusm build it ran sucessfully for over 16horus.
--- tip\nuttx\arch\arm\src\stm32\stm32_irq.c
+++ update\nxoh4wk\nuttx\arch\arm\src\stm32\stm32_irq.c
@@ -313,7 +313,7 @@
for (i = 0; i < NR_IRQS - STM32_IRQ_FIRST; i += 32)
{
- putreg32(0xffffffff, NVIC_IRQ_CLEAR(i));
+ putreg32(0, NVIC_IRQ_CLEAR(i));
}
/ Colorize the interrupt stack for debug purposes /
Comments (3)
-
reporter -
reporter From greg: up_rtcinitialize() is called very early in the initialization since it is need to provided system time. It enables the RTC interrupt then. Unfortunately, this too early in the initialization. The interrupt subsystem is enabled later in intiailization in up_irqinitialize(). There the RTC interrupt is being disabled.
The fix is to enable ALARM interrupts later after the interrupt subsystem has been initializaed. https://bitbucket.org/nuttx/nuttx/commits/5a0f9fcb7d097ffbb5e45f956ed82cff087dddc1 Fixed anuttx tag nxwk17.6_nxoh4wk_work_ensy1b_20160724_1047
-
reporter - changed status to resolved
Checked on build NuttX 17.6 nxoh4wk_work_ensy1b_20160724_1213 arm ae1
- Log in to comment