Using hardware data capture (trap) registers with the DSP Readback cell (AD1940, ADAU1701)

Document created by BrettG on Jul 26, 2013
Version 1Show Document
  • View in full screen mode

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:

ScreenHunter_01 Nov. 09 15.15.jpg

 

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.

ScreenHunter_02 Nov. 09 15.18.jpg

ScreenHunter_03 Nov. 09 15.20.jpg

Step 3: Click the read button on the readback cell.

ScreenHunter_04 Nov. 09 15.22.jpg

The exact write and read sequence should appear in the capture window.

ScreenHunter_05 Nov. 09 15.22.jpg

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.

ScreenHunter_06 Nov. 09 15.24.jpg

Here's the first write:

ScreenHunter_08 Nov. 09 15.26.jpg

Here's the second:

ScreenHunter_09 Nov. 09 15.27.jpg

And the readback:

ScreenHunter_10 Nov. 09 15.27.jpg

Success!

 

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.

Attachments

    Outcomes