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.