<?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 M5223X Ethernet DMA influences in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/M5223X-Ethernet-DMA-influences/m-p/178293#M7127</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;SPAN&gt;Hi All&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are trying to work out the following effect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. PIT1 is set up to interrupt every 50us. The interrupt routine lasts 8us in which is toggles a port (to generate 10kHz square wave) and then toggles another port 10 times (this generates a short signal with about 1.5MHz frequency). The PIT1 interrupt has NMI status so can not be blocked. The frequency and mark-space is thus very stable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Every 50ms a memory transfer is made (1500 bytes from FLASH to RAM) using DMA. This takes about 200us and there are thus about 4 PIT1 time output port edges. This is repeated with the CPU in normal operating mode and also using the WAIT mode (the CPU is stopped whenever there are no interrupts to process).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first intermediate result shows that the memory transfer using DMA doesn't have any great effect on the accuracy of the NMI timer interrupt - there is no noticable increase in jitter. When the memory transfer DMA is in operate it is seen that the 1.5MHz output slows down slightly - it is seen that the instructions are interleaved with DMA accesses (about one DMA cycle steal for 4 instructions approximately).&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;SPAN&gt;The result is identical using the low power MODE mode or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. The test was repeated with a web server serving pages.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There are possible 3 results each time the web page is refreshed:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a. No change in the 10kHz output. This is valid for about 80% of the tests. (A logic analyser was used to trigger on changes of waveform of +/-1us.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;b. about 5% of the time the mark space ratio of the wavform would change slightly - instead of 50us/50us it would be 48us/52us, indicating that one of the interrupts was delayed by around 2us (the period was not changed though).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;c. about 15% of the time the mark space ratio of the waveform would change more - instead of 50us/50us it would be 37us/63us, indicating that one of the interrupts was delayed by around 13us (the period was not changed though).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This was also consistent with or without the DMA memory transfer test as detailed in 2 and with or without the WAIT mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This seems to suggest that the DMA operation of the Ethernet controller can delay the interrupt (note that no other NMI interrupts are used, so the Timer interrupt can not be delayed due to priorities).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can this behaviour be explained or controlled in any way?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mark&lt;/SPAN&gt;&lt;BR /&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.uTasker.com" rel="nofollow" target="_blank"&gt;&lt;BR /&gt;www.uTasker.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by mjbcswitzerland on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2008-08-05&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;04:08 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Aug 2008 21:05:04 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2008-08-05T21:05:04Z</dc:date>
    <item>
      <title>M5223X Ethernet DMA influences</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/M5223X-Ethernet-DMA-influences/m-p/178293#M7127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;SPAN&gt;Hi All&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are trying to work out the following effect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. PIT1 is set up to interrupt every 50us. The interrupt routine lasts 8us in which is toggles a port (to generate 10kHz square wave) and then toggles another port 10 times (this generates a short signal with about 1.5MHz frequency). The PIT1 interrupt has NMI status so can not be blocked. The frequency and mark-space is thus very stable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Every 50ms a memory transfer is made (1500 bytes from FLASH to RAM) using DMA. This takes about 200us and there are thus about 4 PIT1 time output port edges. This is repeated with the CPU in normal operating mode and also using the WAIT mode (the CPU is stopped whenever there are no interrupts to process).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first intermediate result shows that the memory transfer using DMA doesn't have any great effect on the accuracy of the NMI timer interrupt - there is no noticable increase in jitter. When the memory transfer DMA is in operate it is seen that the 1.5MHz output slows down slightly - it is seen that the instructions are interleaved with DMA accesses (about one DMA cycle steal for 4 instructions approximately).&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;SPAN&gt;The result is identical using the low power MODE mode or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. The test was repeated with a web server serving pages.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There are possible 3 results each time the web page is refreshed:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a. No change in the 10kHz output. This is valid for about 80% of the tests. (A logic analyser was used to trigger on changes of waveform of +/-1us.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;b. about 5% of the time the mark space ratio of the wavform would change slightly - instead of 50us/50us it would be 48us/52us, indicating that one of the interrupts was delayed by around 2us (the period was not changed though).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;c. about 15% of the time the mark space ratio of the waveform would change more - instead of 50us/50us it would be 37us/63us, indicating that one of the interrupts was delayed by around 13us (the period was not changed though).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This was also consistent with or without the DMA memory transfer test as detailed in 2 and with or without the WAIT mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This seems to suggest that the DMA operation of the Ethernet controller can delay the interrupt (note that no other NMI interrupts are used, so the Timer interrupt can not be delayed due to priorities).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can this behaviour be explained or controlled in any way?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mark&lt;/SPAN&gt;&lt;BR /&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.uTasker.com" rel="nofollow" target="_blank"&gt;&lt;BR /&gt;www.uTasker.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by mjbcswitzerland on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2008-08-05&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;04:08 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 21:05:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/M5223X-Ethernet-DMA-influences/m-p/178293#M7127</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2008-08-05T21:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: M5223X Ethernet DMA influences</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/M5223X-Ethernet-DMA-influences/m-p/178294#M7128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Hi Mark,&lt;BR /&gt;&lt;BR /&gt;My guess is, this is a side effect of the selected internal bus arbitration algorithm. It's described in the System Control Module (SCM) section of the manual. I think what happens is the DMA controller of the FEC takes control of the bus preventing the CPU from serving the interrupt.&lt;BR /&gt;I'm not sure how many different busses there are within the MCU, and which ones are shared between the CPU and the FEC's DMA, but one of them must be the source of contention. Try different bus arbitration algorithms and see what happens.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;- mike&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2008 13:19:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/M5223X-Ethernet-DMA-influences/m-p/178294#M7128</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2008-08-08T13:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: M5223X Ethernet DMA influences</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/M5223X-Ethernet-DMA-influences/m-p/178295#M7129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Mike&lt;BR /&gt;&lt;BR /&gt;Thanks. I have seen the registers that can be modified and may get a chance to experiment later with them.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Mark&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2008 01:25:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/M5223X-Ethernet-DMA-influences/m-p/178295#M7129</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2008-08-12T01:25:22Z</dc:date>
    </item>
  </channel>
</rss>

