BrettG

How do I use the Interface Read / Interface Write and Write-Back Trigger?

Discussion created by BrettG on Apr 23, 2012
Latest reply on Dec 3, 2015 by mmmike

This guide is for the ADAU1401A, ADAU1401, ADAU1701, and ADAU1702. The hardware references are specifically for the EVAL-ADAU1401EBZ or EVAL-ADAU170XEBZ.

 

The interface read / interface write for an external EEPROM requires a very specific data file to be downloaded to the EEPROM, and the write-back trigger requires a specific set of steps. The current version of SigmaStudio (3.7.x, April 2012) cannot generate the proper EEPROM data file automatically, so the user must manually edit the file. The steps to do so are listed in this post.

 

  • In the hardware configuration tab, add an E2Prom IC to the USBi Interface.

ScreenHunter_08 Apr. 23 13.43.jpg

  • Create a project that includes some kind of GPIO interface cell with Interface Read and Interface Write cells.

ScreenHunter_07 Apr. 23 13.28.jpg

  • Link-Compile-Download the project to the evaluation board.
  • After link-compile-downloading, click the top line of the capture window and then shift-click the bottom line to select all lines.

ScreenHunter_14 Apr. 23 14.08.jpg

  • Click the << symbol in the upper-right corner of the Capture window to show the Sequencer window.

ScreenHunter_15 Apr. 23 14.09.jpg

  • Click-drag the highlighted rows from the Capture window over to the sequencer window.

ScreenHunter_16 Apr. 23 14.10.jpg

  • Click the "Export Sequence Data..." button.

ScreenHunter_08 Dec. 04 11.17.jpg

  • Under "Save as type," select the new EEPROM(ascii) (*.hex) format to generate a .hex image file. This lets you save many different image files for different projects.

ScreenHunter_09 Dec. 04 11.18.jpg

The problem now is that the generated EEPROM hex file does not contain the header as specified in the ADAU1401/ADAU1701 datasheet. Here it is, for reference. The header consists of the first 64 bytes (8 lines of 8 bytes):

ScreenHunter_09 Apr. 23 13.45.jpg

For our purposes, this would be the proper set of data:

0x01 , 0x00 , 0x05 , 0x00 , 0x08 , 0x1C , 0x00 , 0x58 ,

0x03 , 0x03 , 0x03 , 0x03 , 0x03 , 0x03 , 0x03 , 0x03 ,

0x03 , 0x03 , 0x03 , 0x03 , 0x03 , 0x03 , 0x03 , 0x03 ,

0x03 , 0x03 , 0x01 , 0x00 , 0x23 , 0x00 , 0x08 , 0x00 ,

0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,

0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,

0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,

0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,

(Note: the 0x58 value may change depending on your core register settings)

  • Open the generated EEPROM hex file in a text editor like UltraEdit.

ScreenHunter_10 Apr. 23 13.48.jpg

  • The header is missing from this file, so paste it in prior to the first line of data. The result should have the header as the first 8 lines, with the remainder of the image following afterwards. Here is the result, with the inserted header data highlighted in blue:

ScreenHunter_11 Apr. 23 13.49.jpg

Save this file. Now we are ready to download the image to the EEPROM.

  • Connect LK7 "WP" on the evaluation board to allow the EEPROM to be written via the USBi.
  • Click the IC 2 - WinE2PromLoader tab in SigmaStudio's hardware configuration view.

ScreenHunter_10 Dec. 04 11.23.jpg

  • Click in the upper white rectangle and then locate the .hex file you just saved from the sequencer.

ScreenHunter_11 Dec. 04 11.23.jpg

  • Click the download button to download this data to the EEPROM on your target board.

ScreenHunter_12 Dec. 04 11.23.jpg

  • Wait until the download completes. There should be about 8000 addresses written.

ScreenHunter_12 Apr. 23 13.51.jpg

  • Remove LK7 "WP". Then press the S1 "/RESET" button to reset the board. The chip will self-boot from the EEPROM.
  • Use your GPIOs to verify the functionality of the project. In my project, I used pushbuttons to control an Up/Down index cell.
  • When you want to save the settings using write-back, place a link on LK19 "WBTRIG" to trigger the write-back.
  • Wait a brief moment, then remove the link from LK19 "WBTRIG". By now, the write-back should be complete.
  • Press the S1 "/RESET" button again to initiate another self-boot. This time, the GPIO's index should have been saved and properly read-back from the interface data stored on the EEPROM.

 

A few notes:

  • We are planning on updating the EEPROM generation code to make this process automated.
  • Currently, the EVAL-ADAU1701MINIZ does not have the proper WBTRIG circuit to allow the write-back to take place.
  • The example project attached can be used as a guide for working with the interface registers and write-back function. In order to use it, you will need the engineering board (either EVAL-ADAU1401EBZ or EVAL-ADAU1701EBZ) and the included GPIO daughter board. The GPIO daughter board should be set up as follows:
    • MP0 set to LED (JP9)
    • MP1 set to LED (JP10)
    • MP4 set to PUSH (JP13)
    • MP5 set to PUSH (JP14)

Attachments

Outcomes