<?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: DMA_SetCallback hangs in MCUXpresso General</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/DMA-SetCallback-hangs/m-p/1022326#M3137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;Hello, &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/bressan@stepover.de"&gt;bressan@stepover.de&lt;/A&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;SPAN&gt;After I did a call of the function&amp;nbsp; &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;SPI_MasterTransferCreateHandleDMA()&amp;nbsp;&lt;/SPAN&gt;like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;SPI_MasterTransferCreateHandleDMA(EXAMPLE_SPI_MASTER, &amp;amp;masterHandle, SPI_MasterUserCallback, NULL, &amp;amp;masterTxHandle,&lt;BR /&gt; &lt;STRONG&gt;NULL&lt;/STRONG&gt;);// &amp;amp;&lt;EM&gt;master&lt;STRONG&gt;RxHandle&lt;/STRONG&gt; as zero.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;SPAN&gt;I&amp;nbsp; can tell that&amp;nbsp;your solution is valid to avoid the problem with DMA_Setcallback.()&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;STRONG&gt;But, since the driver is designed to use rxHandle and txHandle you will need to use both.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;SPAN&gt;&amp;nbsp;The&amp;nbsp;&lt;SPAN&gt;rxHandle&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;must be created&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;because it is required&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;on functions as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SPI_MasterTransferDMA()&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SPI_MasterTransferAbortDMA.()&lt;/STRONG&gt;. Otherwise, you will need to implement further changes in the driver to avoid problems.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;I don't know if you are using an SDK example. if the answer is no. The &lt;STRONG&gt;spi_dma_b2b_transfer_master example&lt;/STRONG&gt;&amp;nbsp;can help you with your work as a reference.&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;Please, let me know if I can help you further!&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&amp;nbsp;Best regards, Diego.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Mar 2020 00:58:37 GMT</pubDate>
    <dc:creator>diego_charles</dc:creator>
    <dc:date>2020-03-27T00:58:37Z</dc:date>
    <item>
      <title>DMA_SetCallback hangs</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/DMA-SetCallback-hangs/m-p/1022325#M3136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MCUXpresso with LPCXpresso55S69&lt;/P&gt;&lt;P&gt;configured: spi with dma. TX only&lt;/P&gt;&lt;P&gt;in File: fsl_spi_dma.c, function SPI_MasterTransferCreateHandleDMA()&lt;BR /&gt;line 197: DMA_SetCallback(handle-&amp;gt;rxHandle, SPI_RxDMACallback, &amp;amp;s_dmaPrivateHandle[instance]);&lt;/P&gt;&lt;P&gt;here the debugger hangs, because DMA_SetCallback expects callback !=0&lt;BR /&gt;If RX is not wanted, this callback is set =0&lt;/P&gt;&lt;P&gt;Shouldn't the file content be like :&lt;/P&gt;&lt;P&gt;if(handle-&amp;gt;rxHandle){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;DMA_SetCallback(handle-&amp;gt;rxHandle, SPI_RxDMACallback, &amp;amp;s_dmaPrivateHandle[instance]);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2020 14:55:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/DMA-SetCallback-hangs/m-p/1022325#M3136</guid>
      <dc:creator>bressan</dc:creator>
      <dc:date>2020-03-26T14:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: DMA_SetCallback hangs</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/DMA-SetCallback-hangs/m-p/1022326#M3137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;Hello, &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/bressan@stepover.de"&gt;bressan@stepover.de&lt;/A&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;SPAN&gt;After I did a call of the function&amp;nbsp; &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;SPI_MasterTransferCreateHandleDMA()&amp;nbsp;&lt;/SPAN&gt;like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;SPI_MasterTransferCreateHandleDMA(EXAMPLE_SPI_MASTER, &amp;amp;masterHandle, SPI_MasterUserCallback, NULL, &amp;amp;masterTxHandle,&lt;BR /&gt; &lt;STRONG&gt;NULL&lt;/STRONG&gt;);// &amp;amp;&lt;EM&gt;master&lt;STRONG&gt;RxHandle&lt;/STRONG&gt; as zero.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;SPAN&gt;I&amp;nbsp; can tell that&amp;nbsp;your solution is valid to avoid the problem with DMA_Setcallback.()&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;STRONG&gt;But, since the driver is designed to use rxHandle and txHandle you will need to use both.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;SPAN&gt;&amp;nbsp;The&amp;nbsp;&lt;SPAN&gt;rxHandle&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;must be created&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;because it is required&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;on functions as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SPI_MasterTransferDMA()&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SPI_MasterTransferAbortDMA.()&lt;/STRONG&gt;. Otherwise, you will need to implement further changes in the driver to avoid problems.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;I don't know if you are using an SDK example. if the answer is no. The &lt;STRONG&gt;spi_dma_b2b_transfer_master example&lt;/STRONG&gt;&amp;nbsp;can help you with your work as a reference.&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;Please, let me know if I can help you further!&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&amp;nbsp;Best regards, Diego.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2020 00:58:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/DMA-SetCallback-hangs/m-p/1022326#M3137</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2020-03-27T00:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: DMA_SetCallback hangs</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/DMA-SetCallback-hangs/m-p/1022327#M3138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Diego,&lt;/P&gt;&lt;P&gt;I wrote my own SPI-DMA handler for SPI TX only.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2020 13:58:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/DMA-SetCallback-hangs/m-p/1022327#M3138</guid>
      <dc:creator>bressan</dc:creator>
      <dc:date>2020-05-13T13:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: DMA_SetCallback hangs</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/DMA-SetCallback-hangs/m-p/1022328#M3139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are welcome, Bernahrd. &lt;/P&gt;&lt;P&gt;Have a great day.&lt;/P&gt;&lt;DIV style="color: #000000;"&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2020 03:34:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/DMA-SetCallback-hangs/m-p/1022328#M3139</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2020-05-14T03:34:56Z</dc:date>
    </item>
  </channel>
</rss>

