<?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 LPC 1768 SSP GPDMA Strange Behaviour in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-1768-SSP-GPDMA-Strange-Behaviour/m-p/1261211#M44627</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I am getting strange behaviour when attempting to transmit and receive using the GPDMA for the SSP peripheral. It seems the receive FIFO is not updating the receive buffer specified in the GPDMA channel registers. I have to physically read the data register otherwise nothing is transferred to the buffer. I have counted the number of reads needed and it does not match the number of bytes in the transfer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am attempting to read the device ID from AT25DF321 flash device, which according to the datasheet has no dummy byte requirements.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here are the register values at the start of the transmission:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CH0
DMACCSrcAddr	0x10000970 (Hex)	
DMACCDestAddr	0x40088008 (Hex)	
DMACCLLI		0x0 (Hex)	
DMACCControl	0x84000004 (Hex)	
DMACCConfig		0x2c801 (Hex)	

CH1
DMACCSrcAddr	0x40088008 (Hex)	
DMACCDestAddr	0x10000970 (Hex)	
DMACCLLI		0x0 (Hex)	
DMACCControl	0x88000004 (Hex)	
DMACCConfig		0xd003 (Hex)	

DMACIntStat			0x0 (Hex)	
DMACIntTCStat		0x0 (Hex)	
DMACIntTCClear		0x0 (Hex)	
DMACIntErrStat		0x0 (Hex)	
DMACIntErrClr		0x0 (Hex)	
DMACRawIntTCStat	0x0 (Hex)	
DMACRawIntErrStat	0x0 (Hex)	
DMACEnbldChns		0x3 (Hex)	
DMACSoftBReq		0x500 (Hex)	
DMACSoftSReq		0x0 (Hex)	
DMACSoftLBReq		0x0 (Hex)	
DMACSoftLSReq		0x0 (Hex)	
DMACConfig			0x1 (Hex)	
DMACSync			0x0 (Hex)	

SSP0
CR0		0xff07 (Hex)	
CR1		0x2 (Hex)	
DR		0x0 (Hex)	
SR		0x3 (Hex)	
CPSR	0x2 (Hex)	
IMSC	0x0 (Hex)	
RIS		0x8 (Hex)	
MIS		0x0 (Hex)	
ICR		0x0 (Hex)	
DMACR	0x3 (Hex)	&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;I am not performing any actions when channel 0 has completed its transfer, just clearing the GPDMA interrupt flags.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;During the channel 1 transfer complete interrupt:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;uint32_t count = 0;
/* Ensure that transfer has completed. */
while (0 != (reg_struct-&amp;gt;SR &amp;amp; ((1 &amp;lt;&amp;lt; 4) | (1 &amp;lt;&amp;lt; 2)))) &amp;lt;&amp;lt; freezes here until data register is read
{
    volatile uint8_t temp = reg_struct-&amp;gt;DR;
    ++count;
}

count = 15&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN class="uiOutputText"&gt;The values in the receive buffer are valid despite having to do 15 DR reads.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="uiOutputText"&gt;In other transfers the count can be up to 180.&amp;nbsp; Again the commands used have no dummy byte requirements.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Does anyone know why this could be happening?&lt;/P&gt;</description>
    <pubDate>Tue, 13 Apr 2021 10:42:11 GMT</pubDate>
    <dc:creator>stephen_goodman</dc:creator>
    <dc:date>2021-04-13T10:42:11Z</dc:date>
    <item>
      <title>LPC 1768 SSP GPDMA Strange Behaviour</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-1768-SSP-GPDMA-Strange-Behaviour/m-p/1261211#M44627</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am getting strange behaviour when attempting to transmit and receive using the GPDMA for the SSP peripheral. It seems the receive FIFO is not updating the receive buffer specified in the GPDMA channel registers. I have to physically read the data register otherwise nothing is transferred to the buffer. I have counted the number of reads needed and it does not match the number of bytes in the transfer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am attempting to read the device ID from AT25DF321 flash device, which according to the datasheet has no dummy byte requirements.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here are the register values at the start of the transmission:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CH0
DMACCSrcAddr	0x10000970 (Hex)	
DMACCDestAddr	0x40088008 (Hex)	
DMACCLLI		0x0 (Hex)	
DMACCControl	0x84000004 (Hex)	
DMACCConfig		0x2c801 (Hex)	

CH1
DMACCSrcAddr	0x40088008 (Hex)	
DMACCDestAddr	0x10000970 (Hex)	
DMACCLLI		0x0 (Hex)	
DMACCControl	0x88000004 (Hex)	
DMACCConfig		0xd003 (Hex)	

DMACIntStat			0x0 (Hex)	
DMACIntTCStat		0x0 (Hex)	
DMACIntTCClear		0x0 (Hex)	
DMACIntErrStat		0x0 (Hex)	
DMACIntErrClr		0x0 (Hex)	
DMACRawIntTCStat	0x0 (Hex)	
DMACRawIntErrStat	0x0 (Hex)	
DMACEnbldChns		0x3 (Hex)	
DMACSoftBReq		0x500 (Hex)	
DMACSoftSReq		0x0 (Hex)	
DMACSoftLBReq		0x0 (Hex)	
DMACSoftLSReq		0x0 (Hex)	
DMACConfig			0x1 (Hex)	
DMACSync			0x0 (Hex)	

