<?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>Digital Signal ControllersのトピックInterrupt time delay (spi-dma; kl26)</title>
    <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Interrupt-time-delay-spi-dma-kl26/m-p/582543#M841</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All, &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a KL26 whose core clock is set-up at 48MHz. I have set-up a SPI-DMA transfer similar to the example of KSDK 1.3.0. The data transfer is started by an external signal on a GPIO (PTC9) signal edge (interrupt). It works! I have measured on an oscilloscope a delay of approx. 10 microseconds between the edge of the GPIO signal and the start of the SPI transfer … &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The interrupt function is very simple (for test purpose) …&lt;BR /&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: 10pt; font-family: Consolas,serif;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;&lt;STRONG&gt;getdata_PORTC_IRQHandler&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055; font-size: 10pt; font-family: Consolas,serif;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: Consolas,serif;"&gt;DMA_DCR1|=0x40000000u; //&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;start DMA1 transfer&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt; DMA_DCR0|=0x40000000u; //&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;start DMA0 transfer&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: Consolas,serif;"&gt;PORT_HAL_ClearPortIntFlag&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;(PORTC_BASE_PTR);&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;In the main program loop, I use polling to set-up the spi BCR bits again and clear the done bit after each transfer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;My question is: can it be faster? If yes, how can I make the delay between signal edge and the start of SPI-DMA transfer shorter? How short?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;I read somewhere about 10-12 clock cycles (for interrupt alone) … that would be approx. 0.2 microsecond right. So where do the 10 microseconds come from?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;Thank you for you inputs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;Val&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Jun 2016 09:46:20 GMT</pubDate>
    <dc:creator>valeremar</dc:creator>
    <dc:date>2016-06-28T09:46:20Z</dc:date>
    <item>
      <title>Interrupt time delay (spi-dma; kl26)</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Interrupt-time-delay-spi-dma-kl26/m-p/582543#M841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All, &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a KL26 whose core clock is set-up at 48MHz. I have set-up a SPI-DMA transfer similar to the example of KSDK 1.3.0. The data transfer is started by an external signal on a GPIO (PTC9) signal edge (interrupt). It works! I have measured on an oscilloscope a delay of approx. 10 microseconds between the edge of the GPIO signal and the start of the SPI transfer … &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The interrupt function is very simple (for test purpose) …&lt;BR /&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: 10pt; font-family: Consolas,serif;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;&lt;STRONG&gt;getdata_PORTC_IRQHandler&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055; font-size: 10pt; font-family: Consolas,serif;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: Consolas,serif;"&gt;DMA_DCR1|=0x40000000u; //&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;start DMA1 transfer&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt; DMA_DCR0|=0x40000000u; //&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;start DMA0 transfer&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: Consolas,serif;"&gt;PORT_HAL_ClearPortIntFlag&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;(PORTC_BASE_PTR);&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;In the main program loop, I use polling to set-up the spi BCR bits again and clear the done bit after each transfer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;My question is: can it be faster? If yes, how can I make the delay between signal edge and the start of SPI-DMA transfer shorter? How short?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;I read somewhere about 10-12 clock cycles (for interrupt alone) … that would be approx. 0.2 microsecond right. So where do the 10 microseconds come from?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;Thank you for you inputs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;Val&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2016 09:46:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Interrupt-time-delay-spi-dma-kl26/m-p/582543#M841</guid>
      <dc:creator>valeremar</dc:creator>
      <dc:date>2016-06-28T09:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt time delay (spi-dma; kl26)</title>
      <link>https://community.nxp.com/t5/Digital-Signal-Controllers/Interrupt-time-delay-spi-dma-kl26/m-p/582544#M842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I suspect that the interrupt delay is greater than 0.2uS, you can toggle a GPIO pin in the &lt;SPAN style="color: #7f0055; font-size: 10pt; font-family: Consolas,serif;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;&lt;STRONG&gt;getdata_PORTC_IRQHandler&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055; font-size: 10pt; font-family: Consolas,serif;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;) function to test the interrupt delay.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;BR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Consolas,serif;"&gt;Xiangjun Rong&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2016 07:11:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Digital-Signal-Controllers/Interrupt-time-delay-spi-dma-kl26/m-p/582544#M842</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-06-30T07:11:43Z</dc:date>
    </item>
  </channel>
</rss>

