I have a custom ADAU1701 board which is working fine.
I have an SPDT switch to change the value on Input_GPIO5 between 0V (GND) and 3.3V (VCC).
I have cathode of an LED connected to Output_GPIO4. The LED anode is connected to VCC through a 1k resistor.
I want to achieve the below but am unable to do so.
Toggle switch LO: LED OFF, Sig1A and 1B appear on OUT1 and OUT2
Toggle switch HI: LED ON, Sig2A and 2B appear on OUT1 and OUT2
Kindly help me on how to go about doing this.
The MUX uses an integer (28.0) control input while the GP digital input blocks produce a decimal 1.0 (5.23 format). Use a Buffer Gate to connect one to the other, as shown below. Also, don't forget to set your HW registers to recognize MP4 as an output.
I found out a few things about the multiplexer:
1. If I include the multiplexer in my signal chain, there is audio output only at 1X Program length. At 2X, the output is MUTE
2. If I include the multiplexer in my signal chain, I can toggle any GPIO (input) line with an external uC. But any I2C WRITE to Control Register (0x0820) will result in no sound on output.
Without the MUX, I did not face these restrictions.
At 1X program length there is significant loss of HF details as compared to 2X. Without the MUX, normal operation continues even at 4X with substantial increase in HF detail, though this setting is not in the datasheet specs for PLL settings of 256xfs per table 12 of datasheet.
Is this normal? Any more inforamtion would be much appreciated.
Till I saw your answer above, I assumed that looking at the capture window and making the uC to what I see in the capture window was the way to do it.
However, your references to the datasheet made me look deeper into it.
I now understand that there are Core Control Settings like the AACW, GPCW and IFCW that are important if I want to access the GPIOs through the control port i.e. by using a uC.
I will spend some more time doing that and come back to share my results.
Short story: Its all sorted out!
Long story:After selfboot, I configured the core control register to allow GPIO control through control port by setting GPCW. Then I did all the GPIO settings that I wanted to do using I2C WRITE and finally again re-set the GPCW to allow external control and control through DSP core of GPIO.
So its all sorted out.
One thing still baffles me:
Before I got into this toggle switch interface with GPIO5, GPIO4, Buffer and MUX, the application worked at 4X program length (192KHz sampling) with 414 MIPS consumed
But with the MUX logic implemented and the application optimized so that the MIPS is 398, I still have to use the 2X setting as the program mutes for 4X setting.
Yes, this part is one of our early parts and there are some interesting features that we refined in later products.
Now the registers you referred to should only cause issues if you want to write to the GPIO registers or the interface registers etc. Reading them should not be an issue.
Let me know what you find.
What I think was probably happening was that the code that was not being reached was not that noticeable. The part that sent data out of the port was still being reached. Then when you made changes the compiler moved it to a later place in the program and so then it was not being reached. I have seen this before and went looking closer and found parts of the program that was not working but I was still getting audio out.
With 398 MIPS you will have to run at 2X setting.
I would have loved to run my application at 4X setting. But then I would rather have a stable code than have issues surface in the field.
I am glad that this is now ironed out.
My single board layout for ADAU1442 + ADAU1962/66 is ready. I am excited to explore some new features there. One of them is block processing. Are there any worked out examples and/ or tutorials available for the same?
Unfortunately, I have not worked out any good examples using block processing. Right now I have too much on my plate to put anything together.