Post Go back to editing

This is a comment for the help subject "How do I execute a software safeload write?"

Category: Software
Product Number: SigmaStudio, ADAU1452

This comment is related to  How do I execute a software safeload write? Since I can't add a comment to that page, I decided to create this message.

First, that informational topic talks about safeload data registers at addresses 0x0001 through 0x0005, then the safeload target address register (address 0x0006), and finally the number of words / trigger register (address 0x0007). Well, that is not what I experienced. Using SigmaStudio 4.5 with an ADAU1452, the header files generated the names and values:

  • MOD_SAFELOADMODULE_DATA_SAFELOAD0_ADDR = 24576          (which is hex 0x6000)
  • MOD_SAFELOADMODULE_DATA_SAFELOAD1_ADDR = 24577          (which is hex 0x6001)
  • MOD_SAFELOADMODULE_DATA_SAFELOAD2_ADDR = 24578          (which is hex 0x6002)
  • MOD_SAFELOADMODULE_DATA_SAFELOAD3_ADDR = 24579          (which is hex 0x6003)
  • MOD_SAFELOADMODULE_DATA_SAFELOAD4_ADDR = 24580          (which is hex 0x6004)
  • MOD_SAFELOADMODULE_ADDRESS_SAFELOAD_ADDR = 24581    (which is hex 0x6005)
  • MOD_SAFELOADMODULE_NUM_SAFELOAD_ADDR = 24582             (which is hex 0x6006)

Note that the first five values are the actual five safeload data registers the informational topic was referring to. The next value is the safeload target address register, and the last value is the number of words / trigger register.

Second, that informational topic indicates, the Safeload write requires 3 writes. The second write is documented as taking the intended register minus 1. I found out that for an ADAU1452 using the output from SigmaStudio 4.5, subtracting 1 from the register address is not necessary. Just send the intended register address as is. It cost me (and subsequently my client) 2.5 man hours to figure this out.

Note that since the MOD_SAFELOADMODULE_NUM_SAFELOAD_ADDR immediately follows the MOD_SAFELOADMODULE_ADDRESS_SAFELOAD_ADDR, a performance enhancement can be gained by performing one write with two 32 bit values.

So, here is an example of the data that will be sent on I2C using the performance enhancement mentioned - this performs a safeload write of the word 0x00000001 to register address 0x6A :

  • First write is (all values hex bytes): 60 00 00 00 00 01
  • The second write is (all values hex bytes): 60 05 00 00 00 6A 00 00 00 01

The first write sends the safeload write register address 0x6000 followed by the data word 0x00000001. The second write sends the safeload write register address 0x6005 followed by two data words: 0x0000006A and 0x00000001 - these represent the final destination register address for the data word and the number of words (which is 1).  The way I2C works, the second word (00 00 00 01) with be written to the register address of the second write command plus 1 (0x6005 + 1 = 0x6006)

Hope that detailed information helps someone.

Edit Notes

tags, template
[edited by: lallison at 7:22 PM (GMT -4) on 13 May 2022]