-->
Page 2 of 5

Re: Chip Enabled

PostPosted: Thu Sep 24, 2020 11:58 am
by btidey
It is true it doesn't keep state, but for many applications that is not required. So a sensor that has to report an event or measurement does so without any need for previous state after being triggered.

Where some form of state is needed then that can normally be obtained by storing in EEPROM, filing system or on a remote server while shutting down and then retrieved when re-activated.

Re: Chip Enabled

PostPosted: Thu Sep 24, 2020 12:39 pm
by eriksl
Save state in RTC RAM, IIRC that is retained on CE down. Don't use EEPROM (FLASH actually), it will wear out.

Re: Chip Enabled

PostPosted: Fri Sep 25, 2020 2:14 am
by schufti
if you have an external "wake up" signal, it is better to use deepsleep w/o timeout, retaining rtc memory for keeping info about state etc.

Re: Chip Enabled

PostPosted: Fri Sep 25, 2020 5:19 am
by btidey
The RTC is off and registers cleared when EN is low so that is not an option for state if EN is used.

Using deep sleep only is OK when timed operation is used but can make hardware a bit messy if external wake up is needed.

I agree that EEPROM should only be used very carefully to avoid excessive wear. Filing system with wear leveling is much less problematic. I use remote web server in those instances where I need state and web server is part of the overall application.