<?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 Re: Descriptor Table for HSADC in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Descriptor-Table-for-HSADC/m-p/572228#M18538</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by heffalump on Sun Mar 15 21:49:04 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;You can use the GPDMA to move a set number of samples from the HSADC into memory. The GPDMA can be set to throw an interrupt once finished. This way you only need a single HSADC descriptor looping back on itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To get started runing the HSADC with the GPDMA, you can use the modified LPCopen library kindly provided by mch0: &lt;/SPAN&gt;&lt;A href="http://http://www.lpcware.com/content/forum/gpdma-library-hsadc"&gt;http://www.lpcware.com/content/forum/gpdma-library-hsadc&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:57:30 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:57:30Z</dc:date>
    <item>
      <title>Descriptor Table for HSADC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Descriptor-Table-for-HSADC/m-p/572227#M18537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MoenK on Tue Mar 10 04:16:25 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;If I want to use the HSADC to sample 1 channel for 10ms at 750kHz, does it mean that I have to compute a descriptor table with 7500samples? With the last entry set to contain HALT and the fADC set at 750kHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there another way to stop the sampling other than from within the descriptor table?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The sampling starts when I use a external GPIO interrupt to start the SWtrigger.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:57:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Descriptor-Table-for-HSADC/m-p/572227#M18537</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Descriptor Table for HSADC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Descriptor-Table-for-HSADC/m-p/572228#M18538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by heffalump on Sun Mar 15 21:49:04 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;You can use the GPDMA to move a set number of samples from the HSADC into memory. The GPDMA can be set to throw an interrupt once finished. This way you only need a single HSADC descriptor looping back on itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To get started runing the HSADC with the GPDMA, you can use the modified LPCopen library kindly provided by mch0: &lt;/SPAN&gt;&lt;A href="http://http://www.lpcware.com/content/forum/gpdma-library-hsadc"&gt;http://www.lpcware.com/content/forum/gpdma-library-hsadc&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:57:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Descriptor-Table-for-HSADC/m-p/572228#M18538</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Descriptor Table for HSADC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Descriptor-Table-for-HSADC/m-p/572229#M18539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MoenK on Mon Mar 16 04:49:08 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks so much for your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am now using the GPDMA library that you recommended. I can check that my HSADC is sampling correctly if I use Chip_HSADC_GetFIFO(LPC_ADCHS), however when I use DMA the sampled data do not seem to copy over. Sometimes I only get 1 sample or 4 depending on the burstsize set in the library.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my initialization of the DMA. It is taken from the periph_dma_timertrig with modifications. Are there any obvious steps/things I am doing wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
#define SOURCEARRAYSIZE (18)&amp;nbsp; //need 16, 2 extra

/* Source and destination DMA areas */
static uint32_t source[SOURCEARRAYSIZE], dest[SOURCEARRAYSIZE];

static void setupDMA(void)
{
/* Initialize GPDMA controller */
Chip_GPDMA_Init(LPC_GPDMA);

/* Get DMA channel */
dmaCh = Chip_GPDMA_GetFreeChannel(LPC_GPDMA, GPDMA_CONN_HSADC_READ);

/* Setup DMA transfer */
Chip_GPDMA_Transfer(LPC_GPDMA, dmaCh,
GPDMA_CONN_HSADC_READ, (uint32_t) &amp;amp;dest[0],
GPDMA_TRANSFERTYPE_P2M_CONTROLLER_DMA,
8);

/* Enable GPDMA interrupt */
NVIC_EnableIRQ(DMA_IRQn);
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I may be misunderstanding the transfersize, burstsize and transfer width. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eg: If I set my ADC FIFO_trip level at 8 with no packing, I would expect the DMA to start when there are 8 samples. (8 words in FIFO)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And I want to clear the FIFO in 1 DMA read, I would set my transfer width to be WORD, burstsize to be 8 and transfersize to be 8?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway with regards to the first issue, it is preferable to update a adc descriptor table that is not active right? So I would still need to use 2 tables?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for the long post. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:57:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Descriptor-Table-for-HSADC/m-p/572229#M18539</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:57:30Z</dc:date>
    </item>
  </channel>
</rss>

