TWIS Stops Working During Long k_msleep

Hi!

For a project I need to sample an I2C sensor for a period of 1 min with 1 sec between samples with a nordic nrf52832. During this 1 min, a co-processor communicates in I2C with the Nordic. In this case, the Nordic acts as an I2C slave. But when sampling the sensor, the TWIS lines between the nrf52832 and the coprocessor drops to 0 V and there is no more communication between the co-processors and the nrf52832. It seems to be related to the k_msleep function. Indeed during the sampling, I do a lot of km_sleep of about 1 second. Also, I can reproduce this problem with a simple main which includes a wait of 10 sec.

while (true)
{
    feed_watchdog();
    k_msleep(10000);
    __SEV();
    __WFE();
    __WFE();
 }

There is the TWI lines with a delay of 10 sec (k_msleep(10000)) voltage drops to 0 and theres is no TWI transfers:

But, I don't get this behavior with a wait of 100 msec.There is the TWI lines with a delay of 100 msec (k_msleep(100)):

*Falling edge is when the co-processor starts a TWI transfer with the nrf52832.

Related