<?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 MC9S12NE64 - MII MRADR Register Description in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12NE64-MII-MRADR-Register-Description/m-p/226679#M9309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I am looking for additional documentation / app notes on the MC9S12NE64 MII Managment Register descriptions.&amp;nbsp; Specifically, the MRADR (MII Management Register Address) bit fields RADDR.&amp;nbsp; When a value is written to the RADDR field, what registers are actually accessed?&amp;nbsp; Based on sample code provided with the MC9S12NE64, it appears the MRADR and MPADR are used in conjunction to access PHY registers (but per my prior statement I'm unable to find a list / description of the PHY registers accessed through the MRADR register).&amp;nbsp; In the example code, a higher level function call that writes data to the MII includes (within the write function) a MII read with RADDR set to 0x10.&amp;nbsp; The sample header file documents this location as the PHY interrupt register.&amp;nbsp; It really doesn't make sense to me why a read of the interrrupt register would be needed after the write (the code is not interrupt driven).&lt;/P&gt;&lt;P&gt;The code snippet is:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;unsigned char MIIwrite(unsigned char mpadr, unsigned char mradr, unsigned int mwdata)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;unsigned int temprdata;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MPADR = mpadr;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //select physical address, 0 = internal PHY&lt;/P&gt;&lt;P&gt;MRADR = mradr;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //selects register on PHY, but no information on these registers can be found&lt;/P&gt;&lt;P&gt;MWDATA = mwdata;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //place 16 bit data into MII buffer&lt;/P&gt;&lt;P&gt;MCMST = MCMST|0x01;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //execute write operation&lt;/P&gt;&lt;P&gt;while(!(IEVENT&amp;amp;0x80);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //wait for write to complete&lt;/P&gt;&lt;P&gt;IEVENT = IEVENT&amp;amp;~0x80;&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; //clear write complete flag&lt;/P&gt;&lt;P&gt;while(!(MIIread(PHY_ADDRESS, PHY_REG_IR, &amp;amp;temprdata));&amp;nbsp;&amp;nbsp;&amp;nbsp; //PHY_ADDRESS = 0 for internal PHY, PHY_REG_IR is the phy interrupt register according to sample code documentation??&amp;nbsp; Don't understand why the read of the&lt;/P&gt;&lt;P&gt;&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;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;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;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;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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //interrupt&amp;nbsp; reg &amp;amp; can't find any documentation on the interrupt reg or other PHY regs&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jan 2014 22:00:01 GMT</pubDate>
    <dc:creator>KH_SRNL</dc:creator>
    <dc:date>2014-01-09T22:00:01Z</dc:date>
    <item>
      <title>MC9S12NE64 - MII MRADR Register Description</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12NE64-MII-MRADR-Register-Description/m-p/226679#M9309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I am looking for additional documentation / app notes on the MC9S12NE64 MII Managment Register descriptions.&amp;nbsp; Specifically, the MRADR (MII Management Register Address) bit fields RADDR.&amp;nbsp; When a value is written to the RADDR field, what registers are actually accessed?&amp;nbsp; Based on sample code provided with the MC9S12NE64, it appears the MRADR and MPADR are used in conjunction to access PHY registers (but per my prior statement I'm unable to find a list / description of the PHY registers accessed through the MRADR register).&amp;nbsp; In the example code, a higher level function call that writes data to the MII includes (within the write function) a MII read with RADDR set to 0x10.&amp;nbsp; The sample header file documents this location as the PHY interrupt register.&amp;nbsp; It really doesn't make sense to me why a read of the interrrupt register would be needed after the write (the code is not interrupt driven).&lt;/P&gt;&lt;P&gt;The code snippet is:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;unsigned char MIIwrite(unsigned char mpadr, unsigned char mradr, unsigned int mwdata)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;unsigned int temprdata;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MPADR = mpadr;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //select physical address, 0 = internal PHY&lt;/P&gt;&lt;P&gt;MRADR = mradr;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //selects register on PHY, but no information on these registers can be found&lt;/P&gt;&lt;P&gt;MWDATA = mwdata;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //place 16 bit data into MII buffer&lt;/P&gt;&lt;P&gt;MCMST = MCMST|0x01;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //execute write operation&lt;/P&gt;&lt;P&gt;while(!(IEVENT&amp;amp;0x80);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //wait for write to complete&lt;/P&gt;&lt;P&gt;IEVENT = IEVENT&amp;amp;~0x80;&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; //clear write complete flag&lt;/P&gt;&lt;P&gt;while(!(MIIread(PHY_ADDRESS, PHY_REG_IR, &amp;amp;temprdata));&amp;nbsp;&amp;nbsp;&amp;nbsp; //PHY_ADDRESS = 0 for internal PHY, PHY_REG_IR is the phy interrupt register according to sample code documentation??&amp;nbsp; Don't understand why the read of the&lt;/P&gt;&lt;P&gt;&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;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;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;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;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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //interrupt&amp;nbsp; reg &amp;amp; can't find any documentation on the interrupt reg or other PHY regs&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 22:00:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12NE64-MII-MRADR-Register-Description/m-p/226679#M9309</guid>
      <dc:creator>KH_SRNL</dc:creator>
      <dc:date>2014-01-09T22:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S12NE64 - MII MRADR Register Description</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12NE64-MII-MRADR-Register-Description/m-p/226680#M9310</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;here you can find some app notes and useful documents:&lt;BR /&gt;&lt;A href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=S12NE&amp;amp;fpsp=1&amp;amp;tab=Documentation_Tab" title="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=S12NE&amp;amp;fpsp=1&amp;amp;tab=Documentation_Tab"&gt;http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=S12NE&amp;amp;fpsp=1&amp;amp;tab=Documentation_Tab&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is for example AN2629 MC9S12NE64 Integrated Ethernet Controller. It gives some more info about MII Management Interface and the registers you mentioned.&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/files/microcontrollers/doc/app_note/AN2692.pdf" title="http://cache.freescale.com/files/microcontrollers/doc/app_note/AN2692.pdf"&gt;http://cache.freescale.com/files/microcontrollers/doc/app_note/AN2692.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, useful should be AN2700 and AN2836. These comes with SW packages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully the information helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2014 14:19:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MC9S12NE64-MII-MRADR-Register-Description/m-p/226680#M9310</guid>
      <dc:creator>iggi</dc:creator>
      <dc:date>2014-01-14T14:19:10Z</dc:date>
    </item>
  </channel>
</rss>

