<?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>Kinetis Software Development KitのトピックRe: Ethernet phy register access K64F KSZ8081RNBIA</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Ethernet-phy-register-access-K64F-KSZ8081RNBIA/m-p/463659#M3483</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you attach your project so that I can download and debug on my FRDM-K64F?&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Apr 2016 06:33:42 GMT</pubDate>
    <dc:creator>xiangjunrong</dc:creator>
    <dc:date>2016-04-25T06:33:42Z</dc:date>
    <item>
      <title>Ethernet phy register access K64F KSZ8081RNBIA</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Ethernet-phy-register-access-K64F-KSZ8081RNBIA/m-p/463657#M3481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a K64F connected to a KSZ8081RNBIA Ethernet phy.&amp;nbsp; I want to read/write the configuration registers within the Ethernet phy part.&amp;nbsp;&amp;nbsp; There is an external 1K pull up on the MDIO.&amp;nbsp; I had this working at one time but now it is not working, or maybe in the past it just happen to work.&amp;nbsp; Anyway, when I call the &lt;SPAN style="font-family: courier new,courier;"&gt;PHY_DRV_Autodiscover() &lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;it crashes and goes to the DefaultISR in startup_MK64F12.S when it is in the ENET_HAL_GetStatus() function &lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; (see attached image).&amp;nbsp; I just don't know what might be the cause of it.&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&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="font-family: courier new,courier;"&gt;// Note: FSL_ENET1 is zero (0) and ENET_BASE_PTR is defined in MK64F12.h.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;uint32_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; phy_address;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;enet_status_t&amp;nbsp; status;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//ENET_HAL_Init( ENET_BASE_PTR );&amp;nbsp; &amp;lt;-- crashes with this too&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//ENET_HAL_Enable( ENET_BASE_PTR ); &amp;lt;-- crashes with this as well&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;status = PHY_DRV_Autodiscover( FSL_ENET1, &amp;amp;phy_address );&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="font-family: courier new,courier;"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;The&lt;/SPAN&gt; &lt;SPAN style="font-family: courier new,courier;"&gt;PHY_DRV_Autodiscover() &lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;function comes from the&amp;nbsp; "fsl_phy_driver.c"&amp;nbsp; which is from the &lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;C:\Freescale\KSDK_1.2.0\middleware\tcpip\rtcs\source\port\phyksz8081 folder.&amp;nbsp; I copied over the header file to my project as well.&lt;/SPAN&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="font-family: arial,helvetica,sans-serif;"&gt;The project is a KSDK 1.2.0 along with processor expert.&amp;nbsp; KDS 3.0.0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;The project includes the eNet1:fsl_enet module, see attached image for all PE modules in the project.&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="font-family: arial,helvetica,sans-serif;"&gt;The function init_enet_pins() is run during hardware_init().&amp;nbsp;&amp;nbsp; See &lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;init_enet_pins() function &lt;/SPAN&gt;below.&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="font-family: arial,helvetica,sans-serif;"&gt;There is also a 1K pull up on the MDIO pin.&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="font-family: arial,helvetica,sans-serif;"&gt;I tried initializing ENET (lines commented out above), but it just crashes earlier (i.e. tried using functions ENET_HAL_Init() and ENET_HAL_Enable() and both of them cause the exact same crash situation).&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="font-family: arial,helvetica,sans-serif;"&gt;If I use the example demo project "shell_frdmk64f" (KSDK 1.3.0), the board network communications work great which leads me to believe it is not a hardware, but more like a software config sort of issue, but not sure what it might be.&amp;nbsp; &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="font-family: arial,helvetica,sans-serif;"&gt;What am I missing?&amp;nbsp; Any suggestions?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Thank you.&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="font-family: courier new,courier;"&gt;void init_enet_pins(uint32_t instance)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* Affects PORTB_PCR1 register */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; PORT_HAL_SetMuxMode(PORTB,1UL,kPortMuxAlt4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* Affects PORTB_PCR0 register */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; PORT_HAL_SetMuxMode(PORTB,0UL,kPortMuxAlt4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; PORT_HAL_SetPullMode(PORTB,0UL,kPortPullUp);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; PORT_HAL_SetPullCmd(PORTB,0UL,true);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; PORT_HAL_SetOpenDrainCmd(PORTB,0UL,true);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* Affects PORTA_PCR13 register */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; PORT_HAL_SetMuxMode(PORTA,13UL,kPortMuxAlt4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* Affects PORTA_PCR12 register */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; PORT_HAL_SetMuxMode(PORTA,12UL,kPortMuxAlt4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* Affects PORTA_PCR14 register */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; PORT_HAL_SetMuxMode(PORTA,14UL,kPortMuxAlt4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* Affects PORTA_PCR5 register */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; PORT_HAL_SetMuxMode(PORTA,5UL,kPortMuxAlt4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* Affects PORTA_PCR16 register */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; PORT_HAL_SetMuxMode(PORTA,16UL,kPortMuxAlt4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* Affects PORTA_PCR17 register */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; PORT_HAL_SetMuxMode(PORTA,17UL,kPortMuxAlt4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* Affects PORTA_PCR15 register */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; PORT_HAL_SetMuxMode(PORTA,15UL,kPortMuxAlt4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* Affects PORTA_PCR18 register */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; PORT_HAL_SetMuxMode(PORTA,18UL,kPortPinDisabled);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2016 15:26:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Ethernet-phy-register-access-K64F-KSZ8081RNBIA/m-p/463657#M3481</guid>
      <dc:creator>aes_mike</dc:creator>
      <dc:date>2016-04-20T15:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Ethernet phy register access K64F KSZ8081RNBIA</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Ethernet-phy-register-access-K64F-KSZ8081RNBIA/m-p/463658#M3482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added the ENET:Init_ENET PE module and then just before the call to&amp;nbsp; the PHY_DRV_Autodiscover() function I set a breakpoint and modify the ENET.MSCR register from 0x0000 to 0x0130 using the EmbSys Register window.&amp;nbsp; Now it works!&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to change the ENET_MSCR_VALUE within the ENET_Config.h, but when I startup the debugger it reverts the value back to 0x00U rather than my 0x0130U.&amp;nbsp; Not sure best place to set up the MSCR register and why it is not set correctly in the first place?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2016 18:35:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Ethernet-phy-register-access-K64F-KSZ8081RNBIA/m-p/463658#M3482</guid>
      <dc:creator>aes_mike</dc:creator>
      <dc:date>2016-04-20T18:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: Ethernet phy register access K64F KSZ8081RNBIA</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Ethernet-phy-register-access-K64F-KSZ8081RNBIA/m-p/463659#M3483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you attach your project so that I can download and debug on my FRDM-K64F?&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 06:33:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Ethernet-phy-register-access-K64F-KSZ8081RNBIA/m-p/463659#M3483</guid>
      <dc:creator>xiangjunrong</dc:creator>
      <dc:date>2016-04-25T06:33:42Z</dc:date>
    </item>
  </channel>
</rss>

