hello guys
i am trying to glow LED while my device gets charging. i have nrf52832 custom board and P0.17 connected to USB supply using voltage divider. when i plug in usb this pin 17 should be high and when i removed usb this pin sholud be low. but it is always high. what i am missing, can anyone suggest ? your help greatly appreciated.
i am doing like
#define BAT_CHG_STATE 17
if(BAT_CHG_STATE)
{
nrf_gpio_cfg_output(26);
nrf_gpio_pin_set(26);
}
else
{
nrf_gpio_pin_clear(26);
}
this functions are inside a loop and LED is glowing everytime when i am not charging the device.
thank you