Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 05 Dec 2013 09:34 AM by  steven.eckhoff
Settting SMSC_LAN921x MAC address
 5 Replies
Sort:
You are not authorized to post a reply.
Author Messages
abhinav.mathur
New Member
New Member
Posts:


--
14 May 2013 07:41 PM
    Hi,
    I am trying to give my application the capability to be able to set the MAC address. Thus I have exposed the LAN921xWriteMAC32() method such that my application can call into it. I am seeing a data abort exception as soon as I call this function from my app. Can someone help me out with this?

    This is what I see on the terminal window

    Exception 'Data Abort' (4): Thread-Id=057d0026(pth=88e515a0), Proc-Id=00400002(pprc=871e1bc0) 'NK.EXE', VM-active=057c0026(pprc=88e51480) 'MyApp.exe'
    PC=c132e424(smsc_lan921x.dll+0x0000e424) RA=c132e608(smsc_lan921x.dll+0x0000e608) SP=d558fbf8, BVA=00000000

    products_apps@logicpd.com
    New Member
    New Member
    Posts:


    --
    15 May 2013 08:40 AM
    How are you calling your method? A Device IOCTL? How are you writing to the MAC registers? You need to make sure you are using the correct virtual addresses for the Ethernet, not the physical addresses in the memory map.
    abhinav.mathur
    New Member
    New Member
    Posts:


    --
    15 May 2013 03:43 PM
    Hi products_apps,
    I have made wrapper functions in miniport.c to call LAN921xWriteMAC32. I have further written a wrapper in ndis.c to call the miniport function. Finally the ndis function is exported out and I load this driver from my own stream driver. The application accesses my stream driver using IOCTL.
    I believe the issue is with the pni not being initialized correctly. I am trying to mimic what the miniportinitialize function does to setup the pni, but I am still seeing the exception. Any clues?
    richh@logicpd.com
    New Member
    New Member
    Posts:52


    --
    15 May 2013 04:30 PM
    Abhinav,
    That level of question is beyond the depth we can provide on the TDG. If you are interested in support, we can research your question under a Support contract. Details can be found at:

    http://www.logicpd.com/su...rt/support-packages/
    Servo R.
    New Member
    New Member
    Posts:6


    --
    04 Dec 2013 07:55 AM

    You can also usedethtool

     # ethtool -E eth0 offset 0 value 165
    # ethtool -E eth0 offset 1 value <1st byte of MAC address>
    # ethtool -E eth0 offset 2 value <2nd byte of MAC address>
    # ethtool -E eth0 offset 3 value <3rd byte of MAC address>
    # ethtool -E eth0 offset 4 value <4th byte of MAC address>
    # ethtool -E eth0 offset 5 value <5th byte of MAC address>
    # ethtool -E eth0 offset 6 value <6th byte of MAC address>

    The value 165 is a 'magic number' required by the LAN9221 to confirm that the EEPROM data is a MAC address.
    The MAC address bytes need to be entered in decimal, not hex when using this tool.  

    Reference: http://gumstix.8.x6.nabbl...dress-td4512973.html

    steven.eckhoff
    Basic Member
    Basic Member
    Posts:192


    --
    05 Dec 2013 09:34 AM

    Good find!

    The link did not work for me. Here is another one; search for ethtool.

    http://www.tech.plym.ac.u...ahim/Interesting.asp

    You are not authorized to post a reply.