espressif / esp-zigbee-sdk

Espressif Zigbee SDK
Apache License 2.0
177 stars 31 forks source link

Sleepy End device example - i2c fails after wakeup (TZ-541) #200

Open darianbjohnson opened 10 months ago

darianbjohnson commented 10 months ago

Question

I have gotten the sleepy end device code to work on my ESP32H2 - however, I cannot use a led driver (connected via i2c) after the board wakes from sleep. Is there a lock that I need to keep the i2c connection active?

Additional context.

No response

kelin6 commented 10 months ago

@darianbjohnson I'm deeply sorry to inform you that the recovery and backup of I2C sleep are not yet supported in the IDF. We are currently discussing the support for I2C sleep internally.

darianbjohnson commented 10 months ago

Ok, thanks for the update

Suxsem commented 10 months ago

@kelin6 is the RMT affected by the same problem when using light sleep? i'm using the led_strip component but i'm not able to properly control the rgb led when wake up from light sleep, esp32-c6

kelin6 commented 10 months ago

@Suxsem Yes, light sleep for RMT is not yet supported on the esp32c6/esp32h2 chips.

@kelin6 is the RMT affected by the same problem when using light sleep? i'm using the led_strip component but i'm not able to properly control the rgb led when wake up from light sleep, esp32-c6

darianbjohnson commented 10 months ago

@kelin6 is there an estimated time/release for when this will be resolved?

darianbjohnson commented 8 months ago

Note - for anyone with this problem I get around this issue by removing the Bus - i2c_del_master_bus(bus_handle) - and the Device -i2c_master_bus_rm_device(device_handle) - prior to sleep. And I re-create them on wake-up.

kelin6 commented 7 months ago

@darianbjohnson @Suxsem I2C sleep retention support has been added in Support i2c sleep retention on esp32c6/h2, while RMT support is still in progress.

Suxsem commented 7 months ago

@kelin6 thank you, waiting for rmt

darianbjohnson commented 5 months ago

I am still unable to get i2c to automatically resume after wake-up; is there an example that I can refer to?

darianbjohnson commented 5 months ago

Actually, I was able to get example shown in test_i2c_sleep_retention to work. But, I cannot get this to work when using zigbee sleep (which uses automatic sleep). Any ideas?

lxz946786639 commented 5 months ago

Actually, I was able to get example shown in test_i2c_sleep_retention to work. But, I cannot get this to work when using zigbee sleep (which uses automatic sleep). Any ideas?

I also encountered the same problem

lxz946786639 commented 5 months ago

Note - for anyone with this problem I get around this issue by removing the Bus - i2c_del_master_bus(bus_handle) - and the Device -i2c_master_bus_rm_device(device_handle) - prior to sleep. And I re-create them on wake-up.

According to this method, i2c work ok. I think this is currently the only solution for automatic sleep.

chshu commented 2 months ago

@darianbjohnson @lxz946786639 Do you have any pending issues on the I2C retention after wakeup?

darianbjohnson commented 1 month ago

I2C does not work me on wake-up, unless I remove the Bus and re_create the Bus on wakeup.

lxz946786639 commented 1 month ago

I2C does not work me on wake-up, unless I remove the Bus and re_create the Bus on wakeup.

me too.