5 Replies Latest reply on Sep 9, 2018 9:28 PM by YoCh_2286961

    Deep Sleep mode

    YoCh_2286961

      Hello Supporter,

       

      When entering and then exiting from Deep Sleep Mode, P30 is read abnormally.

      The conditions that occur are :

           Step 1. Exit from Deep Sleep by High value on P30.

           Step 2. Maintain Step1 for 2 ~ 3 seconds

           Step 3. Low Value On P30

           Step 4. Read the value of P30. --> The value is read as High instead of Low.

      If use P37 instead of P30, it works normally.

      I want to know why this is happening on the P30.

       

      Below is a part of the code.

      void mesh_app_init(wiced_bool_t is_provisioned)

      {

           ........

           wiced_hal_gpio_configure_pin( WICED_P30, GPIO_EN_INT_RISING_EDGE, GPIO_PIN_OUTPUT_LOW );

       

           wiced_init_timer(&app_aaa_timer, &mesh_app_aaa_timer_callback, 0, WICED_MILLI_SECONDS_PERIODIC_TIMER);

           wiced_start_timer(&app_aaa_timer, 1000);

      }

       

      void mesh_app_aaa_timer_callback(uint32_t arg)

      {

           WICED_BT_TRACE("*** AAA Value : %x\n",wiced_hal_gpio_get_pin_input_status(WICED_P30));

           if(wiced_hal_gpio_get_pin_input_status(WICED_P30) == 0)

           {

                wiced_hal_gpio_configure_pin( WICED_P30, GPIO_EN_INT_RISING_EDGE, GPIO_PIN_OUTPUT_LOW );

                wiced_hal_gpio_register_pin_for_interrupt( WICED_P30, aaa_interrrupt_handler, NULL );

                wiced_power_save_start( WICED_WAKE_SOURCE_ALL, 30000); //Deep Sleep Mode

           }

      }

       

      void aaa_interrrupt_handler(void *data, uint8_t port_pin)

      {

           WICED_BT_TRACE("aaa_interrrupt_handlerPin:%d\n",port_pin);

           WICED_BT_TRACE("AAA Detect : %d\n",wiced_hal_gpio_get_pin_input_status(WICED_P30));

       

           // Clear interrupt

           wiced_hal_gpio_clear_pin_interrupt_status(WICED_P30);

      }

       

      Best regards,

      YH Choi