I am new to NRF52832. I want to monitor continuously PIN 3 where I have connected USB to check whether my USB is connected or not. How can I do that. Please reply ASAP.
I am new to NRF52832. I want to monitor continuously PIN 3 where I have connected USB to check whether my USB is connected or not. How can I do that. Please reply ASAP.
Hi..Amit
first define PIN 3 and After that ,create timer instance for repeated mode and start it.
then initalize , configure nrf_drv_gpiote_init driver based on ur configuration and enable input event on it.
for more information u can look at example pin_change_int in SDK example folder.
Regards.
Hello Amit, I am using SDK 11 with Eclipse GCC. My SDK, installation and development software work just fine. I was interested in knowing what method did you use to differentiate LO-HI and HI-LO events when using GPIOTE TOGGLE. I see you are reading the gpiote sense config at the interrupt handler, but that did not work for me, sometimes the sense setting was 0 (disabled) and other times the configuration did not match the actual interrupt event, because I have many pins calling this handler with interrupts. I did achieve to differentiate them reading the value of the pin at the handler, but that only works if interrupt events are being processed before next event occurs. Thank you for your time. :)
Hello Amit, I am using SDK 11 with Eclipse GCC. My SDK, installation and development software work just fine. I was interested in knowing what method did you use to differentiate LO-HI and HI-LO events when using GPIOTE TOGGLE. I see you are reading the gpiote sense config at the interrupt handler, but that did not work for me, sometimes the sense setting was 0 (disabled) and other times the configuration did not match the actual interrupt event, because I have many pins calling this handler with interrupts. I did achieve to differentiate them reading the value of the pin at the handler, but that only works if interrupt events are being processed before next event occurs. Thank you for your time. :)