I2S communication with LPCXpresso55s69

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

I2S communication with LPCXpresso55s69

664 Views
scoottroop
Contributor II

Hello! i'm currently working on a project where i need to transmit data from a sound analyser to the LPCXpresso55s69 through I2s, and I can't quite wrap my head around which ports I should use. I'm new to the microcontroller and I'm new to the i2s protocol in general!

From the datasheet I see some pins related to i2s
PIO0_19-21 and PIO1_13. I know I need 3 pins, PIO1_13 could be used for receiving data I think, but I'm unsure which pins to use for word select and sck since PIO0_19-21 are referred to as Tx/ transmitting.
In general, do you have any tips when choosing pins, are there any guides on which function to use in different applications and how to initiate them in the source file? I've seen a tutorial on choosing the pin layout using the config tools, but not how to initiate the code in the source file!

Thank you in advance, hope my question is somewhat clear!

0 Kudos
Reply
5 Replies

634 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

For LPC55S69, It is okay to use the following pins as I2S pins.

1)PIO0_19: FC4_SCK, I2S bit clock

2)PIO1_20:FC4_TXD_SCL_MISO_WS, I2S frame clock

3)PIO1_21:FC4_RXD_SDA_MOSI_DATA, I2S data pin.

The above interface can function as either receiver or transmitter, master or slave

Hope it can help you

BR

XiangJun Rong

0 Kudos
Reply

629 Views
scoottroop
Contributor II

Hey @xiangjun_rong ! Thank you for clarifying! I've changed the pins and I've tried to take some parts from the i2s_interrupt_record_playback SDK example but I'm very unsure about what I am doing, especially regarding the clock sources used. Since the microcontroller will be considered the slave device, it should have an external clock signal, but I'm unsure how to apply it. 


if you have the time, it would be amazing if you could have a look and see if what i'm doing is somewhat correct, since I have no clue how to get it up running If I'm perfectly honest! i'm thinking that i don't have to make use of the codec, or tx, and has therefore removed these. i'm unsure of my setup in the peripherals and clocking scheme as well. currently, i'm using transfer mode + Rx record as normal slave.

I've also made some changes to the number of bits (24 from 16) and the clock source in the DEMO_I2S_CLOCK_DIVIDER. I'll attach my project but if you don't have time, maybe you have some tips on where I learn more about the initialisations i need to do in the source code. The aim is to perform signal processing on the data received from the i2s port. 

Thank you so much for your help!





0 Kudos
Reply

619 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I have checked your I2S pins,FC4_SCK,FC4_TXD_SCL_MISO_WS, FC4_RXD_SDA_MOSI_DATA, I suppose it is okay.

If the I2S of LPC is slave, the FC4_SCK/FC4_TXD_SCL_MISO_WS are input pins, driven by master, the FC4_RXD_SDA_MOSI_DATA is dependent on if it is transmitter or receiver.

Pls refer to the example as the following:

xiangjun_rong_0-1710484543518.png

Hope it can help you

BR

XiangJun Rong

 

0 Kudos
Reply

551 Views
scoottroop
Contributor II

Hello  again, i have routed the pins, clock and peripheral settings but in the pin.mux file it says that the pins are configured as i2c, although I have routed the pins as you said and initiated the peripheral as i2s slave. It doesn't make sense to me, should it be like that. As I said, I'm using the LPC55S69-EVK and 
PIO1_19 as FC4_SCK
Pio1_20 as FC4_SCL_Miso_WS and 
PIO1_21 as FC4_RXD_SDA_MOSI

@xiangjun_rong 

0 Kudos
Reply

610 Views
scoottroop
Contributor II

Hi! thank you for double checking my pins, i'm grateful for all the help you've provided so far.

I'm just confused about the flexcom. Should it have an internal clock source (currently 12MHz) or should it be driven with an external master clock? I'm not sure how this is initiated! I think i've taken the rest in a good way from the examples, it's just the clocking that I'm not sure on how to set up!

Thank you!

0 Kudos
Reply