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

Not getting status of multiple pins configured as output

Hi, I am working on a custom board of NRF 51822 driving multiple leds from pin 21 to 30. I am trying to get and transmit the status of all the pins with help of bsp functions, but I am only getting status of 4 pins. 

I even used but it is giving me the same result. nrf_gpio_pin_out_read(pin_num) 

I used SEGGER_RTT lib to display the result, loop only runs 4 times and does not print anything after that. 

uint32_t status[10];
status[0] = bsp_board_led_state_get(BSP_BOARD_LED_0);
status[1] = bsp_board_led_state_get(BSP_BOARD_LED_1);
status[2] = bsp_board_led_state_get(BSP_BOARD_LED_2);
status[3] = bsp_board_led_state_get(BSP_BOARD_LED_3);
status[4] = bsp_board_led_state_get(BSP_BOARD_LED_4);
status[5] = bsp_board_led_state_get(BSP_BOARD_LED_5);
status[6] = bsp_board_led_state_get(BSP_BOARD_LED_6);
status[7] = bsp_board_led_state_get(BSP_BOARD_LED_7);

for(int i=0;i<10;i++){
    SEGGER_RTT_printf(0, "pinNo:%d- %u _ ", i, status[i]);
}

Please help me in getting status of all the pins and transmit them. 

Thanks. 

Related