When using a 2nd generation SigmaDSP with hardware trap registers like the AD1940 or ADAU1701, a specific write-write-read sequence must be followed in order to read back data from the signal flow (using a DSP Readback cell in the project schematic). Although the corresponding datasheets describe how to use these registers, it is still a bit confusing. The easiest way to learn how to use the data capture registers is to simply use SigmaStudio as a guide and then emulate its method.
Step 1: Compile your project. Make sure a USBi communication channel is selected and configured in the Hardware configuration tab. Here's my example project with a simple DC input and readback cell:
Step 2: Enter any value into the DC cell. You'll see the write to parameter RAM over the comm port in the capture window.
Step 3: Click the read button on the readback cell.
The exact write and read sequence should appear in the capture window.
You should be able to simply duplicate that write/read sequence in your micro.
Let's try testing this using the Read/Write window in SigmaStudio.
Here's the first write:
Here's the second:
And the readback:
So, I would suggest that you avoid the complications of manually figuring out the write sequence and simply copy it from SigmaStudio's capture window. The sequence may change when you update and re-compile the project, so be sure to double-check the sequence each time the project is updated.
This method should work with all SigmaDSP processors, even those with software readback implementation. SigmaDSPs with software readback, like the ADAU1761 and ADAU1442, have a much simpler readback operation - you just need to read the value from a certain address in memory. No complicated write-write-read sequence is required. The capture window will help you figure out what address to read from.