Attiny1614: Wakeup on I2C read

Hi,

Can anyone please explain how Attiny wakes up when it is used as an I2C slave and the master does a read or write I2C transaction? I am using megaTinyCore.
I am unable to understand from the datasheet.

http://ww1.microchip.com/downloads/en/DeviceDoc/ATtiny1614-data-sheet-40001995A.pdf
Specifically, does it lose any bytes while waking up?

Thanks and Regards,
WonderfulIOT

It is in the data sheet. You need to leave the clock running so it can wake up and not lose data that is in the I2C receive register. That is hardware and it must be in slave mode where the master supplies the clock. You leave the clock on rather then having it shut down causing a delay when it starts. On page 89: "Bit 1 – RUNSTDBY Run Standby This bit forces the oscillator ON in all modes, even when unused by the system. In Standby Sleep mode this can be used to ensure immediate wake-up and not waiting for oscillator start-up time. When not requested by peripherals, no oscillator output is provided. It takes four oscillator cycles to open the clock gate after a request but the oscillator analog start-up time will be removed when this bit is set. From what I can see it does not lose anything if it wakes up fast enough and leaving the clock on assures this.

Can I2C wake-up processor from Power-Down sleep mode?

wonderfuliot:
Can I2C wake-up processor from Power-Down sleep mode?

Yes.
But if the main clock had been stopped, the I2C slave hardware has activate clock stretching until main clock stabilizes.
In order to communicate correctly, requires an I2C master that supports clock stretching.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.