<?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: ENET from MCF to K66 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ENET-from-MCF-to-K66/m-p/500795#M31320</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roman,&lt;/P&gt;&lt;P&gt;I'm investigating the issue now, and I was wondering if you can upload the Ethernet demo, then I can replicate the issue on the FRDM-K66 board.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Jun 2016 05:46:53 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2016-06-01T05:46:53Z</dc:date>
    <item>
      <title>ENET from MCF to K66</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ENET-from-MCF-to-K66/m-p/500794#M31319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some years ago I implemented a minimalist Ethernet stack (which just covers my needs) on an MCF52259 (PHY is DB83640). Now I need to port that stack to a new Device which runs a K66 again with a DB83640.&lt;/P&gt;&lt;P&gt;While I could communicate with the DB83640 really fast, I'm stuck at sending something.&lt;/P&gt;&lt;P&gt;Well what exactly happens is:&lt;/P&gt;&lt;P&gt;As soon as I detect a Link, I try to send a Gratuitous ARP every 100ms. This lets the Act_LED on the phy flash, signaling that the phy sends my message. And also the switch which the device is connected to flashes its led.&lt;/P&gt;&lt;P&gt;But I don't see a Gratuitous ARP in Wireshark on the PC (also connected to the switch, btw. yes, I checked every connection twice ;-)).&lt;/P&gt;&lt;P&gt;Now since I got really confused by all the Big/Little-Endian stuff, I have some questions.&lt;/P&gt;&lt;P&gt;First int the ECR register of the ENET controller there is this DBSWP flag which should Swap the buffer descriptors bytes to support little-endian devices.&lt;/P&gt;&lt;P&gt;In order to get send something this bit has to be set and also the description buffers need to be changed from: &lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_14641842748597384 jive_macro_code jive_text_macro" data-renderedposition="394_50_798_80" jivemacro_uid="_14641842748597384" modifiedtitle="true"&gt;&lt;P&gt;typedef struct{&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint16 status;&amp;nbsp; /* control and status */&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint16 length;&amp;nbsp; /* transfer length */&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8&amp;nbsp; *data;&amp;nbsp;&amp;nbsp; /* buffer address */&lt;/P&gt;&lt;P&gt;} FECBD __attribute__((packed));&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;to&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14641843277073437 jive_text_macro" data-renderedposition="500_50_798_80" jivemacro_uid="_14641843277073437"&gt;&lt;P&gt;typedef struct{&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint16 length;&amp;nbsp; /* transfer length */&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint16 status;&amp;nbsp; /* control and status */&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8&amp;nbsp; *data;&amp;nbsp;&amp;nbsp; /* buffer address */&lt;/P&gt;&lt;P&gt;} FECBD __attribute__((packed));&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But to be honest I don't really get that bit. Clearly this bit is for the uC architecture and should be set to little-endian on all Kinetis devices so why bothering making such a bit?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;Secoundly how is it possible to send something out in to the net that's seen by the switch but not in the Wireshark? Are my packages corrupt? If so why?&lt;/P&gt;&lt;P&gt;Do I have to change some other structs and stuff from big to little-endian? If so? Which ones and how do they have to look? I have a lot of structs for all the layers like:&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_1464184384567656" data-renderedposition="814_50_798_80" jivemacro_uid="_1464184384567656"&gt;&lt;P&gt;typedef struct {&lt;/P&gt;&lt;P&gt;&amp;nbsp; MAC_addr_t destination_addr;&amp;nbsp;&amp;nbsp; /**&amp;lt; 48-bit destination address.*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; MAC_addr_t source_addr;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&amp;lt; 48-bit source address.*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; unsigned short type;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&amp;lt; 16-bit type field. 0x0800(IP) / 0x0806(ARP)*/&lt;/P&gt;&lt;P&gt; } ETH_header_t __attribute__((packed));&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;or the &lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14641844057475254 jive_text_macro" data-renderedposition="920_50_798_176" jivemacro_uid="_14641844057475254"&gt;&lt;P&gt;typedef struct{&lt;/P&gt;&lt;P&gt;&amp;nbsp; unsigned short hard_type;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&amp;lt; The type of hardware address (=1 for Ethernet).*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; unsigned short prot_type;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&amp;lt; The type of protocol address (=0x0800 for IP).*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; unsigned char hard_size;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&amp;lt; The size in bytes of the hardware address (=6).*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; unsigned char prot_size;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&amp;lt; The size in bytes of the protocol address (=4).*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; unsigned short op;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&amp;lt; Opcode.*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; MAC_addr_t sender_hard_addr;&amp;nbsp;&amp;nbsp; /**&amp;lt; Hardware address of sender of this packet.*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; IP_addr_t sender_prot_addr;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&amp;lt; Protocol address of sender of this packet.*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; MAC_addr_t target_hard_addr;&amp;nbsp;&amp;nbsp; /**&amp;lt; Hardware address of target of this packet.*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; IP_addr_t target_prot_addr;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&amp;lt; Protocol address of target of this packet.*/&lt;/P&gt;&lt;P&gt;} ARP_header_t __attribute__((packed));&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt; Thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;&lt;P&gt;Roman&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 13:55:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ENET-from-MCF-to-K66/m-p/500794#M31319</guid>
      <dc:creator>TheMnemonic</dc:creator>
      <dc:date>2016-05-25T13:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: ENET from MCF to K66</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ENET-from-MCF-to-K66/m-p/500795#M31320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roman,&lt;/P&gt;&lt;P&gt;I'm investigating the issue now, and I was wondering if you can upload the Ethernet demo, then I can replicate the issue on the FRDM-K66 board.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 05:46:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ENET-from-MCF-to-K66/m-p/500795#M31320</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-06-01T05:46:53Z</dc:date>
    </item>
  </channel>
</rss>