SSP0
CR0		0xff07 (Hex)	
CR1		0x2 (Hex)	
DR		0x0 (Hex)	
SR		0x3 (Hex)	
CPSR	0x2 (Hex)	
IMSC	0x0 (Hex)	
RIS		0x8 (Hex)	
MIS		0x0 (Hex)	
ICR		0x0 (Hex)	
DMACR	0x3 (Hex)	&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;I am not performing any actions when channel 0 has completed its transfer, just clearing the GPDMA interrupt flags.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;During the channel 1 transfer complete interrupt:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;uint32_t count = 0;
/* Ensure that transfer has completed. */
while (0 != (reg_struct-&amp;gt;SR &amp;amp; ((1 &amp;lt;&amp;lt; 4) | (1 &amp;lt;&amp;lt; 2)))) &amp;lt;&amp;lt; freezes here until data register is read
{
    volatile uint8_t temp = reg_struct-&amp;gt;DR;
    ++count;
}

count = 15&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN class="uiOutputText"&gt;The values in the receive buffer are valid despite having to do 15 DR reads.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="uiOutputText"&gt;In other transfers the count can be up to 180.&amp;nbsp; Again the commands used have no dummy byte requirements.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Does anyone know why this could be happening?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 10:42:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-1768-SSP-GPDMA-Strange-Behaviour/m-p/1261211#M44627</guid>
      <dc:creator>stephen_goodman</dc:creator>
      <dc:date>2021-04-13T10:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 1768 SSP GPDMA Strange Behaviour</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-1768-SSP-GPDMA-Strange-Behaviour/m-p/1263813#M44694</link>
      <description>&lt;P&gt;&lt;SPAN class="uiOutputText"&gt;Hello Stephen,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="uiOutputText"&gt;Have you tried the example that comes in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A title="https://www.nxp.com/design/microcontrollers-developer-resources/lpcopen-libraries-and-examples/lpcopen-software-development-platform-lpc17xx:LPCOPEN-SOFTWARE-FOR-LPC17XX" href="https://www.nxp.com/design/microcontrollers-developer-resources/lpcopen-libraries-and-examples/lpcopen-software-development-platform-lpc17xx:LPCOPEN-SOFTWARE-FOR-LPC17XX" target="_blank" rel="noopener noreferrer"&gt;&lt;SPAN class="uiOutputText"&gt;LPCOpen&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN class="uiOutputText"&gt;bundle? This example shows how to use the SSP with polling, interrupt, and DMA.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="uiOutputText"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="uiOutputText"&gt;Alexis Andalon&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 23:54:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-1768-SSP-GPDMA-Strange-Behaviour/m-p/1263813#M44694</guid>
      <dc:creator>Alexis_A</dc:creator>
      <dc:date>2021-04-16T23:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 1768 SSP GPDMA Strange Behaviour</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-1768-SSP-GPDMA-Strange-Behaviour/m-p/1265075#M44713</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/167559"&gt;@Alexis_A&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry I haven't been able to get to this, things are incredibly busy at the moment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only obvious thing that I can see at a glance in the LPCOpen example is that the SSP IRQ has been enabled in the NVIC.&amp;nbsp; Is this a requirement for using the DMA?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 10:38:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-1768-SSP-GPDMA-Strange-Behaviour/m-p/1265075#M44713</guid>
      <dc:creator>stephen_goodman</dc:creator>
      <dc:date>2021-04-20T10:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 1768 SSP GPDMA Strange Behaviour</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-1768-SSP-GPDMA-Strange-Behaviour/m-p/1265449#M44719</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/174304"&gt;@stephen_goodman&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The DMA interruption is only triggered to notify that the transfer is already done so it´s not needed to enable it.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Alexis Andalon&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 00:28:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-1768-SSP-GPDMA-Strange-Behaviour/m-p/1265449#M44719</guid>
      <dc:creator>Alexis_A</dc:creator>
      <dc:date>2021-04-21T00:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: LPC 1768 SSP GPDMA Strange Behaviour</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-1768-SSP-GPDMA-Strange-Behaviour/m-p/1266733#M44746</link>
      <description>&lt;P&gt;After further experimenting I have discovered that it is during a certain function call that this issue arises, it just happens to be the first function I use when communicating with the flash.&lt;/P&gt;&lt;P&gt;I set it up to continuously read the JEDEC ID and that is working fine so it doesn't appear to be the peripheral.&amp;nbsp; Thank you for your time in this.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 14:58:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC-1768-SSP-GPDMA-Strange-Behaviour/m-p/1266733#M44746</guid>
      <dc:creator>stephen_goodman</dc:creator>
      <dc:date>2021-04-22T14:58:29Z</dc:date>
    </item>
  </channel>
</rss>

