Hello Dialog Team,
My board is basic DK.
I try to add buttion interrupt function which I found in 'reporter'project to DSPS project.
I add these functions:
void app_button_press_cb(void) {light up LED}
void app_button_enable(void)
also add driver:
wkupct_quadec.c
GPIO definition:
#define GPIO_BUTTON_PORT GPIO_PORT_0
#define GPIO_BUTTON_PIN GPIO_PIN_7
void app_button_enable() in this function:
wkupct_enable_irq(0x80, 0x80, 1, 2); // P0_7
But it didn't light up the LED.
Can you suggest some possible problems?
Thanks for your kindly reply.
Best Regards.
Device:
嗨过热,
You can disable sleep and check if the interrupt occurs. The led maybe its lit only for a short period of time and its out before you able to see it because of the periph_init() function execution in every wake up of the da (after every wake up the GPIOs are going to their default state).
Thanks MT_dialog
Hi Dialog Team,
Thanks for your reply.
If I disable sleep, can I still use wkupct interrupt?
Are there any demos for this application which is not using sleep mode for reference?
嗨过热,
Yes, you can use the wkupct interrupt, you can use SmartTag reference design and disable sleep from the da14580_config file, all the reference designs can operate without sleep just by un-define the CFG_EXT_SLEEP.
Thanks MT_dialog
Hi Dialog,
I have tried the methods you suggest.
I found that callback function isn't indicated when I press the button.
But when I use the same code in other demo, the callback function is indicated very soon.
Can you suggest the possible reason for this situation?
Thanks for your reply.
嗨过热,
Have you check the configuration of your pins and the pollarity that triggers the interrupt ?
Thanks MT_dialog