This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Am I missing something in setting up GPIO ports?

Hi!  I am using the 52840-DK dev board.  

I want to use two pins, P1.0 and P1.1 as GPIO output pins.

In my code I have;

nrf_gpio_cfg_output(BLE_CONNECTED);
nrf_gpio_pin_clear(BLE_CONNECTED);
nrf_gpio_pin_set(BLE_CONNECTED);
nrf_gpio_pin_clear(BLE_CONNECTED);
nrf_gpio_pin_set(BLE_CONNECTED);
nrf_gpio_pin_clear(BLE_CONNECTED);

I go to this code and breakpoint, then I step over each call and observe the wires with an oscilloscope.

I see the wire go high or low when the set or clear is run, but then the signal goes back to floating.

Is there some interference between the debugger and the GPIO?  

I have disabled GPIOTE features in sdk_config, thinking that might have interfered.

I must be missing something.

-Ben Burch

BTR Controls, Inc.

Related