Skip to content

EEPROM Memory Space Reference

mhord edited this page Jan 17, 2013 · 2 revisions

The Wake-on-Shake uses onboard EEPROM memory to store configuration parameters even if power is removed. The EEPROM is exposed through the serial interface; users can alter these values as they see fit. The most important parameters are the on-time delay and the motion sensitivity; these have their own special commands.
There are three other things stored in EEPROM memory that advanced users may want to explore: the inactivity threshold, the inactivity time delay, and the key address.
The key address is used to record whether the EEPROM values have been configured or not. On the first power up, the firmware will check to see if that location is set to a specific value (123), and if not, will initialize the other memory locations, along with the key address itself. A reset to factory settings can be forced by writing this location to any value other than 123 and power cycling the board.
The inactivity threshold is level below which the ADXL362 must sense before it resets and begins waiting for motion again. By default, this is 50mg.
The inactivity time delay is the time the motion threshold must be below the inactivity threshold before the reset to motion trigger occurs. By default, this value is 15, which translates to about 2.5 seconds.

Addr Name Default Description
0-1 ATHRESH 150 Activity threshold setting (0-2048)
2-3 WAKE_OFFS 5000 Time after wake-up before returning to sleep mode (0-65535)
4-5 ITHRESH 50 Inactivty threshold setting (0-2048)
6-7 ITIME 15 # samples (12.5Hz) below ITHRESH before wake interrupt enabled
127 KEY_ADDR 123 If != 123, restore EEPROM locations to defaults.

Clone this wiki locally