1 Reply Latest reply on Nov 6, 2019 2:23 AM by AnjanaM_61

    bleprofile_LED functions are not working

    NiVa_4337911

      Hi,

      I tried to use bleprofile_LED functions in find_me example, but ther are not woring. First configured GPIO as

       

      // Following structure defines GPIO configuration used by the application

      const BLE_PROFILE_GPIO_CFG find_me_gpio_cfg =

      {

          {

              GPIO_PIN_WP,                               // This need to be used to enable/disable NVRAM write protect

              GPIO_PIN_LED, -1, -1, -1,

              -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // Other GPIOs are not used

          },

          /*.gpio_flag =*/

          {

              GPIO_SETTINGS_WP,

              GPIO_SETTINGS_LED, 0, 0, 0,

              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

          }

      };

      where the GPIO_SETTINGS_LED is

      #define GPIO_SETTINGS_LED   (GPIO_OUTPUT | GPIO_INIT_HIGH | GPIO_LED)

      Then inside find_me_create function, added the following:

       

      gpio_configurePinWithSingleBytePortPinNum(GPIO_PIN_LED, GPIO_OUTPUT_ENABLE, GPIO_PIN_OUTPUT_HIGH);

       

      I am not sure the above step is required, because already configured in BLE_PROFILE_GPIO_CONFIG (but not as output).

       

      After these configurations, the following functions, bleprofile_LEDOff(), bleprofile_LEDOn() and bleprofile_LEDBlink() have no effects on LED. However, LED can be turn on/off using gpio_setPinOutput(0, GPIO_PIN_LED, GPIO_PIN_OUTPUT_HIGH/GPIO_PIN_OUTPUT_LOW) and without using BLE_PROFILE_GPIO_CFG.

       

      What was the wrong I did with BLE_PROFILE_GPIO_CFG?

       

      Thanking You.

      NV