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.
Hello Amit, I am facing your same problem. You say you fixed it migrating to latest SDK (11?). Could you give me more details please? What did you do with the new SDK? Thank you very very much!
Hi Luis, Please let me know what is the development environment you are using.
Nordic do not recommend using packs and do not support it anymore in SDK 11.0.0. Just use normal folder structure.
Regards, Amit
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. :)
Hi Luis,
void in_pin_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { LEDS_CONFIGURE(1<<19);
if (nrf_gpio_pin_read(3) == ON) { usb_detect_on_off = ON; LED_ON(1<<19); } else if (nrf_gpio_pin_read(3) == OFF) { usb_detect_on_off = OFF; LED_OFF(1<<19); } }
Hope this will help you.
Regards, Amit
Hello Amit, I see you did use same workaround as me, reading the pin level in interrupt handler. Thank you. For now it also works for us, but maybe exists a more elegant/efficient way of doing it. :\