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
  • No it's not possible to directly use the I2C CLK signal to wake from power off. You can however disconnect the I2C peripheral before you sleep and use the GPIO line you're using for a clock to wake the system from sleep. After sleep you need to re-init everything anyway, including setting up the I2C peripheral. However you're not going to wake in time to read the incoming I2C transaction, you'll have long-since missed it. So unless your master is set up to wait a little and retry operations, that's not going to help you.

    Better to have a proper handshake on a GPIO pin which wakes the system and signals it's ready.

Reply
  • No it's not possible to directly use the I2C CLK signal to wake from power off. You can however disconnect the I2C peripheral before you sleep and use the GPIO line you're using for a clock to wake the system from sleep. After sleep you need to re-init everything anyway, including setting up the I2C peripheral. However you're not going to wake in time to read the incoming I2C transaction, you'll have long-since missed it. So unless your master is set up to wait a little and retry operations, that's not going to help you.

    Better to have a proper handshake on a GPIO pin which wakes the system and signals it's ready.

Children
No Data
Related