Post Go back to editing

Software safeload examples

In order to use software safeload to write data to parameter RAM, at least three writes must be performed. First, the data is loaded into the safeload data registers (addresses 0x0001 through 0x0005), then the safeload target address register (address 0x0006), and finally the number of words / trigger register (address 0x0007). So, in order to execute a safeload write, there are at least 3 register writes that need to occur.

Single address safeload write

For example, if I wanted to write one word of data to address 0x000B…

There are 3 total writes:

  • Address 0x0001, write 4 bytes of data.
  • Address 0x0006, write 0x0000000A (this is my target address of 0x000B minus one).
  • Address 0x0007, write 0x00000001 (because you are writing one word of data).

This will trigger the safeload write on the next frame.

Note that the target address is actually shifted down by one, as mentioned in the datasheets for devices using software safeload. So, even though I’m writing to address 0x000B, I write 0x000A to the target address register.

Multiple address safeload write

Here’s another example, where I will write 3 words of data instead of 1 word. The target addresses for the 3 words of data are 0x001C, 0x001D, and 0x001E.

There are 5 total writes:

  • Address 0x0001, write 4 bytes of data that will be safeloaded to address 0x001C.
  • Address 0x0002, write 4 bytes of data that will be safeloaded to address 0x001D.
  • Address 0x0003, write 4 bytes of data that will be safeloaded to address 0x001E.
  • Address 0x0006, write 0x0000001B (this is 0x001C minus one).
  • Address 0x0007, write 0x00000003 (because you are writing three words of data).

This will trigger the safeload write on the next frame.

Note that multi-word safeload writes can only be accomplished when the target addresses are sequential.

Parents
  • Hello,

    this is nice, but does not really help us to build the C code which does software safeload writes on a real world ADAU1467; or maybe I missed some other code shared somewhere  else ?

    Please those who did write the corresponding C code give us more hints on how you did it.

    Tks

    Regards.

  • Hello iravelo,

    This was an old post from 2012 explains how to do Safeload write using an ADAU1701 DSP. This is a Sigm100 DSP. It does not apply to the ADAU1467. We improved the way to do it and made it easier. The 1701 is a Sigma100 core. We improved it on the Sigma200 core then made further improvements on the Sigma300 core. The ADAU1467 is a Sigma350 core but the safeload write system is the same as the Sigma300. 

    I wrote this post explaining how safeload works but not the code. In your earlier post you had the defines and that is all you really need. Read this post:

    (+) I2C Safeload problem on ADAU1452 - Q&A - SigmaDSP Processors & SigmaStudio Dev. Tool - EngineerZone (analog.com)

    But I see in another post you wrote that you made it work. 

    Dave T

Reply Children
No Data