This SRAM direct write method can be used if
storing a different device configuration to EEPROM without disrupting the current
operational state of the device is required. This method requires that the
SRAM/EEPROM map data is already generated, which can be exported by TICS Pro.
The SRAM can be directly written without modifying the active configuration registers through the following sequence:
- Write the most significant five bits of the SRAM address to R159 (MEMADR byte 1) and write the least significant eight bits of the SRAM address to R160 (MEMADR byte 0).
- Write the SRAM data byte to R162 (RAMDAT byte) for the address specified in the previous step in the same register transaction.
- Any additional write (or read) transfers in the same transaction causes the
SRAM address pointer to be auto-incremented and a subsequent write
(or read) occurs at the next SRAM address.
- Byte or Block write transfers to R162 can be used to write the entire SRAM map sequentially from Byte 0 to 252.
- Bytes 253 to 255 must not be modified or overwritten and shall be reserved for TI internal use only.
- Alternatively, writing to R159 and R160 to set the memory address pointer
explicitly before each write to R162 is valid.
- Access to the SRAM terminates at the end of current write transaction.
- Note that reading the RAMDAT register also causes the memory address pointer to
be auto-incremented.