A problem about wakeup timer

2 posts / 0 new
Last post
LiangZheng2k
Offline
Last seen:4 months 6 days ago
加入:2015-01-06 09:03
A problem about wakeup timer

Hi, dialog,
I'm using da14580 and an external ADC chip. They are connected by SPI and an interrupt pin. The host is in extended sleep mode. And it gets data from ADC chip when interrupt occurs. The ADC generates interrupt at rate of 250 samples per second. During the host waking up time, all the things are fine. Callback function set by GPIO_EnableIRQ and GPIO_RegisterCallback is called correctly. As everyone knows, GPIO IRQ won't work during sleep. I used wkupct_enable_irq to configure the ADC interrupt as a wakeup event in function app_sleep_entry_proc. And in function app_sleep_exit_proc, it calls wkupct_disable_irq to remove interrupt event. As a result, it works well most of time. But, wakeup failure happens occasionally. Please refer to the attachment below. According to the waveform and codes of arch_main.c, the reason leads to wakeup failure probably is the initial status of interrupt pin the moment when host enters sleep. In my design, the interrupt is falling edge valid. And polarity of wkupct_enable_irq is configured to low. If the interrupt pin goes low after GLOBAL_INT_STOP() is called and before host enters sleep, wakeup failure will happen. How to deal with this problem? Thanks a lot.

Keywords:
Device:
MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi LiangZheng2k,

Hi LiangZheng2k,

You mean that sometimes the interrupt pin is low when the the da goes to sleep so it stays low and when the spi device pulls the pin to low the interrupt never occurs ? Have you try to set your interrupt pin in INPUT_PULLUP configuration ? That way the pin should stay high when the da falls to sleep.

Thanks MT_dialog