<?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のトピックHow to use SSP to GPDMA with linked list?</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-SSP-to-GPDMA-with-linked-list/m-p/600566#M23315</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've download LPC open, there is a sample described how to use GPDMA to move data from SSP0 buffer to RAM without using linked list.&lt;/P&gt;&lt;P&gt;I've test it without linked list, its works.&lt;/P&gt;&lt;P&gt;But I need to do it with linked list.&lt;/P&gt;&lt;P&gt;Can anyone provide a GPDMA sample code with linked list?&lt;BR /&gt;Or help me to edit&amp;nbsp;my code, thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define BUFFER_SIZE (2000)&lt;BR /&gt;uint8 Rx_Buf[2][BUFFER_SIZE];&lt;BR /&gt;static uint8_t dmaChSSPRx;&lt;BR /&gt;static DMA_TransferDescriptor_t gDMADescriptor[2];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt; Chip_GPDMA_Init(LPC_GPDMA);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt; NVIC_DisableIRQ(DMA_IRQn);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt; NVIC_SetPriority(DMA_IRQn, ((0x01 &amp;lt;&amp;lt; 3) | 0x01));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt; NVIC_EnableIRQ(DMA_IRQn);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Chip_SSP_DMA_Enable(LPC_SSP0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;dmaChSSPRx = Chip_GPDMA_GetFreeChannel(LPC_GPDMA, GPDMA_CONN_SSP0_Rx);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Chip_GPDMA_PrepareDescriptor(LPC_GPDMA, &amp;amp;gDMADescriptor[0], GPDMA_CONN_SSP0_Rx, (uint32_t)&amp;amp;Rx_Buf[0][0], BUFFER_SIZE, GPDMA_TRANSFERTYPE_P2M_CONTROLLER_DMA, &amp;amp;gDMADescriptor[1]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Chip_GPDMA_PrepareDescriptor(LPC_GPDMA, &amp;amp;gDMADescriptor[1], GPDMA_CONN_SSP0_Rx, (uint32_t)&amp;amp;Rx_Buf[1][0], BUFFER_SIZE, GPDMA_TRANSFERTYPE_P2M_CONTROLLER_DMA, &amp;amp;gDMADescriptor[0]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Chip_GPDMA_SGTransfer(LPC_GPDMA, dmaChSSPRx, &amp;amp;gDMADescriptor[0], GPDMA_TRANSFERTYPE_P2M_CONTROLLER_DMA);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I received GPDMA_STAT_INTERR interrupt after I called&amp;nbsp;&lt;SPAN&gt;Chip_GPDMA_SGTransfer.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After I check out the register, I found there may be a error in&amp;nbsp;Chip_GPDMA_PrepareDescriptor.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;typedef struct DMA_TransferDescriptor {&lt;BR /&gt; uint32_t src; /*!&amp;lt; Source address */&lt;BR /&gt; uint32_t dst; /*!&amp;lt; Destination address */&lt;BR /&gt; uint32_t lli; /*!&amp;lt; Pointer to next descriptor structure */&lt;BR /&gt; uint32_t ctrl; /*!&amp;lt; Control word that has transfer size, type etc. */&lt;BR /&gt;} DMA_TransferDescriptor_t;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The src is incorrect, it should be&amp;nbsp;GPDMA_CONN_SSP0_Rx not&amp;nbsp;&amp;amp;LPC_SSP0-&amp;gt;DR.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This will cause&amp;nbsp;Chip_GPDMA_InitChannelCfg called by&amp;nbsp;Chip_GPDMA_SGTransfer operated incorrect.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Therefore, I've add some code to fix it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;gDMADescriptor[0].src = GPDMA_CONN_SSP0_Rx;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;gDMADescriptor[1].src = GPDMA_CONN_SSP0_Rx;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After add this, The first block of Rx_Buf which size is BUFFER_SIZE works fine. But after it finished,&amp;nbsp;DMA_IRQHandler happened constantly by&amp;nbsp;GPDMA_STAT_INTERR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not know what I did wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Sep 2016 09:46:21 GMT</pubDate>
    <dc:creator>koting</dc:creator>
    <dc:date>2016-09-08T09:46:21Z</dc:date>
    <item>
      <title>How to use SSP to GPDMA with linked list?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-SSP-to-GPDMA-with-linked-list/m-p/600566#M23315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've download LPC open, there is a sample described how to use GPDMA to move data from SSP0 buffer to RAM without using linked list.&lt;/P&gt;&lt;P&gt;I've test it without linked list, its works.&lt;/P&gt;&lt;P&gt;But I need to do it with linked list.&lt;/P&gt;&lt;P&gt;Can anyone provide a GPDMA sample code with linked list?&lt;BR /&gt;Or help me to edit&amp;nbsp;my code, thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define BUFFER_SIZE (2000)&lt;BR /&gt;uint8 Rx_Buf[2][BUFFER_SIZE];&lt;BR /&gt;static uint8_t dmaChSSPRx;&lt;BR /&gt;static DMA_TransferDescriptor_t gDMADescriptor[2];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt; Chip_GPDMA_Init(LPC_GPDMA);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt; NVIC_DisableIRQ(DMA_IRQn);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt; NVIC_SetPriority(DMA_IRQn, ((0x01 &amp;lt;&amp;lt; 3) | 0x01));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt; NVIC_EnableIRQ(DMA_IRQn);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Chip_SSP_DMA_Enable(LPC_SSP0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;dmaChSSPRx = Chip_GPDMA_GetFreeChannel(LPC_GPDMA, GPDMA_CONN_SSP0_Rx);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Chip_GPDMA_PrepareDescriptor(LPC_GPDMA, &amp;amp;gDMADescriptor[0], GPDMA_CONN_SSP0_Rx, (uint32_t)&amp;amp;Rx_Buf[0][0], BUFFER_SIZE, GPDMA_TRANSFERTYPE_P2M_CONTROLLER_DMA, &amp;amp;gDMADescriptor[1]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Chip_GPDMA_PrepareDescriptor(LPC_GPDMA, &amp;amp;gDMADescriptor[1], GPDMA_CONN_SSP0_Rx, (uint32_t)&amp;amp;Rx_Buf[1][0], BUFFER_SIZE, GPDMA_TRANSFERTYPE_P2M_CONTROLLER_DMA, &amp;amp;gDMADescriptor[0]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Chip_GPDMA_SGTransfer(LPC_GPDMA, dmaChSSPRx, &amp;amp;gDMADescriptor[0], GPDMA_TRANSFERTYPE_P2M_CONTROLLER_DMA);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I received GPDMA_STAT_INTERR interrupt after I called&amp;nbsp;&lt;SPAN&gt;Chip_GPDMA_SGTransfer.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After I check out the register, I found there may be a error in&amp;nbsp;Chip_GPDMA_PrepareDescriptor.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;typedef struct DMA_TransferDescriptor {&lt;BR /&gt; uint32_t src; /*!&amp;lt; Source address */&lt;BR /&gt; uint32_t dst; /*!&amp;lt; Destination address */&lt;BR /&gt; uint32_t lli; /*!&amp;lt; Pointer to next descriptor structure */&lt;BR /&gt; uint32_t ctrl; /*!&amp;lt; Control word that has transfer size, type etc. */&lt;BR /&gt;} DMA_TransferDescriptor_t;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The src is incorrect, it should be&amp;nbsp;GPDMA_CONN_SSP0_Rx not&amp;nbsp;&amp;amp;LPC_SSP0-&amp;gt;DR.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This will cause&amp;nbsp;Chip_GPDMA_InitChannelCfg called by&amp;nbsp;Chip_GPDMA_SGTransfer operated incorrect.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Therefore, I've add some code to fix it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;gDMADescriptor[0].src = GPDMA_CONN_SSP0_Rx;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;gDMADescriptor[1].src = GPDMA_CONN_SSP0_Rx;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After add this, The first block of Rx_Buf which size is BUFFER_SIZE works fine. But after it finished,&amp;nbsp;DMA_IRQHandler happened constantly by&amp;nbsp;GPDMA_STAT_INTERR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not know what I did wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 09:46:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-SSP-to-GPDMA-with-linked-list/m-p/600566#M23315</guid>
      <dc:creator>koting</dc:creator>
      <dc:date>2016-09-08T09:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to use SSP to GPDMA with linked list?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-SSP-to-GPDMA-with-linked-list/m-p/600567#M23316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I don't know ifyou already solved your problem. Anyway, I think that this could be the solution: &lt;A href="https://community.nxp.com/thread/422356"&gt;https://community.nxp.com/thread/422356&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Unfortunately there's a bug in the LPCOpen 2.12 and we have only this workaround as far as I know!&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2016 10:59:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-SSP-to-GPDMA-with-linked-list/m-p/600567#M23316</guid>
      <dc:creator>a_bet</dc:creator>
      <dc:date>2016-09-19T10:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to use SSP to GPDMA with linked list?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-SSP-to-GPDMA-with-linked-list/m-p/600568#M23317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately we don’t have an example exactly you need, however you also can refer to the CMSIS library example code.(suppose your device is LPC18xx). You can download it from next&amp;nbsp; link: &lt;A href="https://www.lpcware.com/content/nxpfile/lpc18xx-cmsis-compliant-standard-peripheral-firmware-driver-library-keil-iar"&gt;https://www.lpcware.com/content/nxpfile/lpc18xx-cmsis-compliant-standard-peripheral-firmware-driver-library-keil-iar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;After download it, please check the gdma_linklist.c file located at the path &amp;nbsp;&amp;lt;lpc18xx_path&amp;gt;/Examples/GPDMA/ Gpdma_Linklist&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt; Sol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2016 17:26:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-SSP-to-GPDMA-with-linked-list/m-p/600568#M23317</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2016-09-19T17:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use SSP to GPDMA with linked list?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-SSP-to-GPDMA-with-linked-list/m-p/600569#M23318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi @soledad, can I bing to your attention these two posts?&lt;BR /&gt;&lt;A href="https://community.nxp.com/thread/422128"&gt;GPDMA library + HSADC&lt;/A&gt; and &lt;A href="https://community.nxp.com/thread/422356"&gt;https://community.nxp.com/thread/422356&lt;/A&gt; , they highlight some some difficulties in using LPCOpen and the LPC4370.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2016 19:20:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-SSP-to-GPDMA-with-linked-list/m-p/600569#M23318</guid>
      <dc:creator>a_bet</dc:creator>
      <dc:date>2016-09-19T19:20:09Z</dc:date>
    </item>
  </channel>
</rss>

