4 Replies Latest reply on Jan 29, 2015 9:14 AM by clrac_2121416

    GPIO Interrupt State after Deep Sleep

    kilian.timmler@exelonix.com

      Hi,

       

      I would like to get some confirmation on the use of gpio_getPinInterruptStatus().

      My goal is to discover whether a GPIO line caused the BCM20737S to wake up from timed deep sleep or whether it was just time to wake up. While I'm able to find out whether I just came from POR or not, I'm not sure how I can make certain that a GPIO interrupt caused that wake up.

       

      The next best thing to try was using the following code:

       

      void

      xyz_create(void)

      {

       

        //blecm_configFlag |= BLECM_DBGUART_LOG;

        blecm_configFlag = 0;

       

        ble_trace1("Port Interrupt: 0x%x", gpio_getPinInterruptStatus(0, 2));

        ble_trace1("Port Interrupt: 0x%x", gpio_getPinInterruptStatus(0, 1));

       

        bleprofile_Init(bleprofile_p_cfg);

        bleprofile_GPIOInit(bleprofile_gpio_p_cfg);

        xyz_gpio_setup();

      ...

       

      This prints

      15:25:48 - Port Interrupt: 0x1

      15:25:48 - Port Interrupt: 0x0

      15:25:48 - 020106031900020b094d504c20446576

      15:25:48 - 696365

      15:25:48 - 020a04

       

      As I would have expected since I pulled P2 low for 32ms. Now I'm not sure whether it was meant to be used without initialization

      in a case like this. I hope you can help, because this would solve my problem, especially since the interrupt handler which I have to register first is not called in this case.

       

      Regards,

       

      Kilian