<?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 SPI Rx interrupt not generated in LPC55S28 if we disable SPI Tx interrupt in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-Rx-interrupt-not-generated-in-LPC55S28-if-we-disable-SPI-Tx/m-p/1184376#M42905</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using LPC55S28 EVM board. i have 2 LPC55S28 EVM boards and&amp;nbsp; i tried to run SPI master slave SPI SDK example on that.&lt;/P&gt;&lt;P&gt;On Baord-1, i have flashed "lpcxpresso55s28_SDK_spi_interrupt_b2b_master" SDK example code.&lt;/P&gt;&lt;P&gt;And on Board-2 , i have flashed "lpcxpresso55s28_SDK_spi_interrupt_b2b_slave" SDK example code.&lt;/P&gt;&lt;P&gt;I have connected pins as described in Readme of the SDK example code. Readme also attached with this case.&lt;/P&gt;&lt;P&gt;Without any change in code everything works fine , data send from master device and received at slave device. Again same received data send from slave device and received properly at master side.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But Now i want to only receive data at slave side. So if i disable Tx -interrupt at slave side then i cannot receive data in slave device.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In "spi_interrupt_b2b_slave.c" file of SDK example code , in main functoion i have disabled tx interrupt as below :&lt;/P&gt;&lt;P&gt;Original :&amp;nbsp;SPI_EnableInterrupts(EXAMPLE_SPI_SLAVE, kSPI_RxLvlIrq | kSPI_TxLvlIrq);&lt;/P&gt;&lt;P&gt;Changed to :&amp;nbsp;SPI_EnableInterrupts(EXAMPLE_SPI_SLAVE, kSPI_RxLvlIrq);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So after that if Master sends data over SPI , then Rx interrupt not generated at slave side and code not goes in Irq function.&lt;/P&gt;&lt;P&gt;I have attached SPI master-slave example code with this case.&lt;/P&gt;&lt;P&gt;Can anyone explain me this behavior. How i solve this issue?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rahul Shah&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2020 09:02:39 GMT</pubDate>
    <dc:creator>rahulshah</dc:creator>
    <dc:date>2020-11-17T09:02:39Z</dc:date>
    <item>
      <title>SPI Rx interrupt not generated in LPC55S28 if we disable SPI Tx interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-Rx-interrupt-not-generated-in-LPC55S28-if-we-disable-SPI-Tx/m-p/1184376#M42905</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using LPC55S28 EVM board. i have 2 LPC55S28 EVM boards and&amp;nbsp; i tried to run SPI master slave SPI SDK example on that.&lt;/P&gt;&lt;P&gt;On Baord-1, i have flashed "lpcxpresso55s28_SDK_spi_interrupt_b2b_master" SDK example code.&lt;/P&gt;&lt;P&gt;And on Board-2 , i have flashed "lpcxpresso55s28_SDK_spi_interrupt_b2b_slave" SDK example code.&lt;/P&gt;&lt;P&gt;I have connected pins as described in Readme of the SDK example code. Readme also attached with this case.&lt;/P&gt;&lt;P&gt;Without any change in code everything works fine , data send from master device and received at slave device. Again same received data send from slave device and received properly at master side.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But Now i want to only receive data at slave side. So if i disable Tx -interrupt at slave side then i cannot receive data in slave device.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In "spi_interrupt_b2b_slave.c" file of SDK example code , in main functoion i have disabled tx interrupt as below :&lt;/P&gt;&lt;P&gt;Original :&amp;nbsp;SPI_EnableInterrupts(EXAMPLE_SPI_SLAVE, kSPI_RxLvlIrq | kSPI_TxLvlIrq);&lt;/P&gt;&lt;P&gt;Changed to :&amp;nbsp;SPI_EnableInterrupts(EXAMPLE_SPI_SLAVE, kSPI_RxLvlIrq);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So after that if Master sends data over SPI , then Rx interrupt not generated at slave side and code not goes in Irq function.&lt;/P&gt;&lt;P&gt;I have attached SPI master-slave example code with this case.&lt;/P&gt;&lt;P&gt;Can anyone explain me this behavior. How i solve this issue?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rahul Shah&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 09:02:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-Rx-interrupt-not-generated-in-LPC55S28-if-we-disable-SPI-Tx/m-p/1184376#M42905</guid>
      <dc:creator>rahulshah</dc:creator>
      <dc:date>2020-11-17T09:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: SPI Rx interrupt not generated in LPC55S28 if we disable SPI Tx interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-Rx-interrupt-not-generated-in-LPC55S28-if-we-disable-SPI-Tx/m-p/1185038#M42914</link>
      <description>&lt;P&gt;Hello&amp;nbsp; Rahul Shah,&lt;/P&gt;
