This SRAM direct write method can be used if it is required to store a different device configuration to EEPROM without disrupting the current operational state of the device. 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 same transaction will cause the SRAM address pointer to be auto-incremented and a subsequent write (or read) will take place 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, it is valid to write R159 and R160 to set the memory address pointer explicitly before each write to R162.
- Access to the SRAM will terminate at the end of current write transaction.
- Note that reading the RAMDAT register will also cause the memory address pointer to be auto-incremented.