<?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>LPC Microcontrollers中的主题 Re: LPCXpresso860  SPI</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1935199#M56667</link>
    <description>&lt;P&gt;void EXAMPLE_MasterStartDMATransfer(void)&lt;BR /&gt;{&lt;BR /&gt;uint32_t i = 0U;&lt;BR /&gt;dma_transfer_config_t masterTxDmaConfig, masterRxDmaConfig;&lt;/P&gt;&lt;P&gt;/* Prepare buffer to send and receive data. */&lt;BR /&gt;for (i = 0U; i &amp;lt; BUFFER_SIZE; i++)&lt;BR /&gt;{&lt;BR /&gt;txBuffer[i] = i;&lt;BR /&gt;rxBuffer[i] = 0U;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Prepare and start DMA RX transfer. */&lt;BR /&gt;DMA_PrepareTransfer(&amp;amp;masterRxDmaConfig, (void *)&amp;amp;EXAMPLE_SPI_MASTER-&amp;gt;RXDAT, rxBuffer, sizeof(uint8_t), BUFFER_SIZE,&lt;BR /&gt;kDMA_PeripheralToMemory, NULL);&lt;BR /&gt;DMA_SubmitTransfer(&amp;amp;masterRxHandle, &amp;amp;masterRxDmaConfig);&lt;/P&gt;&lt;P&gt;/* Start DMA TX transfer. */&lt;BR /&gt;DMA_StartTransfer(&amp;amp;masterRxHandle);&lt;/P&gt;&lt;P&gt;/* Set the last byte to be sent, This will de-assert the SSEL pin when transmission is completed.&lt;BR /&gt;* If users want to assert the SSEL pin when transmission is completed, there is no need to set up this descriptor.&lt;BR /&gt;*/&lt;BR /&gt;lastData = txBuffer[BUFFER_SIZE - 1] | kSPI_EndOfTransfer | (EXAMPLE_SPI_MASTER-&amp;gt;TXCTL &amp;amp; 0xFFFF0000);&lt;/P&gt;&lt;P&gt;/* DMA transfer configuration setting. */&lt;BR /&gt;dma_xfercfg_t tmp_xfercfg = {0};&lt;BR /&gt;tmp_xfercfg.valid = true;&lt;BR /&gt;tmp_xfercfg.swtrig = true;&lt;BR /&gt;tmp_xfercfg.intA = true;&lt;BR /&gt;tmp_xfercfg.byteWidth = sizeof(uint32_t);&lt;BR /&gt;tmp_xfercfg.srcInc = 0;&lt;BR /&gt;tmp_xfercfg.dstInc = 0;&lt;BR /&gt;tmp_xfercfg.transferCount = 1;&lt;/P&gt;&lt;P&gt;/* Create chained descriptor to transmit last word */&lt;BR /&gt;DMA_CreateDescriptor(&amp;amp;txDescriptor, &amp;amp;tmp_xfercfg, &amp;amp;lastData, (void *)&amp;amp;EXAMPLE_SPI_MASTER-&amp;gt;TXDATCTL, NULL);&lt;/P&gt;&lt;P&gt;/* Add confifuration parameter to descriptor. */&lt;BR /&gt;DMA_PrepareTransfer(&amp;amp;masterTxDmaConfig, txBuffer, (void *)&amp;amp;EXAMPLE_SPI_MASTER-&amp;gt;TXDAT, sizeof(uint8_t),&lt;BR /&gt;BUFFER_SIZE - 1, kDMA_MemoryToPeripheral, &amp;amp;txDescriptor);&lt;/P&gt;&lt;P&gt;/* Disable interrupts for first descriptor to avoid calling callback twice. */&lt;BR /&gt;masterTxDmaConfig.xfercfg.intA = false;&lt;BR /&gt;masterTxDmaConfig.xfercfg.intB = false;&lt;/P&gt;&lt;P&gt;DMA_SubmitTransfer(&amp;amp;masterTxHandle, &amp;amp;masterTxDmaConfig);&lt;/P&gt;&lt;P&gt;/* Start DMA TX transfer. */&lt;BR /&gt;DMA_StartTransfer(&amp;amp;masterTxHandle);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I modify this function? Or add other configurations? Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2024 11:45:00 GMT</pubDate>
    <dc:creator>JZhang24z</dc:creator>
    <dc:date>2024-08-19T11:45:00Z</dc:date>
    <item>
      <title>LPCXpresso860  SPI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1935188#M56665</link>
      <description>&lt;P&gt;Hi.I have an SPI issue, may I know how to handle it? The official routine spi_transfer_rma_stlave calls the EXAMPLE_MasterStartDMATransfer() function twice in a row in the main function. The captured SPI waveform shows that the second transfer will raise the CS for each data.&amp;nbsp;&lt;SPAN&gt;We need to send data for the second time, and only raise CS after the data is sent. &lt;/SPAN&gt;&lt;SPAN&gt;It's not like raising CS every time we send data&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 11:41:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1935188#M56665</guid>
      <dc:creator>JZhang24z</dc:creator>
      <dc:date>2024-08-19T11:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso860  SPI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1935192#M56666</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="question.png" style="width: 772px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/293819i007B8D36811C89CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="question.png" alt="question.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 11:42:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1935192#M56666</guid>
      <dc:creator>JZhang24z</dc:creator>
      <dc:date>2024-08-19T11:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso860  SPI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1935199#M56667</link>
      <description>&lt;P&gt;void EXAMPLE_MasterStartDMATransfer(void)&lt;BR /&gt;{&lt;BR /&gt;uint32_t i = 0U;&lt;BR /&gt;dma_transfer_config_t masterTxDmaConfig, masterRxDmaConfig;&lt;/P&gt;&lt;P&gt;/* Prepare buffer to send and receive data. */&lt;BR /&gt;for (i = 0U; i &amp;lt; BUFFER_SIZE; i++)&lt;BR /&gt;{&lt;BR /&gt;txBuffer[i] = i;&lt;BR /&gt;rxBuffer[i] = 0U;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Prepare and start DMA RX transfer. */&lt;BR /&gt;DMA_PrepareTransfer(&amp;amp;masterRxDmaConfig, (void *)&amp;amp;EXAMPLE_SPI_MASTER-&amp;gt;RXDAT, rxBuffer, sizeof(uint8_t), BUFFER_SIZE,&lt;BR /&gt;kDMA_PeripheralToMemory, NULL);&lt;BR /&gt;DMA_SubmitTransfer(&amp;amp;masterRxHandle, &amp;amp;masterRxDmaConfig);&lt;/P&gt;&lt;P&gt;/* Start DMA TX transfer. */&lt;BR /&gt;DMA_StartTransfer(&amp;amp;masterRxHandle);&lt;/P&gt;&lt;P&gt;/* Set the last byte to be sent, This will de-assert the SSEL pin when transmission is completed.&lt;BR /&gt;* If users want to assert the SSEL pin when transmission is completed, there is no need to set up this descriptor.&lt;BR /&gt;*/&lt;BR /&gt;lastData = txBuffer[BUFFER_SIZE - 1] | kSPI_EndOfTransfer | (EXAMPLE_SPI_MASTER-&amp;gt;TXCTL &amp;amp; 0xFFFF0000);&lt;/P&gt;&lt;P&gt;/* DMA transfer configuration setting. */&lt;BR /&gt;dma_xfercfg_t tmp_xfercfg = {0};&lt;BR /&gt;tmp_xfercfg.valid = true;&lt;BR /&gt;tmp_xfercfg.swtrig = true;&lt;BR /&gt;tmp_xfercfg.intA = true;&lt;BR /&gt;tmp_xfercfg.byteWidth = sizeof(uint32_t);&lt;BR /&gt;tmp_xfercfg.srcInc = 0;&lt;BR /&gt;tmp_xfercfg.dstInc = 0;&lt;BR /&gt;tmp_xfercfg.transferCount = 1;&lt;/P&gt;&lt;P&gt;/* Create chained descriptor to transmit last word */&lt;BR /&gt;DMA_CreateDescriptor(&amp;amp;txDescriptor, &amp;amp;tmp_xfercfg, &amp;amp;lastData, (void *)&amp;amp;EXAMPLE_SPI_MASTER-&amp;gt;TXDATCTL, NULL);&lt;/P&gt;&lt;P&gt;/* Add confifuration parameter to descriptor. */&lt;BR /&gt;DMA_PrepareTransfer(&amp;amp;masterTxDmaConfig, txBuffer, (void *)&amp;amp;EXAMPLE_SPI_MASTER-&amp;gt;TXDAT, sizeof(uint8_t),&lt;BR /&gt;BUFFER_SIZE - 1, kDMA_MemoryToPeripheral, &amp;amp;txDescriptor);&lt;/P&gt;&lt;P&gt;/* Disable interrupts for first descriptor to avoid calling callback twice. */&lt;BR /&gt;masterTxDmaConfig.xfercfg.intA = false;&lt;BR /&gt;masterTxDmaConfig.xfercfg.intB = false;&lt;/P&gt;&lt;P&gt;DMA_SubmitTransfer(&amp;amp;masterTxHandle, &amp;amp;masterTxDmaConfig);&lt;/P&gt;&lt;P&gt;/* Start DMA TX transfer. */&lt;BR /&gt;DMA_StartTransfer(&amp;amp;masterTxHandle);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I modify this function? Or add other configurations? Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 11:45:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1935199#M56667</guid>
      <dc:creator>JZhang24z</dc:creator>
      <dc:date>2024-08-19T11:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso860  SPI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1935904#M56671</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Can you send us the project so that we can know the code context?&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Xiangjun Rong&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 06:48:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1935904#M56671</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-08-20T06:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso860  SPI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1936211#M56672</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JZhang24z_0-1724150301489.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/294126iB689EC33743DC9AB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JZhang24z_0-1724150301489.png" alt="JZhang24z_0-1724150301489.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 10:38:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1936211#M56672</guid>
      <dc:creator>JZhang24z</dc:creator>
      <dc:date>2024-08-20T10:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso860  SPI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1936213#M56673</link>
      <description>&lt;A href="https://mcuxpresso.nxp.com/en/example-projects?uvid=594999" target="_blank"&gt;https://mcuxpresso.nxp.com/en/example-projects?uvid=594999&lt;/A&gt;</description>
      <pubDate>Tue, 20 Aug 2024 10:39:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1936213#M56673</guid>
      <dc:creator>JZhang24z</dc:creator>
      <dc:date>2024-08-20T10:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso860  SPI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1938879#M56690</link>
      <description>&lt;P&gt;Is there any result yet?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 03:27:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1938879#M56690</guid>
      <dc:creator>JZhang24z</dc:creator>
      <dc:date>2024-08-23T03:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso860  SPI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1939088#M56694</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;As you know that the SPI is &lt;SPAN&gt;Full Duplex&lt;/SPAN&gt; protocol, the transmitter and receiver work synchronously, the spi uses two DMA channels, one is for receiver, another is for transmitter&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1724400708621.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/294969i0D88EF29019B6319/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1724400708621.png" alt="xiangjun_rong_0-1724400708621.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 08:12:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1939088#M56694</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-08-23T08:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso860  SPI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1939608#M56701</link>
      <description>&lt;P&gt;I don't know why I called this function twice. The first time I called this function to send data, CS was pulled down during the entire data transmission process. The second time I called it, CS was indeed pulled up for each data transmission.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="que.jpg" style="width: 453px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/295096iF4ED59A11B531AF3/image-size/large?v=v2&amp;amp;px=999" role="button" title="que.jpg" alt="que.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2024 01:42:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1939608#M56701</guid>
      <dc:creator>JZhang24z</dc:creator>
      <dc:date>2024-08-25T01:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso860  SPI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1939906#M56706</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;As the following screenshot,&lt;/P&gt;
&lt;DIV style="background-color: #ffffff; padding: 0px 0px 0px 2px;"&gt;
&lt;DIV style="color: #000000; background-color: #ffffff; font-family: 'Consolas'; font-size: 10pt; white-space: pre;"&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;EXAMPLE_MasterStartDMATransfer&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&lt;SPAN&gt;is called only once.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background-color: #e8f2fe; margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1724647338403.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/295145i1C028251E83A7EED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1724647338403.png" alt="xiangjun_rong_0-1724647338403.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 04:43:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1939906#M56706</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-08-26T04:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso860  SPI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1939935#M56708</link>
      <description>&lt;P&gt;yes,demo is&amp;nbsp;&lt;SPAN&gt;called once.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But. I need to modify this demo by calling this function multiple times. How can I avoid a second call where the master sends a data and then raises the CS value? For example. I need to send 8 bytes of data, and I hope to send all 8 bytes of data before raising the CS. The current practice is to go to the initial SPI（EXAMPLE-SPIMasterInit()), before call this function;... It shouldn't be used that way, right?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 05:41:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1939935#M56708</guid>
      <dc:creator>JZhang24z</dc:creator>
      <dc:date>2024-08-26T05:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso860  SPI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1940301#M56715</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;If you want to call the function multiple times, you have to poll if the predefined number of data has been transferred, after the DMA transfer completed, then you can call again.&lt;/P&gt;
&lt;DIV style="background-color: #ffffff; padding: 0px 0px 0px 2px;"&gt;
&lt;DIV style="color: #000000; background-color: #ffffff; font-family: 'Consolas'; font-size: 10pt; white-space: pre;"&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;int&lt;/SPAN&gt; &lt;SPAN&gt;main&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;void&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;/* Initialize the boards */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;/* Attach main clock to USART0 (debug console) */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; CLOCK_Select(&lt;/SPAN&gt;&lt;SPAN&gt;kUART0_Clk_From_MainClk&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; BOARD_InitBootPins();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; BOARD_BootClockFRO48M();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; BOARD_InitDebugConsole();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;/* Attach main clock to SPI0. */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; CLOCK_Select(&lt;/SPAN&gt;&lt;SPAN&gt;kSPI0_Clk_From_MainClk&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; PRINTF(&lt;/SPAN&gt;&lt;SPAN&gt;"This is SPI &lt;/SPAN&gt;&lt;SPAN&gt;dma&lt;/SPAN&gt;&lt;SPAN&gt; transfer master example!\n\r"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; PRINTF(&lt;/SPAN&gt;&lt;SPAN&gt;"To make sure the transfer work successfully, please start the slave board first!\n\r"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;/* Initialize the SPI master with configuration. */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; EXAMPLE_SPIMasterInit();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;/* Set up DMA configuration. */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; EXAMPLE_MasterDMASetup();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;/* Start transfer with slave board. */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;loop: &lt;/SPAN&gt;&lt;SPAN&gt;__asm&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;nop&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; EXAMPLE_MasterStartDMATransfer();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;while&lt;/SPAN&gt;&lt;SPAN&gt;(masterTxFinished) {}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; masterTxFinished=false;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;goto&lt;/SPAN&gt;&lt;SPAN&gt; loop;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;/* Check the received data. */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; EXAMPLE_TransferDataCheck();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;/* De-initialize the DMA. */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; DMA_Deinit(EXAMPLE_SPI_MASTER_DMA_BASEADDR);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;/* De-initialize the SPI. */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; SPI_Deinit(EXAMPLE_SPI_MASTER);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;while&lt;/SPAN&gt;&lt;SPAN&gt; (1)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;Hope it can help you&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;XiangJun Rong&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 26 Aug 2024 10:05:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCXpresso860-SPI/m-p/1940301#M56715</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-08-26T10:05:31Z</dc:date>
    </item>
  </channel>
</rss>

