LPC4357 receiving data from UDA1380 using I2S

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

LPC4357 receiving data from UDA1380 using I2S

Jump to solution
1,186 Views
julianhoerz
Contributor II

Hello,

 

first of all, I'm an German student and I'm sorry for my bad English.

I want to make a simple example to record and play sound with the LPC4357.

What I actually have is the following code:

    //Init

    I2S_AUDIO_FORMAT_T audio_Confg;

    audio_Confg.SampleRate = 16000;

    audio_Confg.ChannelNumber = 1;

    audio_Confg.WordWidth = 16;

   

    //Boardinit

 

    Board_Audio_Init(LPC_I2S0, UDA1380_MIC_IN_LR);

  

    //I2Sinit

 

 

 

 

 

    Chip_I2S_Init(LPC_I2S0);

    Chip_I2S_RxConfig(LPC_I2S0, &audio_Confg);

    Chip_I2S_TxConfig(LPC_I2S0, &audio_Confg);

    Chip_I2S_DisableMute(LPC_I2S0);

 

 

    uint32_t buffer;

    while(1)

    {

 

        if(Chip_I2S_GetRxLevel(LPC_I2S0)>= 1)

        {

            //Receiving Data

            Chip_I2S_RxStart(LPC_I2S0);

            buffer = Chip_I2S_Receive(LPC_I2S0);

            Chip_I2S_RxStop(LPC_I2S0);

 

            //Play Sound

 

            Chip_I2S_TxStart(LPC_I2S0);

            Chip_I2S_Send(LPC_I2S0, buffer);

            Chip_I2S_TxStop(LPC_I2S0);

        }

    }

Normally the program should record sound and the play it directly.

But it does nothing...

I know how to play sound from a buffer, I saw the example "ea_audio_i2s" from LPC Open. But there is no example for recording sound. There is an example "periph_i2s" but it doesn't run...

 

I've already wasted two whole days and now I don't know what to do anymore.

I really tried everything.

 

Maybe my jumpers are set wrong. I attached to photos of my configuration.

 

I found a similar question here:

LPC4088 receiving data from UDA1380 using I2S | www.LPCware.com

...but nobody answered to this post.

 

I am using this development kit:

https://www.embeddedartists.com/products/kits/lpc4357_kit.php

And I have the LPC-Link 2 for debugging.

 

Thanks for taking time and reading.

 

Best regards

Julian

Labels (3)
0 Kudos
1 Solution
665 Views
julianhoerz
Contributor II

Ok, the examples are working. I forgot to set a jumper on my board...

Thanks anyway! :smileyhappy:

View solution in original post

0 Kudos
3 Replies
665 Views
daianacasas
Contributor I

Hi, i've a question about serial data out.
I am using an adc with this interface, I need to read the data an this is a signed-2's-complement, and bit 0 is the MSB, i'm correct?

0 Kudos
666 Views
julianhoerz
Contributor II

Ok, the examples are working. I forgot to set a jumper on my board...

Thanks anyway! :smileyhappy:

0 Kudos
665 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos