Hi again all, sorry to resurrect this old thread, I can start a new one if necessary. After some months of hiatus, I am back at this I2S project, and have written code to set the AIC23B's registers correctly. All of the I2C writes to the AIC23B come back with status OK, and I've checked my register values with some other code that has been written since then, so I think that part of it is good. However, it still hangs without getting any interrupts (DMA or IRQ). At this point, I'm thinking it's because I'm setting up the AIC23B as master, but either the LPC1768 is not configured to reflect this, or my hookup is wrong. In i2s.cpp, the lines
/* Audio output is the master, audio input is the slave, */
/* 16 bit data, stereo, reset, master mode, not mute. */
DAOValue = LPC_I2S->I2SDAO;
DAIValue = LPC_I2S->I2SDAI;
LPC_I2S->I2SDAO = DAOValue & (~((0x01 << 4)|(0x01 <<3)));
/* 16 bit data, stereo, reset, slave mode, not mute. */
LPC_I2S->I2SDAI = DAIValue & (~((0x01 << 4)|(0x01 <<3)));
return;
define the master/slave configuration. Should both be master? I can't find the relevant sections in the LPC1768 datasheet, so any help there would be appreciated. Also, is my hookup correct between the LPC1768 and AIC23B?
Name(s) |
AIC23B Pin |
mbed Pin |
TX_SDA/DIN |
4 |
5 |
TX_WS/LRCIN |
5 |
6 |
TX_CLK/BCLK |
3 |
7 |
RX_SDA/DOUT |
6 |
8 |
RX_WS/LRCOUT |
7 |
29 |
RX_CLK/BCLK |
3 |
30 |
Any help is appreciated, I think a number of people got I2S working since I tried this so any tips would be appreciated.
Hi all, I'm trying to interface the mbed with a TLV320AIC23B (audio codec) via I2S. I'm using Mark B's ported Keil code: http://mbed.org/users/macaba/programs/i2s/600c5. It seems to work well in that it compiles and runs, but it hangs at the line
I believe this means that the DMA_IRQhandler never gets triggered. I don't know why this is but my hunch is that it has to do with how I am wiring to the AIC23B. Specifically, I believe the AIC23B supports two I2S connections (CLK, WS, SDA), in addition to an SPI or 2-wire interface for doing actual control. I don't have the latter hooked up because it's not clear how to do so, or how it's being used in the Keil code. Any tips? My notebook page which describes my wiring setup, and more, in detail is here:
http://mbed.org/users/expanoncolin/notebook/i2s-with-aic23b/
Thanks for any help,
-Colin