<?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 LPC55S69 Continuous Data reception using SPI with DMA in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-Continuous-Data-reception-using-SPI-with-DMA/m-p/1349403#M46615</link>
    <description>&lt;P&gt;I wanted to read the sensor data continuously using SPI DMA mode. But with following code able to read the data only beginning and later will not be reading continuously. Please help to solve to read data continuously.&lt;/P&gt;&lt;P&gt;Following code is implement using SDK examples&lt;/P&gt;&lt;P&gt;/* DMA init */&lt;BR /&gt;DMA_Init(EXAMPLE_DMA);&lt;BR /&gt;/* Configure the DMA channel,priority and handle. */&lt;BR /&gt;DMA_EnableChannel(EXAMPLE_DMA, EXAMPLE_SPI_MASTER_TX_CHANNEL);&lt;BR /&gt;DMA_EnableChannel(EXAMPLE_DMA, EXAMPLE_SPI_MASTER_RX_CHANNEL);&lt;BR /&gt;DMA_SetChannelPriority(EXAMPLE_DMA, EXAMPLE_SPI_MASTER_TX_CHANNEL, kDMA_ChannelPriority0);&lt;BR /&gt;DMA_SetChannelPriority(EXAMPLE_DMA, EXAMPLE_SPI_MASTER_RX_CHANNEL, kDMA_ChannelPriority0);&lt;BR /&gt;DMA_CreateHandle(&amp;amp;masterTxHandle, EXAMPLE_DMA, EXAMPLE_SPI_MASTER_TX_CHANNEL);&lt;BR /&gt;DMA_CreateHandle(&amp;amp;masterRxHandle, EXAMPLE_DMA, EXAMPLE_SPI_MASTER_RX_CHANNEL);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;spi_transfer_t masterXfer;&lt;/P&gt;&lt;P&gt;/* Set up handle for spi master */&lt;BR /&gt;SPI_MasterTransferCreateHandleDMA(EXAMPLE_SPI_MASTER, &amp;amp;masterHandle, SPI_MasterUserCallback, NULL, &amp;amp;masterTxHandle,&lt;BR /&gt;&amp;amp;masterRxHandle);&lt;/P&gt;&lt;P&gt;/* Start master transfer */&lt;BR /&gt;masterXfer.txData = (uint8_t *)&amp;amp;masterTxData;&lt;BR /&gt;masterXfer.rxData = (uint8_t *)&amp;amp;masterRxData;&lt;BR /&gt;masterXfer.dataSize = TRANSFER_SIZE * sizeof(masterTxData[0]);&lt;BR /&gt;masterXfer.configFlags = kSPI_FrameAssert;&lt;/P&gt;&lt;P&gt;if (kStatus_Success != SPI_MasterTransferDMA(EXAMPLE_SPI_MASTER, &amp;amp;masterHandle, &amp;amp;masterXfer))&lt;BR /&gt;{&lt;BR /&gt;PRINTF("There is an error when start SPI_MasterTransferDMA \r\n ");&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Fri, 01 Oct 2021 04:00:00 GMT</pubDate>
    <dc:creator>Akashlp</dc:creator>
    <dc:date>2021-10-01T04:00:00Z</dc:date>
    <item>
      <title>LPC55S69 Continuous Data reception using SPI with DMA</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-Continuous-Data-reception-using-SPI-with-DMA/m-p/1349403#M46615</link>
      <description>&lt;P&gt;I wanted to read the sensor data continuously using SPI DMA mode. But with following code able to read the data only beginning and later will not be reading continuously. Please help to solve to read data continuously.&lt;/P&gt;&lt;P&gt;Following code is implement using SDK examples&lt;/P&gt;&lt;P&gt;/* DMA init */&lt;BR /&gt;DMA_Init(EXAMPLE_DMA);&lt;BR /&gt;/* Configure the DMA channel,priority and handle. */&lt;BR /&gt;DMA_EnableChannel(EXAMPLE_DMA, EXAMPLE_SPI_MASTER_TX_CHANNEL);&lt;BR /&gt;DMA_EnableChannel(EXAMPLE_DMA, EXAMPLE_SPI_MASTER_RX_CHANNEL);&lt;BR /&gt;DMA_SetChannelPriority(EXAMPLE_DMA, EXAMPLE_SPI_MASTER_TX_CHANNEL, kDMA_ChannelPriority0);&lt;BR /&gt;DMA_SetChannelPriority(EXAMPLE_DMA, EXAMPLE_SPI_MASTER_RX_CHANNEL, kDMA_ChannelPriority0);&lt;BR /&gt;DMA_CreateHandle(&amp;amp;masterTxHandle, EXAMPLE_DMA, EXAMPLE_SPI_MASTER_TX_CHANNEL);&lt;BR /&gt;DMA_CreateHandle(&amp;amp;masterRxHandle, EXAMPLE_DMA, EXAMPLE_SPI_MASTER_RX_CHANNEL);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;spi_transfer_t masterXfer;&lt;/P&gt;&lt;P&gt;/* Set up handle for spi master */&lt;BR /&gt;SPI_MasterTransferCreateHandleDMA(EXAMPLE_SPI_MASTER, &amp;amp;masterHandle, SPI_MasterUserCallback, NULL, &amp;amp;masterTxHandle,&lt;BR /&gt;&amp;amp;masterRxHandle);&lt;/P&gt;&lt;P&gt;/* Start master transfer */&lt;BR /&gt;masterXfer.txData = (uint8_t *)&amp;amp;masterTxData;&lt;BR /&gt;masterXfer.rxData = (uint8_t *)&amp;amp;masterRxData;&lt;BR /&gt;masterXfer.dataSize = TRANSFER_SIZE * sizeof(masterTxData[0]);&lt;BR /&gt;masterXfer.configFlags = kSPI_FrameAssert;&lt;/P&gt;&lt;P&gt;if (kStatus_Success != SPI_MasterTransferDMA(EXAMPLE_SPI_MASTER, &amp;amp;masterHandle, &amp;amp;masterXfer))&lt;BR /&gt;{&lt;BR /&gt;PRINTF("There is an error when start SPI_MasterTransferDMA \r\n ");&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2021 04:00:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-Continuous-Data-reception-using-SPI-with-DMA/m-p/1349403#M46615</guid>
      <dc:creator>Akashlp</dc:creator>
      <dc:date>2021-10-01T04:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 Continuous Data reception using SPI with DMA</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-Continuous-Data-reception-using-SPI-with-DMA/m-p/1350825#M46636</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/191937"&gt;@Akashlp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that you are doing excellent!&lt;/P&gt;
&lt;P&gt;Could you describe further the issue? Let me explain.&lt;/P&gt;
&lt;P&gt;The spi_dma_b2b_transfer_master SDK example , has the following&amp;nbsp; &amp;nbsp;output , when testing with another LPC55 board :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="diego_charles_0-1633473993422.png" style="width: 511px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/158324i594D6662095B46CC/image-dimensions/511x83?v=v2" width="511" height="83" role="button" title="diego_charles_0-1633473993422.png" alt="diego_charles_0-1633473993422.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Where 64 bytes are transferred&amp;nbsp; (using&amp;nbsp; masterXfer.dataSize = TRANSFER_SIZE * sizeof(masterTxData[0]) )&lt;/P&gt;
&lt;P&gt;As far I understand, your goal is&amp;nbsp; to initiate transfers with your sensor using&amp;nbsp; DMA correct? Maybe with a variable transfer length.&lt;/P&gt;
&lt;P&gt;Is the second transfer interrupted&amp;nbsp; or halted? Or your sensor is not responding anything , so the received data is 0xFF or 0x00?&lt;/P&gt;
&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Diego&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 22:57:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-Continuous-Data-reception-using-SPI-with-DMA/m-p/1350825#M46636</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2021-10-05T22:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 Continuous Data reception using SPI with DMA</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-Continuous-Data-reception-using-SPI-with-DMA/m-p/1352286#M46660</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/89833"&gt;@diego_charles&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goals is to receive the sensor data continuously and read on SPI DMA buffer. The length of data sent by sensor is 24 bytes to 30 bytes.&lt;/P&gt;&lt;P&gt;Even need to send some configuration setting data to sensor from SPI DMA.&lt;/P&gt;&lt;P&gt;I am able to read only 64 bytes of data on SPI buffer and later buffer is not updating.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 03:43:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-Continuous-Data-reception-using-SPI-with-DMA/m-p/1352286#M46660</guid>
      <dc:creator>Akashlp</dc:creator>
      <dc:date>2021-10-08T03:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 Continuous Data reception using SPI with DMA</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-Continuous-Data-reception-using-SPI-with-DMA/m-p/1357410#M46821</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/191937"&gt;@Akashlp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your reply and for your patience.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other day, I replied with feedback on your internal ticket , with the same inquiry.&amp;nbsp;Let me attach my reply , with several corrections , here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SPI DMA&amp;nbsp; examples are coded to perform a single transfer between two boards. If you would like to perform multiple DMA transfers you will need to do some minor modifications on the examples.&lt;/P&gt;
&lt;P&gt;If possible , I recommend you to test with two boards, your adaptation of the SPI DMA examples, this just to verify that your master code works as expected. Then perform communication with your SPI device.&lt;/P&gt;
&lt;P&gt;As I did some tests with the LSPI DMA examples, I am attaching my code, just for reference.&lt;/P&gt;
&lt;P&gt;Do not hesitate to let me know if you are still facing problems&lt;/P&gt;
&lt;P&gt;Best regards,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Diego.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 22:20:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-Continuous-Data-reception-using-SPI-with-DMA/m-p/1357410#M46821</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2021-10-18T22:20:24Z</dc:date>
    </item>
  </channel>
</rss>

