6 Replies Latest reply on Sep 15, 2014 4:09 PM by seyhana_31

    gpio_keypad_enable not working if PF0 (GPIO_0) pin is used.


      i defined for my application 2 "custom" GPIOs:


      [WICED_GPIO_MYGPIO0] = {GPIOF,  0,  RCC_AHB1Periph_GPIOF},

      [WICED_GPIO_MYGPIO1] = {GPIOF,  1,  RCC_AHB1Periph_GPIOF},


      And i wanted to use them as keypad events so i did:


      static const gpio_key_t scan_button[] =


          {   .gpio     = WICED_GPIO_MYGPIO0,

              .polarity = KEY_POLARITY_HIGH




      and in the main application called


      opsuccess=gpio_keypad_enable(&ScanApControl_Keypad, WICED_HARDWARE_IO_WORKER_THREAD,scan_control_keypad_handler, 250, 2, scan_button );


         WPRINT_APP_INFO( ("IRQ SETUP OK !!\r\n") );
         WPRINT_APP_INFO( ("IRQ SETUP ERROR!!\r\n") );



      Than i declared the callback

      static void scan_control_keypad_handler(gpio_key_code_t keyCode, gpio_key_event_t event)



          if (event == KEY_EVENT_PRESSED


              WPRINT_APP_INFO( ("KEY EVENT TRIGGERED!!\r\n") );





      The problem is that if i do use WICED_GPIO_MYGPIO1 everything works smootly but if i use WICED_GPIO_MYGPIO0 i get "IRQ SETUP OK" but the callback is never triggered.


      Does anybody can explain why? Maybe a bug on interrupt masking of PF0 pin?


      Thanks for you support