Hi,
we are using the "old" IoT sensor with SDK5, ported to Murata ZY (DA14580).
The SDK uses the BMI160 for interrupts during operation (FIFO watermark for sensor readout) and during sleep (motion wakeup), e.g.
#ifndef BLE_APP_SENSOR_FUSION void config_da1458x_pin_intr_1_enable(void) { wrbl_env.wrbl_intr_1_cb = wkup_intr_1_cb; wkupct_register_callback(wrbl_env.wrbl_intr_1_cb); #ifdef USE_MAG_DRDY_INTR wkupct_enable_irq(0x0040, 0x0040, 1, 0); //active high #else wkupct_enable_irq(WKUPCT_PIN_SELECT(INT1_PORT, INT1_PIN), WKUPCT_PIN_SELECT(INT1_PORT, INT1_PIN), 1, 0); //active low #endif }
We want to use another GPIO as interrupt to execute a specific command, it should work during operation but also during sleep modes (hence we can not use the GPIO_EnabeIRQ).
My understanding is:
1) Multiple GPIOs can be configured as wakeup source.
2) For wkupct_enable_irq it is not possible to register different callback functions for different interrupt sources.
3) If wkupct_register_callback() is called multiple times throughout the code, the last registered callback will be used.
Correct?
Question:
4) Is there a register that I can read after waking up, telling me which pin was the interrupt source? Fromhttps://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl...I understand this is not possible?
5) But what about using NVIC_GetPendingIRQ? Aren't different interrupts assigned different IRQn?
--> I found out that they all use the same IRQn:
// datasheet.h WKUP_QUADEC_IRQn = 9, /* Combines the Wake up Capture Timer interrupt, the GPIO interrupt and the QuadDecoder interrupt */
BR Johannes
Hi gme_johannes,
Thanks for your question but you have already created a similar forum thread for you issue. I will reply you in the forum thread below. Please, try to not duplicate your posts on the forum.
https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/use-multiple-wkupctenableirq-different
Thanks, PM_Dialog
Apologies, I must have accidentaly created a copy of the thread instead of modifying my own text as intended. I have corrected it in my original post.
Please feel free to delete this thread.
BR Johannes
Hi gme_johannes,
No problem. It’s okay, so I leave it as it is! If you have any follow back questions, please update the other forum thread.
Thanks, PM_Dialog