Method 1: Using the GPIO Value Registers
The ADAU1761, ADAU144x, and ADAU1781 SigmaDSPs are capable of reading GPIO inputs from registers instead of pins. Please take a look at AN-951:
http://www.analog.com/static/imported-files/application_notes/AN-951.pdf
The use case of interest is “Input Driven by Control Port,” which is shown in Figure 16 on page 6.
The corresponding registers in the ADAU1761 allowing control over the GPIO inputs are shown here:
I attached two example projects. In both projects, the schematic is the same. A GPIO input is connected to a readback cell, which allows you to read back the value of the signal via the I2C/SPI port.
In the first project, Input_GPIO_Switch_S3.dspproj, the GPIO registers are configured as GPIO Active, Input Debounce mode.
The data flow for this use case is shown in this figure:
If I download this project and press the switch S3 on the evaluation board, I can see that I read back zero (5.23 format) on the DSP readback cell.
If I release the switch S3 on the evaluation board, I can read back one (5.23 format) on the DSP readback cell.
In the second project, “Input_GPIO0SET_Register_1568”, the GPIO pin changes its function to an I2S port. However, the DSP core reads its value from an address instead.
Unfortunately there is a small error in this figure. The arrow connecting REGISTER and DSP CORE should have its direction reversed. So, the value goes in through the CONTROL PORT, is written to the REGISTER, and then read into the DSP CORE.
Here are the register settings for this case. Note that all GPIO pins are used for the I2S port, but the core will read GPIO input values from the corresponding GPIO register.
Now I open the Register Read/Write Window…
If I write 0x00 0x80 0x00 0x00 to the GPIO0SET register (address 1568 in the case of the ADAU1761)…
I read back 1.
If I write 0x00 0x00 0x00 0x00 to address 1568…
I read back 0.
Using this method, you can have direct control over a GPIO input in the signal flow, regardless of what value is actually on the input pin. All you need to do is configure the GPIO pin as "Input controlled by I2C/SPI port."
Method 2: Creating a "Dummy" DC Source
This method works for all SigmaDSPs.
Create a DC source in the project.
Give it a meaningful name.
Compile the project.
Click the Export System Files button.
Save the exported files somewhere in the project folder. I named my exported files “Test.”
Open either Test.params or Test_IC1_1.PARAM.h. The address of the Test_Input you created is listed there.
Using this address, the MCU can update this parameter at any time.
So, using this method, you simply create one DC Source cell in the SigmaStudio project for each parameter that the MCU will be updating via the I2C port.