<?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>ColdFire/68K Microcontrollers and ProcessorsのトピックRe: MCF5329EVB dBug 4c breaks TFTP</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5329EVB-dBug-4c-breaks-TFTP/m-p/186339#M7843</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Paul.&amp;nbsp; I'm looking for a copy of D-Bug12 v4.0.0b18.&amp;nbsp;Since you found older d-bug code, I was hoping you may have ideas on where to locate this rev.&amp;nbsp; The b32 version (available on Freescale) doesn't work correctly with my debug pod.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jul 2009 21:30:42 GMT</pubDate>
    <dc:creator>KH_SRNL</dc:creator>
    <dc:date>2009-07-14T21:30:42Z</dc:date>
    <item>
      <title>MCF5329EVB dBug 4c breaks TFTP</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5329EVB-dBug-4c-breaks-TFTP/m-p/186337#M7841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone have a copy of the source code for dBug 4a?&amp;nbsp; 4a was shipped with my EVB and worked well with "dn" downloading images via TFTP.&amp;nbsp; dBug 4d shipped with LTIB and I installed that in order to gain autoboot functionality.&amp;nbsp; Unfortunately this broke tftp in a very interesting fashion -- ARP appears not to work correclty anymore with a subset of our Ethernet switches.&amp;nbsp; The "dn" comand simply sits silently without timing out (no bars twiddling) unitl some external event "fixes" the problem.&amp;nbsp; For example, if I ping the EVB from the TFTP server, the "dn" immediately starts twiddling, and completes the download.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ping has be from the TFTP server in order for the "dn" to work, although to the EVB actually succeed in getting replies from other hosts.&amp;nbsp; I assume that dBug is wating siliently trying to ARP for the server in some way that's not compatible with our ethernet switches.&amp;nbsp; When we ping from the server, dBug fills in the ARP entry for the TFTP server from the incoming ICMP frame.&amp;nbsp; I'm not sure if this means that the outgoing ARP frame is bad or that its interpretation of the ARP reply has changed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll get out the packet sniffer and find some root causes.&amp;nbsp; I don't mind finding the solution to the problem myself, but it will be a lot easier if I have the source code to 4a so I can tell what changed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2009 02:17:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5329EVB-dBug-4c-breaks-TFTP/m-p/186337#M7841</guid>
      <dc:creator>PaulS</dc:creator>
      <dc:date>2009-06-01T02:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5329EVB dBug 4c breaks TFTP [solved]</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5329EVB-dBug-4c-breaks-TFTP/m-p/186338#M7842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;I ended up tracking down an old 4a image and I got my satisfaction.&amp;nbsp; The problem isn't with ARP exactly, it's a problem with timers.&amp;nbsp; My network sometimes drops the first frame sent on the network, and the board never times out reception of an ARP reply and never resends.&amp;nbsp; I tracked this down to a single line that was changed in dbug/src/cpu/coldfire/mcf5xxx/mcf5xxx_timer.c:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
  timer_set_secs(uint8 channel, uint32 secs)
 {
     uint32 timeout;

     /* Get the timeout in seconds */
-    timeout = (uint32)(((timer[channel].period * 0xFFFF)/1000000000) + 0.5);
+//    timeout = (uint32)(((timer[channel].period * 0xFFFF)/1000000000) + 0.5);
+    timeout = (uint32)(((timer[channel].period * 0xFFFF)/1000000000));

     if (timeout == 0)
     {

        timer[channel].reference = 1;
        return FALSE;
    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It turns out that the period for the MCF5329 is set to be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
#define TIMER_NETWORK_PERIOD    1000000000/0x10000&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The timer init sets (timer[channel].period&amp;nbsp; = (float) TIMER_NETWORK_PERIOD), and then the math above does the division again, so even in the best floating point implementation the result is 0xFFFF/0x10000 which is very nearly 1, but not quite.&amp;nbsp; This is why I think the original code fudged upwards by 0.5, but this was deleted, and hence on the MCF5329, no timers.&amp;nbsp; Reverting that change fixed everything.&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by PaulS on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-06-03&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;07:47 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:37:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5329EVB-dBug-4c-breaks-TFTP/m-p/186338#M7842</guid>
      <dc:creator>PaulS</dc:creator>
      <dc:date>2020-10-29T09:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5329EVB dBug 4c breaks TFTP</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5329EVB-dBug-4c-breaks-TFTP/m-p/186339#M7843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Paul.&amp;nbsp; I'm looking for a copy of D-Bug12 v4.0.0b18.&amp;nbsp;Since you found older d-bug code, I was hoping you may have ideas on where to locate this rev.&amp;nbsp; The b32 version (available on Freescale) doesn't work correctly with my debug pod.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 21:30:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5329EVB-dBug-4c-breaks-TFTP/m-p/186339#M7843</guid>
      <dc:creator>KH_SRNL</dc:creator>
      <dc:date>2009-07-14T21:30:42Z</dc:date>
    </item>
  </channel>
</rss>

