<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: LPC4088 as I2S Transmitter Slave 4-wire with SGTL5000 in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4088-as-I2S-Transmitter-Slave-4-wire-with-SGTL5000/m-p/1035650#M40337</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, im Just answering this by myself because i want to help others.&lt;/P&gt;&lt;P&gt;In efect you cant use 4-wire TX as a Slave if yoou dont keep the i2s RX slave Instance working. I did several tests and this is how it works.&lt;BR /&gt;For &lt;A href="https://os.mbed.com/users/embeddedartists/code/I2S//rev/af579d286498/"&gt;mbed I2S lirbrary&lt;/A&gt;&amp;nbsp;you have to:&lt;/P&gt;&lt;P&gt;Create an I2S Receiver object and configure it,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I2S* i2s_rx = new I2S( I2S_RECEIVE, p17, p16, p15 );///this can be static if you need to and, belong to a class&lt;/P&gt;&lt;P&gt;i2s_rx.frequency(8000);&lt;BR /&gt; i2s_rx.wordsize(16);&lt;BR /&gt; i2s_rx.stereomono(I2S_MONO);&lt;BR /&gt; i2s_rx.masterslave(I2S_SLAVE);&lt;BR /&gt; i2s_rx.attach(&amp;amp;SGTL5000::I2S_RxData);&lt;BR /&gt; i2s_rx.start();&lt;BR /&gt; //int rxData = i2s_rx.read();//for testing&lt;BR /&gt; i2s_rx.stop();//this function wont deactivate the IRQ for TX/RXFIFO this must be a BUG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only after this element you can create an I2S transmitter element as follows:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I2S*&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;i2s_tx(I2S_TRANSMIT, p11, true);&lt;SPAN&gt;//this can be static if you need to, and belong to a class&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;i2s_tx.frequency(8000);&lt;BR /&gt; i2s_tx.wordsize(16);&lt;BR /&gt; i2s_tx.stereomono(I2S_STEREO);&lt;BR /&gt; i2s_tx.masterslave(I2S_SLAVE);&lt;BR /&gt; int yes = i2s_tx.setup_ok();&lt;BR /&gt; i2s_tx.attach(&amp;amp;SGTL5000::I2S_TxData);&lt;BR /&gt; i2s_tx.start();&lt;BR /&gt; //char datotest[]={5};&lt;BR /&gt; //i2s_tx.write(datotest, 1);&lt;BR /&gt; i2s_tx.stop();&lt;SPAN&gt;//this function wont deactivate the IRQ for TX/RXFIFO this must be a BUG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, in contrary case you can use 4wire RX but before you need 3 wire master TX&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Dec 2019 17:34:58 GMT</pubDate>
    <dc:creator>alefachinic</dc:creator>
    <dc:date>2019-12-12T17:34:58Z</dc:date>
    <item>
      <title>LPC4088 as I2S Transmitter Slave 4-wire with SGTL5000</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4088-as-I2S-Transmitter-Slave-4-wire-with-SGTL5000/m-p/1035649#M40336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello I cant transmit as Slave with 4-wire using I2S.&lt;/P&gt;&lt;P&gt;Electrical Setup using LPCQuickStartBoard rev B:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;SGTL5000_DOUT to LPC4357_RX_SDA p17 (P0.25)&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;SGTL5000_DIN to LPC4357_TX_SDA&amp;nbsp;p11 (P0.9)&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;SGTL5000_SCK to LPC4357_RX_SCK p15 (P0.23)&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;SGTL5000_WS to LPC4357_RX_WS p16 (P0.16)&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;SGTL is in Master Mode:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;SCK is 512 Khz (scope tested)&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;WS is 8kHz (scope tested)&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Fs is kHz (programmed into SGTL5000)&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;SGTL is using PLL with a 24 MHz oscilator&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;SGTL is transmitting noise because i have mic multiplexed to I2S out&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I need to Play sound from LPC to SGTL, i cant seems to send data.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;From UM10562 Section 23 the setups i need for this to work are:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Reception Fig 136 Typicalreceiver Slave mode using 3 pins as Input&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I2S_RX_CLK&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;I2S_RX_SDA&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I2S_RX_WS&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I2SDAI[5]=1&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I2SRXMODE[3:0]=0000&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;IOCON register is also correctly asigned to function.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;EM&gt;FOR NOW NO DMA IS INTENTED TO BE USED&lt;/EM&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Transmission Fig 132 4-wire transmitter slave mode sharing the receiver bit clock and WS, uses one Pin as Output:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I2S_TX_SDA&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Clock is derived from RX bit clock&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WS is derived from RX_WS&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I2SDAO[5]=1&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I2STXMODE[3:0]=0100&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;IOCON register is also correctly asigned to function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;&lt;EM&gt;FOR NOW NO DMA IS INTENTED TO BE USED&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;When i run the program in debug mode and send a byte to the TXFIFO i get&amp;nbsp; the interrupt but no byte is sent to the pin.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;Using direct write to the FIFO:&amp;nbsp;LPC_I2S-&amp;gt;TXFIFO = 0x55; produces no output even when the ISR ins triggered and also the TX Interrupt fifo level is set to 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;Here is my code using a Library from mbed&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;I2S* i2s_tx = new I2S( I2S_TRANSMIT, p11, true );&lt;BR /&gt; i2s_tx-&amp;gt;frequency(8000);&lt;BR /&gt; i2s_tx-&amp;gt;wordsize(16);&lt;BR /&gt; i2s_tx-&amp;gt;stereomono(I2S_STEREO);&lt;BR /&gt; i2s_tx-&amp;gt;masterslave(I2S_SLAVE);&lt;BR /&gt; i2s_tx-&amp;gt;set_interrupt_fifo_level(1);&lt;BR /&gt; int yes = i2s_tx-&amp;gt;setup_ok();&lt;BR /&gt; i2s_tx-&amp;gt;attach(&amp;amp;SGTL5000::I2S_TxData);//callback to the ISR interrupt call&lt;BR /&gt; i2s_tx-&amp;gt;start(); &lt;BR /&gt; int datotest[]={5};&lt;BR /&gt; i2s_tx-&amp;gt;write(datotest, 1); //send one data&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;I suspect that there is some missing config in the 4-wire mode. When i check the registers using the path from UM10562 Fig.139 "I2S clocking and pin connections" the values seems correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;My question is Do i need to configure an RX object before using the TX 4-wire mode? or it can be independant?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;The data is not showing in TX SDA&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2019 12:35:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4088-as-I2S-Transmitter-Slave-4-wire-with-SGTL5000/m-p/1035649#M40336</guid>
      <dc:creator>alefachinic</dc:creator>
      <dc:date>2019-12-12T12:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4088 as I2S Transmitter Slave 4-wire with SGTL5000</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4088-as-I2S-Transmitter-Slave-4-wire-with-SGTL5000/m-p/1035650#M40337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, im Just answering this by myself because i want to help others.&lt;/P&gt;&lt;P&gt;In efect you cant use 4-wire TX as a Slave if yoou dont keep the i2s RX slave Instance working. I did several tests and this is how it works.&lt;BR /&gt;For &lt;A href="https://os.mbed.com/users/embeddedartists/code/I2S//rev/af579d286498/"&gt;mbed I2S lirbrary&lt;/A&gt;&amp;nbsp;you have to:&lt;/P&gt;&lt;P&gt;Create an I2S Receiver object and configure it,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I2S* i2s_rx = new I2S( I2S_RECEIVE, p17, p16, p15 );///this can be static if you need to and, belong to a class&lt;/P&gt;&lt;P&gt;i2s_rx.frequency(8000);&lt;BR /&gt; i2s_rx.wordsize(16);&lt;BR /&gt; i2s_rx.stereomono(I2S_MONO);&lt;BR /&gt; i2s_rx.masterslave(I2S_SLAVE);&lt;BR /&gt; i2s_rx.attach(&amp;amp;SGTL5000::I2S_RxData);&lt;BR /&gt; i2s_rx.start();&lt;BR /&gt; //int rxData = i2s_rx.read();//for testing&lt;BR /&gt; i2s_rx.stop();//this function wont deactivate the IRQ for TX/RXFIFO this must be a BUG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only after this element you can create an I2S transmitter element as follows:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I2S*&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;i2s_tx(I2S_TRANSMIT, p11, true);&lt;SPAN&gt;//this can be static if you need to, and belong to a class&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;i2s_tx.frequency(8000);&lt;BR /&gt; i2s_tx.wordsize(16);&lt;BR /&gt; i2s_tx.stereomono(I2S_STEREO);&lt;BR /&gt; i2s_tx.masterslave(I2S_SLAVE);&lt;BR /&gt; int yes = i2s_tx.setup_ok();&lt;BR /&gt; i2s_tx.attach(&amp;amp;SGTL5000::I2S_TxData);&lt;BR /&gt; i2s_tx.start();&lt;BR /&gt; //char datotest[]={5};&lt;BR /&gt; //i2s_tx.write(datotest, 1);&lt;BR /&gt; i2s_tx.stop();&lt;SPAN&gt;//this function wont deactivate the IRQ for TX/RXFIFO this must be a BUG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, in contrary case you can use 4wire RX but before you need 3 wire master TX&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2019 17:34:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4088-as-I2S-Transmitter-Slave-4-wire-with-SGTL5000/m-p/1035650#M40337</guid>
      <dc:creator>alefachinic</dc:creator>
      <dc:date>2019-12-12T17:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4088 as I2S Transmitter Slave 4-wire with SGTL5000</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4088-as-I2S-Transmitter-Slave-4-wire-with-SGTL5000/m-p/1035651#M40338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alejandro,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for sharing your solution with the community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Felipe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2019 22:45:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4088-as-I2S-Transmitter-Slave-4-wire-with-SGTL5000/m-p/1035651#M40338</guid>
      <dc:creator>FelipeGarcia</dc:creator>
      <dc:date>2019-12-13T22:45:33Z</dc:date>
    </item>
  </channel>
</rss>

