Why aren't my GPIO's changing with my code?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi all,

I'm using Broadcom's sample code almost exactly now, and before I was trying to run a linear resonant actuator (through a transistor) with my TAG dev board, now I'm just using a multimeter, and no matter what I do, I can't change the configuration of the pins and pull them high/low. I have gpio_configurePin(port,pin,GPIO_OUTPUT_ENABLE,GPIO_PIN_OUTPUT_HIGH/LOW) and gpio_setPinOutput(port,pin,GPIO_OUTPUT_HIGH/LOW), and nothing. Any ideas?

0 Likes
1 Solution
Anonymous
Not applicable

Did you remember to set up the GPIO pin here?

const BLE_PROFILE_GPIO_CFG contact_exchg_gpio_cfg =

{

    /*.gpio_pin =*/

    {

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

        GPIO_PIN_BUTTON,  // Button GPIO is configured to trigger either direction of interrupt

        GPIO_PIN_LED,     // LED GPIO, optional to provide visual effects

        GPIO_PIN_BATTERY, // Battery monitoring GPIO. When it is lower than particular level, it will give notification to the application

        GPIO_PIN_BUZZER,  // Buzzer GPIO, optional to provide audio effects

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

    },

    /*.gpio_flag =*/

    {

        GPIO_SETTINGS_WP,

        GPIO_SETTINGS_BUTTON | GPIO_BOTHEDGE_INT,

        GPIO_SETTINGS_LED,

        GPIO_SETTINGS_BATTERY,

        GPIO_SETTINGS_BUZZER,

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

    }

};

View solution in original post

0 Likes
4 Replies
Anonymous
Not applicable

Hello Zoltan,

Let me start you off on a few Forum posts:

Can someone tutor me on GPIO usage?

GPIO Flag Magic Numbers in bleprofile.h

Let me try to find more examples

Thanks

JT

0 Likes
VikramR_26
Employee
Employee
25 sign-ins 10 sign-ins 10 comments on KBA

zoltan99

Could you point to which GPIO's you are trying to  toggle ?

0 Likes
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

There is also an excellent new article here: GPIO usage in WICED Smart SDK written by one of our power users zhaohua

You may find this helpful, in addition toBCM2073XS GPIO Basics

0 Likes
Anonymous
Not applicable

Did you remember to set up the GPIO pin here?

const BLE_PROFILE_GPIO_CFG contact_exchg_gpio_cfg =

{

    /*.gpio_pin =*/

    {

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

        GPIO_PIN_BUTTON,  // Button GPIO is configured to trigger either direction of interrupt

        GPIO_PIN_LED,     // LED GPIO, optional to provide visual effects

        GPIO_PIN_BATTERY, // Battery monitoring GPIO. When it is lower than particular level, it will give notification to the application

        GPIO_PIN_BUZZER,  // Buzzer GPIO, optional to provide audio effects

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

    },

    /*.gpio_flag =*/

    {

        GPIO_SETTINGS_WP,

        GPIO_SETTINGS_BUTTON | GPIO_BOTHEDGE_INT,

        GPIO_SETTINGS_LED,

        GPIO_SETTINGS_BATTERY,

        GPIO_SETTINGS_BUZZER,

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

    }

};

0 Likes