10.5.4 Write SRAM
The on-chip SRAM is a volatile, shadow memory array used to temporarily store register data, and is intended only for programming the non Volatile EEPROM array with one or more device start-up configuration settings (pages). The SRAM has the identical data format as the EEPROM map. The register configuration data can be transferred to the SRAM array through special memory access registers in the register map.
The SRAM is made up of a base memory array and 6 pages of identical memory arrays. To successfully program the SRAM, the complete base array and at least one page should be written.
The following details the programming sequence to transfer the device registers into the appropriate SRAM page.
- Program the device registers to match a desired setting.
- Write R145[3:0] with a valid SRAM page (0 to 5) to commit the current register data.
- Write a 1 to R137.6. This ensures that the device registers are copied to the desired SRAM page.
- If another device setting is desired to be written to a different SRAM page, repeat steps 1-3 and select an unused SRAM page.
The SRAM can also be written with particular values according to the following programming sequence.
- Write the most significant 8th bit of the SRAM address in R139.0 and write the least significant 8 bits in R140.
- Write the desired data byte in R142 in the same I2C transaction and this data byte will be written to the address specified in the step above. Any additional access that is part of the same transaction will cause the SRAM address to be incremented and a write will take place to the next SRAM address. Access to SRAM will terminate at the end of current I2C transaction.
- Steps 1 and 2 need to be followed to change EEPROM bytes 11 and 12. Byte 11 denotes the I2C slave address of LMK03318 and Byte 12 denotes an 8-b user space that can be used as a device identifier among multiple LMK03318 instances with different EEPROM images.
NOTE
It is possible to increment SRAM address incorrectly when 2 successive accesses are made to R140.