This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nrf_gpio_cfg_sense_input Function wakes up the system only during debugging.

Hello,
I am having a problem with the development on a custon board. During system-off I wake up the chip with nrf_gpio_cfg_sense_input function on PIN 5. The chip wakes up normally while debugging, yet when I am not in debug mode and the custom board operates on battery the nrf_gpio_cfg_sense_input function does not work. I am using nrf52832 chip and sd132.

nrf_gpio_cfg_sense_input(PIN[5], NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_HIGH);

  • Hi,

    I do not see any obvious reason why this should not work, I assume you are power cycling the board in this case to exit debug mode when testing? Maybe simplify the program for testing, for instance toggle a GPIO in start of main(), check that PIN[5] is low, toggle GPIO, then enter system OFF mode. That way should see clearly when it's system OFF and running in main().

    Best regards,
    Kenneth

  • Hi Kenneth, 
    Sorry but I didn't quite get your reply. If by power cycling you mean that I should power off the board, disconnect it from the dk and then power it on with the battery, yes that's what I am doing. I can't see how the simplified test you suggested will resolve my case. Probably I haven't quite understood the process of testing. One thing I didn't mention is that I am trying to wake up the device from an Analog input. The input is a voltage divider where a resistive sensor is connected. The pin goes from low to high when the saadc channel limits are exceeded. I still can't see the reason why this works on the debug and does not work when my board is not connected to the DK. Finally I can't quite understand how to implement your testing process. I would be really greatfull if you could elaborate a little bit more.
    Kind Regards,
    Antony.

    Update: My custom board does not have an XTAL Clock could this be the problem?

  • Update: I solved the issue using the lpcomp library. I uninitialized the saadc and initialized on the same Analog Input the lpcomp functionality. Although the problem has been solved it upsets me that for 4 straight days I got no reply from any nordic's engineer. I know that you guys are busy, yet 4 straight days without even looking at this issue is a lot.  

Related