Changes between Version 58 and Version 59 of gsc


Ignore:
Timestamp:
07/29/2020 11:57:44 PM (2 years ago)
Author:
Bobby Jones
Comment:

Add more information on register save/load

Legend:

Unmodified
Added
Removed
Modified
  • gsc

    v58 v59  
    432432 * erase security key EEPROM on 3x quick press-and-release
    433433 * reset board and boot from alternate boot device on 5x quick press-and-release (for boards that have an alternate boot device)
     434 * load default control register values stored in the {{{FACTORY_DEFAULTS}}} section on 10x quick press-and-release (GSCv3, firmware v57 and later)
    434435
    435436The default configuration of the GSC is to perform a hard reset on a quick press-and-release. To change this you need to set the [#gsc_ctrl_0 CTRL_0] register. For example:
     
    10571058[=#GSC_REGISTER_BACKUP]
    10581059=== GSC_REGISTER_BACKUP (Register R31): Register Backup Control
    1059 This register has an upper nibble password of value {{{0xA0}}} that should be bitwise OR'd with an enumerated value in the lower nibble that will be interpreted as the command. This register will self clear when the operation has completed.
     1060This register has an upper nibble password of value {{{0xA0}}} that should be bitwise OR'd with an enumerated value in the lower nibble that will be interpreted as the command. This register will self clear when the operation has completed. See the below [#reg_save_load Register Save/Load] section for more information.
    10601061
    10611062||= Value =||= Name =||= Description =||
     
    10641065|| 3 || GSC_REG_BKP_FACTORY_LOAD || Load register values from FACTORY backup ||
    10651066|| 4-7 || GSC_REG_BKP_PASSWORD || Password for upper nibble ({{{0xA0}}}). Bitwise OR this value with lower nibble enumerated values described above ||
     1067
     1068[=#reg_save_load]
     1069== Register !Save/Load (GSCv3, firmware version v57 or later)
     1070With the release of GSCv3 firmware version v57 the GSC now has the ability to save and load the control register set. The registers affected are all registers available from the {{{0x20}}} chip address, with the exception of non control registers such as the status, CRC, and firmware version registers.
     1071
     1072The register saves are stored in a non volatile section of memory, allowing them to persist across power loss events. When the the GSC resets for whatever reason, it will first attempt to load the register values from the {{{USER_DEFAULTS}}} section if values previously saved by the user exist. Otherwise the {{{FACTORY_DEFAULTS}}} values will be loaded instead.
     1073
     1074There are currently two places registers are saved, a non user accessible {{{FACTORY_DEFAULTS}}} section that is populated with the factory programmed register values, and a {{{USER_DEFAULTS}}} section that contains the current control register values when the user executes a {{{GSC_REG_BKP_SAVE}}} command via register [#GSC_REGISTER_BACKUP R31] described above. From the same [#GSC_REGISTER_BACKUP R31], a user can remotely load register defaults from either location. As an additional recovery measure, a {{{10x}}} press of the pushbutton will load the values stored in the {{{FACTORY_DEFAULTS}}} location and reset the GSC as well as powercycle the board.
    10661075
    10671076== Code Examples