&lt;P&gt;ISP must send data, at the same time it can received data.&lt;/P&gt;
&lt;P&gt;You disable slave Tx interrupt, from the SDK slave code, we can see it can't run into interrupt at start,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so won't run slave Tx funciton " SPI_WriteData(EXAMPLE_SPI_SLAVE, (uint16_t)(srcBuff[BUFFER_SIZE - txIndex]), 0);".&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can add this function in main() to test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 08:07:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-Rx-interrupt-not-generated-in-LPC55S28-if-we-disable-SPI-Tx/m-p/1185038#M42914</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2020-11-18T08:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: SPI Rx interrupt not generated in LPC55S28 if we disable SPI Tx interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-Rx-interrupt-not-generated-in-LPC55S28-if-we-disable-SPI-Tx/m-p/1185282#M42922</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Alice_Yang,&lt;BR /&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;So my main question is if i disable tx-interrupt from "SPI_EnableInterrupts" then i am never going in ISR. is it right?&lt;BR /&gt;Because if i enable Tx-interrupt , then ISR calling again and again. So i want ISR only calling when slave recieves the data over SPI otherwie ISR should not call.&lt;/P&gt;&lt;P&gt;So how i only receive data from ISR function without enabling Tx-interrupt.&lt;/P&gt;&lt;P&gt;-Regards,&lt;BR /&gt;Rahul Shah&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 14:51:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-Rx-interrupt-not-generated-in-LPC55S28-if-we-disable-SPI-Tx/m-p/1185282#M42922</guid>
      <dc:creator>rahulshah</dc:creator>
      <dc:date>2020-11-18T14:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: SPI Rx interrupt not generated in LPC55S28 if we disable SPI Tx interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-Rx-interrupt-not-generated-in-LPC55S28-if-we-disable-SPI-Tx/m-p/1185664#M42927</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So my main question is if i disable tx-interrupt from "SPI_EnableInterrupts" then i am never going in ISR. is it right?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-&amp;gt;&amp;gt; No.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So how i only receive data from ISR function without enabling Tx-interrupt.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-&amp;gt;&amp;gt;You can disable Tx-interrupt, while you need send data to master, at the same time, slave can received data automatically.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And if you just want to SPI slave receive, not send, you can try to the function of ignore transmit data :&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;(UM11126, P673)&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorAlice_Yang_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="spi.jpg" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/130442i2A120EE2E3945DB9/image-size/large?v=v2&amp;amp;px=999" role="button" title="spi.jpg" alt="spi.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please also pay attention:&lt;/P&gt;
&lt;P&gt;"To set-up a slave SPI for receive only, the control bit settings must be pushed into the&lt;BR /&gt;write FIFO to become active. Therefore,&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt; at least one write to the FIFOWR data bits must&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;be done to make the control bits active&lt;/STRONG&gt;&lt;/FONT&gt;"&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regard,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Alice&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 02:24:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-Rx-interrupt-not-generated-in-LPC55S28-if-we-disable-SPI-Tx/m-p/1185664#M42927</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2020-11-19T02:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: SPI Rx interrupt not generated in LPC55S28 if we disable SPI Tx interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-Rx-interrupt-not-generated-in-LPC55S28-if-we-disable-SPI-Tx/m-p/1201777#M43306</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I have added TXIGNORE=1 as follows (1&amp;lt;&amp;lt;23):&lt;/P&gt;&lt;P&gt;EXAMPLE_SPI_SLAVE-&amp;gt;FIFOWR= (0x01|&lt;BR /&gt;((uint32_t)SPI_FIFOWR_LEN(kSPI_Data8Bits) |&lt;BR /&gt;(SPI_DEASSERT_ALL &amp;amp; (~SPI_DEASSERTNUM_SSEL(0)))) | (1 &amp;lt;&amp;lt; 23)) ;&lt;/P&gt;&lt;P&gt;Also i have disabled tx-interrupt and disabled data sending from slave side from ISR&amp;nbsp; as follows :&lt;/P&gt;&lt;P&gt;// if ((SPI_GetStatusFlags(EXAMPLE_SPI_SLAVE) &amp;amp; kSPI_TxNotFullFlag) &amp;amp;&amp;amp; (txIndex &amp;gt; 0U))&lt;BR /&gt;// {&lt;BR /&gt;// SPI_WriteData(EXAMPLE_SPI_SLAVE, (uint16_t)(srcBuff[BUFFER_SIZE - txIndex]), 0);&lt;BR /&gt;// txIndex--;&lt;BR /&gt;// }&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;After that i am not getting data properly from master:&lt;/P&gt;&lt;P&gt;Master sends : [0,1,2,3,4,5,6,7,8,9,10,11,12,13..........63]&lt;/P&gt;&lt;P&gt;Slave receives : [0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,1....]&lt;/P&gt;&lt;P&gt;If i enable data sending from slave from ISR , then everything works fine.&lt;/P&gt;&lt;P&gt;I have added FIFOWR logic in init function so is that TXIGNORE bit set (1&amp;lt;&amp;lt;23) in FIFOWR is ok?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rahul Shah&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 10:54:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-Rx-interrupt-not-generated-in-LPC55S28-if-we-disable-SPI-Tx/m-p/1201777#M43306</guid>
      <dc:creator>rahulshah</dc:creator>
      <dc:date>2020-12-18T10:54:55Z</dc:date>
    </item>
  </channel>
</rss>

