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

How to wakeup from I2C CLK?

Hello,

I am currently using the TWIS (slave!) peripheral to get data from a I2C master. Now I would like the ability to place the nRF52 in deep sleep mode with sd_power_system_off() until the master tries to communicate over I2C. Is it possible to use the I2C-CLK signal to wake up the nRF52? If so, how could I do it?

Thanks in advance for your help.

Parents
  • Hello,

    OK, I will try to disable the I2C peripheral and use the pin as a normal GPIO wake up. I can't add additional line for wake up, but I can make in sort that the master initiates a dummy read request in order to wake up and wait until the nRF52 has initialized the I2C slave.

    I will try to use the bsp_wakeup_buttons_set() function as example to wakeup from GPIO pin state change.

    For disconnecting the peripheral, is nrf_drv_twis_disable() enough or shall I also call nrf_drv_twis_uninit()?

  • If you have enough IO pins you can connect one of them to I2C clock, use it to wake up and don't bother disable I2C, just make sure all pending events from that IO cleared. As for delay and dummy read, shell master use ACK anyway to make sure it talks to peripheral which exists or ready? In that case standard error handling/retry process should be applied.

Reply
  • If you have enough IO pins you can connect one of them to I2C clock, use it to wake up and don't bother disable I2C, just make sure all pending events from that IO cleared. As for delay and dummy read, shell master use ACK anyway to make sure it talks to peripheral which exists or ready? In that case standard error handling/retry process should be applied.

Children
No Data
Related