nrf52840 dongle PCA10059 GPIO Out LED

I am trying to get an LED attached to GPIO to turn on. I have tried all documented methods I could find but with no success. I have no issue controlling the onboard LEDS but I cannot seem to configure a GPIO as an output. I also have no issue configuring a GPIO as an input. The LED 100% works as it lights if attached to VDD pin or when connected to a GPIO pin set as an input. My wiring for the LED is between the GND and GPIO pin (0.2) and i have tried using both set and clear but with no result. Any ideas would be greatly appreciated.

Parents Reply
  • I don't see any obvious issues here. Can you call your led_on() and led_off() function after led_setup() in your main function and verify with a debugger that they actually run? If so, it should work. You can also step down into them when debugging to verify that it does and that the OUT register is set as it should (note that you should do this before initializing the SoftDevice, as that complicates debugging a bit).

Children
Related