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

Read GPIO level without configuring Input or Output

Hello,

 

I am using nRF52832, SDK_15.3.0, S132 SoftDevice and Segger for flashing the image. I am using ‘ble_app_blinky’.

 

I want to check for debounce of a level on pin for 2 sec and then only do further operations. If pin is high for 2 sec then only initialize other functionalities like BLE, SoftDevice, Timers, buttons, leds etc.. Otherwise go to System off mode.

 

1) Whether can I use nrf_gpio_port_in_read() even without configuring GPIO pins as input or output.

2) As per below link, whether can I skip initialization and do only after validating the pin for 2 seconds.

                https://devzone.nordicsemi.com/f/nordic-q-a/40043/low-power-with-rtc-and-ram-retention

 3) In this case I want to use RTC2 for debounce logic for 2 sec. I suspect only SoftDevice will enable low frequency clock. Do I need to call lfclk_config() (As in RTC example) explicitly.

 

Thanks & Regards

Vishnu Beema

Parents Reply Children
No Data
Related