LPC54608 Codec TDM i2s mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC54608 Codec TDM i2s mode

3,150 Views
kalesha
Contributor I

Hi all,

We have our own board with LPC54608(208pin).

Similar to development board of lpc54608 we interface codec using two Flexcomms FC6 and FC7( Tx and Rx), we want to interface other codec so we check the datasheet of WM8904 and it can be implemented using TDM mode so we short all signals according to TDM mode.

We update registers to TDM mode in Codec (one codec in slot 0 and another codec in slot 1 16bit mode) and also we update the registers in controller.

1.32bit data length 

2.64 frame length

3. main enable bit in CFG1 register to enable secondary channels 

4. Enable the pair enable bit in P1CFG1 register and set the position for secondary channels in P1CFG2 register

Problem:

1. When we trying to read the secondary channel registers we are reading 0 from both P1CFG1 and P1CFG2 registers.

2. Only one codec is working properly, second codec is not working as expected.

Note:

Individually both codecs are working in normal mode.

Tags (2)
0 Kudos
Reply
2 Replies

2,749 Views
kalesha
Contributor I

Hi,

As per your suggestion we used TDM mode we got the output and we are storing TDM voice data into the Flash storage through microcontroller.

After writing Voice data into the flash storage we are reading data from the flash and directing to the codec using TDM mode through microcontroller and we are getting same voice which was stored in flash during recording.

We are reading the voice data from the flash and writing the data into a file (text file in a pen drive) connected to microcontroller through usb host, after data writing completed when we are playing the the voice data  from the file we are  getting noise .

As per our observation we are sending the correct data from the flash to the file but when we were playing the file  through audacity (raw data player)  software in pc we are not using TDM mode .

 

please provide the clarifications needed for the below points 

1)How can we get rid of getting noise from a file which was placed in a pendrive.

2)Do we need the use the TDM mode for paying the raw data in PC.

3) If we need to use the TDM mode how can we use in  audacity or any raw data player.

 

Please go through waveform pic of the raw data attached to this query.

Capture.PNGCapture1.PNG

 

 

0 Kudos
Reply

3,140 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

If you use TDM mode, I suggest you select mode 3.

You have to configure the P1CFG1,P1CFG2 registers.

Assume that you have 4 slots, 2 pairs, each slot has 32 bits, the frame length is 32*4=128

In the case, P1CFG1=0x01; P1CFG2=64<<16;

 

xiangjun_rong_0-1646988232149.png

Pls have a try

BR

XiangJun Rong

0 Kudos
Reply