Hello,
I am working on an audio application with BF533. Our initial design used the AD1836 audio codec, which worked well. We were advised to switch to AD1939, and are having some problems.
First off, the SPI control words are 24-bit, instead of 16. BF533 only supports 8- and 16-bit transfers, so I followed the workaround advised here:
http://ez.analog.com/thread/1248 (setting CPHA positive and toggling slave-select by writing to SPI_FLG).
The SPI data looks ok on the analyzer, except that the clock state is high when idling - it seems impossible to change this while using the workaround above.
My goal is to get the same behavior as the old codec, using 4 channels of audio I/O in I2S mode connected with SPORT0 on the BF533. So I'm leaving all the AD1939's control registers at default, except for setting the MSB of the PLL_CONTROL_0 to enable DACs and ADCs. But I am a little unclear on the implications of all the control register settings.
Should I be setting something differently on the codec?
Should I rewire the board to use the codec in "standalone" mode?
Is there a better place for me to post questions about the codec specifically?
Is there an appnote or example code for this new codec?
I'm writing in C using the bfin-elf-gcc toolchain, and following the basic template from the I2S talkthrough example for the BF533 EZ-KIT.
Attached is a code fragment with the codec initialization and SPI write functions.
Any tips would be much appreciated. Many thanks for your time!
Ezra Buchla