<?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のトピックConfig SCTimer DMA 0 as DMA trigger input on LPC824</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Config-SCTimer-DMA-0-as-DMA-trigger-input-on-LPC824/m-p/560790#M16157</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by fengyinb on Tue Dec 16 06:27:25 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Everybody,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Recently come up a project to use DMA move data from SCTimer capture register to SRAM. Since no direct sample code can be found to start from, I decided to use the periph_dma_uart/periph_acmp (Yes, it's periph_acmp, I want to make sure the DMA trigger input configuration is fully worked before turn to SCTimer). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I have done to periph_dma_uart is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Add relative ACMP initialization code into periph_dma_uart and enable ACMP&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Change DMA channel config from&amp;nbsp; DMA_CFG_PERIPHREQEN to DMA_CFG_HWTRIGEN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_DMA_SetupChannelConfig(LPC_DMA, DMAREQ_USART0_RX,(DMA_CFG_HWTRIGEN | DMA_CFG_TRIGBURST_SNGL | DMA_CFG_CHPRIORITY(3)));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Select ACMP_O as DMA trigger input source in input MUX&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_DMATRIGMUX_SetInputTrig(LPC_DMATRIGMUX, DMAREQ_USART0_RX, DMATRIG_ACMP_O);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The ACMP works find because I can see the green light turns on/off when I manually toggle ACMP positive input. Plus the dma_uart also works fine before I changing the trigger source/method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I expect at every falling edge of ACMP_O the DMA will trigger one byte transfer from UART_RDATA register (it should be zero, I guess) to destination buffer, and after 8 bytes transfer done, UART will send the 8 bytes data to PC.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But it doesn't work. No more UART traffic after 5 initial string send. Looks like it's never triggered by ACMP_O. Any comments are welcome, thanks!&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:00:02 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:00:02Z</dc:date>
    <item>
      <title>Config SCTimer DMA 0 as DMA trigger input on LPC824</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Config-SCTimer-DMA-0-as-DMA-trigger-input-on-LPC824/m-p/560790#M16157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by fengyinb on Tue Dec 16 06:27:25 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Everybody,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Recently come up a project to use DMA move data from SCTimer capture register to SRAM. Since no direct sample code can be found to start from, I decided to use the periph_dma_uart/periph_acmp (Yes, it's periph_acmp, I want to make sure the DMA trigger input configuration is fully worked before turn to SCTimer). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I have done to periph_dma_uart is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Add relative ACMP initialization code into periph_dma_uart and enable ACMP&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Change DMA channel config from&amp;nbsp; DMA_CFG_PERIPHREQEN to DMA_CFG_HWTRIGEN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_DMA_SetupChannelConfig(LPC_DMA, DMAREQ_USART0_RX,(DMA_CFG_HWTRIGEN | DMA_CFG_TRIGBURST_SNGL | DMA_CFG_CHPRIORITY(3)));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Select ACMP_O as DMA trigger input source in input MUX&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_DMATRIGMUX_SetInputTrig(LPC_DMATRIGMUX, DMAREQ_USART0_RX, DMATRIG_ACMP_O);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The ACMP works find because I can see the green light turns on/off when I manually toggle ACMP positive input. Plus the dma_uart also works fine before I changing the trigger source/method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I expect at every falling edge of ACMP_O the DMA will trigger one byte transfer from UART_RDATA register (it should be zero, I guess) to destination buffer, and after 8 bytes transfer done, UART will send the 8 bytes data to PC.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But it doesn't work. No more UART traffic after 5 initial string send. Looks like it's never triggered by ACMP_O. Any comments are welcome, thanks!&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:00:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Config-SCTimer-DMA-0-as-DMA-trigger-input-on-LPC824/m-p/560790#M16157</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:00:02Z</dc:date>
    </item>
  </channel>
</rss>

