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

NRF52832/52810 System OFF wakeup issue

Hi:

I test the system off mode, I attached a micro vibration sensor. Pulse generated when shaking as follow.

the button config is BSP example default(toggle) ,  i try to use  NRF_GPIO_PIN_PULLUP/NRF_GPIO_PIN_PULLDOWN/ NRF_GPIO_PIN_NOPULL ang BUTTONS_ACTIVE_STATE  One-to-one matching for test. and found when the input is high on hold or low on hold,the system always wakeup. it is true ???? 

Parents
  • Hi,

    I did not fully understand the question, so please elaborate and ask again if the following does not answer it.

    The GPIO sense mechanism can be used as a wake up source from system off mode, and it can detect either a high or a low level. This pulse can be quite short (exactly how short is not documented) and wake up the device from system off. So if you have a bit of noise on the input, then this will typically wake up the system.

Reply
  • Hi,

    I did not fully understand the question, so please elaborate and ask again if the following does not answer it.

    The GPIO sense mechanism can be used as a wake up source from system off mode, and it can detect either a high or a low level. This pulse can be quite short (exactly how short is not documented) and wake up the device from system off. So if you have a bit of noise on the input, then this will typically wake up the system.

Children
  • Thank you for your prompt. By the way, what's the difference between nrf_drv_gpiote_in_init and nrf_gpio_cfg_sense_set? The former is familiar to me, and the latter has been exploring???

  • Hi,

    The GPIO sense mechanism is unrelated to the GPIOTE peripheral. GPIOTE requires a clock, and cannot be used in system OFF. Sense on the other hand is a GPIO feature that allows the pin to detect/sense a voltage level (high or low) and wake up form system OFF when it does. The sense mechanism is configured for instance with nrf_gpio_cfg_sense_set(), or using nrf_gpio_cfg_sense_input() to set up everything with a single function. Essentially this writes the configuration to the corresponding PIN_CNF register.

  • “Sense on the other hand is a GPIO feature that allows the pin to detect/sense a voltage level (high or low) and wake up form system OFF when it does.” Does it mean that when the external input signal remains high or low, the system will always be awakened and unable to sleep?

  • bevis said:
    Does it mean that when the external input signal remains high or low, the system will always be awakened and unable to sleep?

    No. You configure the sense mechanism to detect one level. For instance, if the pin state is normally low and you want to wake up when it is high, then you use NRF_GPIO_PIN_SENSE_HIGH. And vice versa. You should of course also make sure that the pin is never floating. So if there is not always a input signal, then you must use a (internal) pull resistor.

  • My shake sensor is connected in series with a resistor connected to GND. The input is set to a pull-up input. One problem is that when my sensor off, the detection pin is pulled down. At this time, I set it to a high level to detect NRF_GPIO_PIN_SENSE_HIGH.(Resistance changes during vibration increase the level of pin detection),it works. But when the sensor off, because of the direct connection to GND and the pull-up input relationship, the leakage current is 200 ua, and the pull-down resistance isolation is at least 100 + ua, which will lead to the level mismatch and can not wake up normally. What can I do to solve the leakage problem? Or is there any better way to wake up?

Related