d97rosz
02-23-2010, 05:19 AM
Hi,
We have added an external RTC (M41T83) to our newly developed PCB and connected it to GPIO 19 (alaram1=IRQ1) and GPIO 18 (alarm2=IRQ2).
When we configure the clock to run a periodic alarm on IRQ1 (GPIO 19) each seconds, and then monitors the pin (by adding GPIO-hook), we could see that the alarm is working.
@setHook(HOOK_GPIN)
def _gpioChangedState(pin, state):
print pin
print state
writePin(1,state)
Clock_ClearClockFlag()
But when we use the pinwakeupZIC2410.py code, the processor won't wake up, it is just hanged (or anyhow not responsive anymore). We don't even have to call the sleep function to hang the system, it is enough to call the wakeupOn function and then to start the external RTC, then it becomes unresponsive immediately. Then only way to make it responsive is by a hard-reboot (switch hardware off and then on).
The strange thing is that the pinwakeupZIC2410.py code worked well on the dev-board where we could wake the processor from sleep by pressing a push button. We also notice that the external RTC is working well since we could monitor what is happening on the GPIO 19.
(FYI - we use an external pull-up resistor and the GPIO will go low when RTC is activating the interrupt). We haven't yet tried the GPIO 18 but I assume that it will be the same problem. We have also tried both polarities on the wakeupOn with the same result.
So, the combination between starting the external RTC and the pinwakeupZIC2410 doesn't work correctly. Is there any setting in the wakeupOn that might be wrong or what could be the cause?
We have added an external RTC (M41T83) to our newly developed PCB and connected it to GPIO 19 (alaram1=IRQ1) and GPIO 18 (alarm2=IRQ2).
When we configure the clock to run a periodic alarm on IRQ1 (GPIO 19) each seconds, and then monitors the pin (by adding GPIO-hook), we could see that the alarm is working.
@setHook(HOOK_GPIN)
def _gpioChangedState(pin, state):
print pin
print state
writePin(1,state)
Clock_ClearClockFlag()
But when we use the pinwakeupZIC2410.py code, the processor won't wake up, it is just hanged (or anyhow not responsive anymore). We don't even have to call the sleep function to hang the system, it is enough to call the wakeupOn function and then to start the external RTC, then it becomes unresponsive immediately. Then only way to make it responsive is by a hard-reboot (switch hardware off and then on).
The strange thing is that the pinwakeupZIC2410.py code worked well on the dev-board where we could wake the processor from sleep by pressing a push button. We also notice that the external RTC is working well since we could monitor what is happening on the GPIO 19.
(FYI - we use an external pull-up resistor and the GPIO will go low when RTC is activating the interrupt). We haven't yet tried the GPIO 18 but I assume that it will be the same problem. We have also tried both polarities on the wakeupOn with the same result.
So, the combination between starting the external RTC and the pinwakeupZIC2410 doesn't work correctly. Is there any setting in the wakeupOn that might be wrong or what could be the cause?