Post Go back to editing

How to change sample rate on EVAL-ADAU1467 ?

Dear all,

I am using EVAL-ADAU1467Z Rev. B.

As far as I understood, sample rate on EVAL-ADAU1467 is fixed to either 44.1kHz or 48kHz, when switch S2 is set to standalone mode.

According to the user's guide, with S2 set to I2C it should be possible to set the codec AD1937 to arbitrary sample rates up to 192kHz. Unfortunately the user guide only gives very short comments on this issue, e.g. that it

"requires reconfiguration of the master control port from SPI to I2C and enabling the alternate I2C port on the MP24 pin and MP25 pin".

And it further says

"This configuration is beyond the scope of this user guide".

@ADI, can you please supply an example (simple talkthrough is enough) or information, how to change to e.g. 92kHz sample rate? Setting all the serial inputs and serial outputs to 2*Fs is obviously not enough.

How to reconfigure and "enable the alternate I2C port on the MP24 pin and MP25 pin"?

Can anybody explain, how to make these changes?

This would be really helpful for me.

Thanks and best regards,

AJ

  • Hello ,

    Sorry for the delayed response.

    We suggest you to refer the attached project and please follow the below steps:

    Programming the CODEC:-

    The AD1937 CODEC on the ’67 evaluation board is connected to the secondary I2C master port. The primary master port appears on pins 32-35 and may be configured as either SPI or I2C. Since it needs to be connected to peripheral, such as a boot EEPROM, that are one or the other, it is usually not possible to utilize the port as both in the same system. However, the 88-pin parts have the capability of splitting the I2C portion of the master port from the SPI and moving it to pin 30-31. This allows, as on the eval board, an SPI device to be connected to the primary pins and an I2C device to be connected to the secondary pin. This secondary function is enable by the button at the bottom of the MULTIPURPOSE1 tab.

          

     

    This gets a little confusing if you want to write a program using this functionality to a selfboot EEPROM because you need to switch back and forth. The solution is to disable the secondary I2C in the register setting (as above), then write the register to enable it once the program is running. This is done as follows:

     

                 

    Once the secondary I2C port is active, you can write to the CODEC:


    The single input is a write trigger. By tying it high (DC input of 1), the write occurs once as soon as the program starts. The XML file with the register setting is included. In this example, the sample rate is set to 192 kHz.

    This code fragment is something that I use frequently for debug. It just shows visually that the USBi is connected properly, and the core is up and running.


     
    The rest of the code in the example generates tones on the output. The knobs (pots) on the board control amplitude and the frequency up to Fs/2 so you can check Fs on a scope.

    Hope this helps.

    Regards,
    Lalitha.S

    4578.SigmaDSP Programming CODEC via I2C to 192 kHz.zip

  • Hello,

    I'm trying to achieve the same thing: Operating the EVAL-ADAU1467 Rev. B at 192 kHz using selfboot. However, I'm having a few issues. Compiling the program you provided and loading it on the DSP works fine.

    But when I try to write it to the EEPROM and selfboot the board, it fails. Switching S2 back to the standalone position revealed that the DSP loaded an old program (which used the default 48 kHz sampling rate) I wrote to the EEPROM and which should have been erased and overwritten.

    Writing another 48kHz program to the EEPROM and booting that works fine. I double checked the steps you described, tried writing to the EEPROM with S2 in both positions and with the "Secondary I2C" option enabled and disabled but nothing worked.

    Im hoping, you might have some insights into this problem.

    Thanks and Kind Regards,

    Tobias

  • Hello Tobias,

    The basic response will be, Was your self boot switch  switched off while you are writing to the EEPROM?

    Just try erasing the EEPROM and write freshly.

    Recheck that the EEPROM config window is matching with Eval board booting example config window. Because if the writing speed , memory size and other parameters are changed then It won't self boot properly. Since you attempted booting with standalone mode successfully it sorted out the basic booting debugging parts. However, we request you to recheck the above things and please get back to us.

    Regards,

    Harish

  • Hello Harish,

    Thank you for your fast response. Yes, I made sure to switch the self boot switch off during writing and switch it on again when trying to self boot.

    I tried erasing the EEPROM. That got rid of the old program but I still can't write the 192 kHz example program to the EEPROM, so the problem persists.

    The EEPROM address and config window are as specified in the user guide (SPI 0x1 ADR0, 1048576 bits memory size, 256 byte page size, 10000 kHz write speed, 3 address bytes, SPI Mode 3...).

    One thing that struck me as odd though was the xml file. It seems to assume that the DSP is IC 1 but in the example project, the DSP is IC 2. Is it possible that this could be a cause for problems?

    Kind regards,

    Tobias

  • Hello Tobias,

    sorry for the delay.

    Can you please send us your project with that xml file?

    Regards,

    Harish

  • Hello Harish,

    sure, I have it attatched here. But it is basically just the example project LalithaS provided.

    Regards,

    Tobias

    6646.SigmaDSP Programming CODEC via I2C to 192 kHz.zip

  • Hello Tobias,

    Sorry for the delay.

    Once again, Make sure that the self boot switch is off while writing to E2PROM and also the codec boot switch s2 is at standalone mode. once the program is written to E2prom then reset the board then switch ON the self boot switch and put the switch s2 in I2C mode then reset.

    Check if you are getting an output in standalone mode or I2C mode. I tried your project, For me It mutes at standalone mode and runs at I2C mode. Every time you move the switch s2 then please reset the board. please let me know your status. 

    please let me get back to you with more detailed info.

    Regards,

    Harish

  • Hello Tobias,

    Sorry for the delay.

    Once again, Make sure that the self boot switch is off while writing to E2PROM and also the codec boot switch s2 is at standalone mode. once the program is written to E2prom then reset the board then switch ON the self boot switch and put the switch s2 in I2C mode then reset.

    Check if you are getting an output in standalone mode or I2C mode. I tried your project, For me It mutes at standalone mode and runs at I2C mode. Every time you move the switch s2 then please reset the board. please let me know your status. 

    please let me get back to you with more detailed info.

    Regards,

    Harish

  • Hello Harish,

    thank you for your detailed reply. I tried it multiple times but unfortunately, the problem persists:

    Once again, Make sure that the self boot switch is off while writing to E2PROM and also the codec boot switch s2 is at standalone mode. once the program is written to E2prom then reset the board

    Until this point, everything works as expected: I see the expected output after downloading, it stays after switching S2 to standalone. If I reset the board after switching S2 to standalone, the output disappears, otherwise it disappears breifly while writing, then re-appears. Resetting the board makes the output disappear.                                                                                                                                                                                     

    switch ON the self boot switch and put the switch s2 in I2C mode then reset.

    This is the part where it becomes clear that something doesn't work. The DSP doesn't boot, there is no signal on the outputs.

    Check if you are getting an output in standalone mode or I2C mode. I tried your project, For me It mutes at standalone mode and runs at I2C mode. Every time you move the switch s2 then please reset the board. please let me know your status. 

    There is no output if I reset while in I2C mode. If I reset with S2 in standalone and I had a working program on the EEPROM before trying to write this program, I can see the previous program's output. If I manually erased the previous program beforehand, there is no output.

    I also connected a logic analyser to the master SPI port J6 and SS_M. As expected, I saw the CLK-signal on SCL2_M, MISO on SDA_2M, MOSI on MOSI_M and Enable on SS_M. However, I am unable to interpret the captured data so I'm including it here in case you have some use for it.DSP_write_to_EEPROM_192kHz_unsuccessful.zip