Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store configuration in EEPROM #29

Closed
cjbe opened this issue Sep 5, 2019 · 6 comments
Closed

Store configuration in EEPROM #29

cjbe opened this issue Sep 5, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@cjbe
Copy link
Contributor

cjbe commented Sep 5, 2019

It would be useful to have a way to store user changeable configuration (e.g. PID settings) in the EEPROM (of which 128 bytes are available).

Values to store:

  • IP address (if not using DHCP) = 4 bytes
  • MAC address (if overriding built-in address) = 6 bytes
  • IIR coefficients (4 bytes x 5 words x 2 channels) = 40 bytes
  • channel configuration (4 bytes x {min, max, offset} x 2 channels) = 24 bytes
  • options bitfield:
    • use stored IP address or use DHCP
    • use stored MAC address or use default MAC address
  • structure version number = 1 byte
  • checksum = 1 byte

This totals 77 bytes, so plenty of space remaining.

We should have an explicit command to save the current settings to EEPROM. This way users can mess with settings knowing that the original settings can be easily restored by a restart.

@hartytp
Copy link

hartytp commented Sep 5, 2019

If there is room, it would be nice to leave extra coefficient space in case one wants to use a higher-order filter at some point

@cjbe
Copy link
Contributor Author

cjbe commented Sep 5, 2019

@hartytp that would be implemented by changing the structure and bumping the structure version number. The runtime would only use the EEPROM contents if the structure version number in the EEPROM matched the version number in the code (as well as the checksum matching).

@hartytp
Copy link

hartytp commented Sep 5, 2019

Sure, but it's always easier if one doesn't have to dump the EEPROM contents and then reprogram everything to make small extensions like this. But, if we really only have 128bits of EEPROM then maybe it's unavoidable.

@jordens
Copy link
Member

jordens commented Sep 5, 2019

Everything that doesn't need to be accessed via the eem i2c with stabilizer off should be stored in flash. There is a lot of space.

@cjbe
Copy link
Contributor Author

cjbe commented Sep 5, 2019

@jordens good point. I had forgotten about that!

@jordens jordens added the enhancement New feature or request label Sep 10, 2019
cjbe referenced this issue in OxfordIonTrapGroup/stabilizer Sep 12, 2019
The choice between DHCP and a static address is set by a compile-time flag
in anticipation of implementing runtime adjustable configuration (#29).

Closes #24
dnadlinger referenced this issue in OxfordIonTrapGroup/stabilizer Nov 18, 2019
The choice between DHCP and a static address is set by a compile-time flag
in anticipation of implementing runtime adjustable configuration (#29).

Closes #24
@jordens
Copy link
Member

jordens commented Jul 19, 2021

This isn't relevant anymore as we use mqtt for all this.

@jordens jordens closed this as completed Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants