<?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のトピックSoftware Trigger DMA</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Software-Trigger-DMA/m-p/2108278#M58282</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;My goal is start/stop DMA transfers via software control. From the main loop I would like to start/stop DMA transfers.&lt;/P&gt;&lt;P&gt;The version of the SDK that I am using is v.3.04.000 and the example project is spis_dma. The reason for using this version is that I am working with legacy code that expects this version of the SDK. I am not planning on using the latest SDK and do not plan to.&lt;/P&gt;&lt;P&gt;From my understanding, I need to configure the DMA to be software trigger driven. From the UM10850 14.7.1 doc:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;“CFGVALID and SV allows a more direct DMA block timing control by software”&lt;OL&gt;&lt;LI&gt;Are these set in the .xfercfg on lines 131, 138, 146, 153 or should they be set elsewhere?&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;”Leaving a CFGVALID bit set to 0 allows the DMA sequence to pause at the description unit software triggers the continuation”&lt;OL&gt;&lt;LI&gt;How and where do I set this up?&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;“If a channel is configured with SWTRIG = 0, the channel can be later triggered either by hardware or software. Software triggering is accomplished by writing a 1 to the appropriate bit in the SETTRIG register”&lt;OL&gt;&lt;LI&gt;How and where do I set this register from the main loop?&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;“When a channel is initially set up, the SWTRIG bit in the XFERCFG register can be set, causing the transfer to begin immediately”&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I am unsure if I am configuring the DMA to be software driven.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Also, I don’t know what function/register I should call to start/stop the transfer. I’m calling the Chip_DMA_SetTrigChannel() function from the main loop, I don’t think I’m using this function correctly.&lt;/P&gt;&lt;P&gt;All that I am trying to do is set a DMA transfer once a second from the main loop via a software trigger. I could really use some help on how to do this.&lt;/P&gt;&lt;P&gt;The changes that I made to spis_dma.c&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Set SPI as master&lt;OL&gt;&lt;LI&gt;Original project SPI was configured as slave. Set spiSetup.master = 1 on line 80.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Removed DMA_XFERCFG_RELOAD from xfercfg (lines 131, 138, 146, 153). I think I needed to do this so the DMA wouldn’t continuously execute.&lt;/LI&gt;&lt;LI&gt;Commented out spis_dma_Start(); from lines 189 and line 201.&lt;/LI&gt;&lt;LI&gt;In main, calling software dma trigger once a second. Lines 257- 258.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Any help on how to set up a software DMA trigger would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 30 May 2025 22:39:29 GMT</pubDate>
    <dc:creator>rhsalced</dc:creator>
    <dc:date>2025-05-30T22:39:29Z</dc:date>
    <item>
      <title>Software Trigger DMA</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Software-Trigger-DMA/m-p/2108278#M58282</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;My goal is start/stop DMA transfers via software control. From the main loop I would like to start/stop DMA transfers.&lt;/P&gt;&lt;P&gt;The version of the SDK that I am using is v.3.04.000 and the example project is spis_dma. The reason for using this version is that I am working with legacy code that expects this version of the SDK. I am not planning on using the latest SDK and do not plan to.&lt;/P&gt;&lt;P&gt;From my understanding, I need to configure the DMA to be software trigger driven. From the UM10850 14.7.1 doc:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;“CFGVALID and SV allows a more direct DMA block timing control by software”&lt;OL&gt;&lt;LI&gt;Are these set in the .xfercfg on lines 131, 138, 146, 153 or should they be set elsewhere?&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;”Leaving a CFGVALID bit set to 0 allows the DMA sequence to pause at the description unit software triggers the continuation”&lt;OL&gt;&lt;LI&gt;How and where do I set this up?&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;“If a channel is configured with SWTRIG = 0, the channel can be later triggered either by hardware or software. Software triggering is accomplished by writing a 1 to the appropriate bit in the SETTRIG register”&lt;OL&gt;&lt;LI&gt;How and where do I set this register from the main loop?&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;“When a channel is initially set up, the SWTRIG bit in the XFERCFG register can be set, causing the transfer to begin immediately”&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I am unsure if I am configuring the DMA to be software driven.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Also, I don’t know what function/register I should call to start/stop the transfer. I’m calling the Chip_DMA_SetTrigChannel() function from the main loop, I don’t think I’m using this function correctly.&lt;/P&gt;&lt;P&gt;All that I am trying to do is set a DMA transfer once a second from the main loop via a software trigger. I could really use some help on how to do this.&lt;/P&gt;&lt;P&gt;The changes that I made to spis_dma.c&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Set SPI as master&lt;OL&gt;&lt;LI&gt;Original project SPI was configured as slave. Set spiSetup.master = 1 on line 80.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Removed DMA_XFERCFG_RELOAD from xfercfg (lines 131, 138, 146, 153). I think I needed to do this so the DMA wouldn’t continuously execute.&lt;/LI&gt;&lt;LI&gt;Commented out spis_dma_Start(); from lines 189 and line 201.&lt;/LI&gt;&lt;LI&gt;In main, calling software dma trigger once a second. Lines 257- 258.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Any help on how to set up a software DMA trigger would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2025 22:39:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Software-Trigger-DMA/m-p/2108278#M58282</guid>
      <dc:creator>rhsalced</dc:creator>
      <dc:date>2025-05-30T22:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Software Trigger DMA</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Software-Trigger-DMA/m-p/2111017#M58315</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/229179"&gt;@rhsalced&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will check the spis_dma.c and reply to you.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Harry&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 06:55:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Software-Trigger-DMA/m-p/2111017#M58315</guid>
      <dc:creator>Harry_Zhang</dc:creator>
      <dc:date>2025-06-05T06:55:13Z</dc:date>
    </item>
  </channel>
</rss>

