AnsweredAssumed Answered

LPC4357 receiving data from UDA1380 using I2S

Question asked by Julian Hoerz on Jun 17, 2016
Latest reply on Dec 14, 2016 by daianacasas

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

Outcomes