Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

How to specify 10Mbps and 100Mbps

Hi all,

How and where can I specify which LAN connection I want to use: 10Mbps or 100 Mbps; full duplex or half duplex? I am using NIOS II 5.1 'simple socket server example' on NIOS II 1S10ES Development kit.

Sincerely,

KVM.

7 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by vizziee@May 22 2006, 11:56 AM

    hi all,

    how and where can i specify which lan connection i want to use: 10mbps or 100 mbps; full duplex or half duplex? i am using nios ii 5.1 'simple socket server example' on nios ii 1s10es development kit.

    sincerely,

    kvm.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=15504)

    --- quote end ---

    --- Quote End ---

    There&#39;s some registers in the LAN91C111 that you&#39;ll have to set. Go to SMSC&#39;s site and download the datasheet for the chip. The driver that ship with the Nios dev kit sets it to auto-negotiate the speed, so just search for where it does that and change it to use whatever speed you want.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=15504)</div>

    --- Quote End ---

    There&#39;s some registers in the LAN91C111 that you&#39;ll have to set. Go to SMSC&#39;s site and download the datasheet for the chip. The driver that ship with the Nios dev kit sets it to auto-negotiate the speed, so just search for where it does that and change it to use whatever speed you want.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=15513)</div>

    --- Quote End ---

    Thanx a lot. But can u tell me by default, what line (mbps and duplex method) is used in simple_socket-server example?

    Sincerely,
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It&#39;s not just in the example or even, really, a part of the example. It&#39;s in the driver code for the 91c111. <lan91c11_comp_dir>/UCOSII/src/altera_avalon_lan91c111.c

    - slacker
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    By default the driver allows the lan91c111 chip to auto-negotiate its capabilities with whatever it is connected to.

    --dalon
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by slacker@May 23 2006, 10:00 AM

    it&#39;s not just in the example or even, really, a part of the example. it&#39;s in the driver code for the 91c111. <lan91c11_comp_dir>/ucosii/src/altera_avalon_lan91c111.c

    - slacker

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=15535)

    --- quote end ---

    --- Quote End ---

    Thanks slacker. In which file and what change should I make to force the connection for 10Mbps Full Duplex mode (as I observed my custom board is malfunctioning at 100Mbps mode).

    Sincerely,
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Take a look at the existing code (which sets the PHY to auto negotiate) and modify it. I&#39;ve already mentioned which file it&#39;s in... <components>/altera_avalon_lan91c111/UCOSII/src/altera_avalon_lan91c111.c

    There&#39;s a section which starts with the comment

    /* Start the Auto Negotiation process */
    /* Try to negotiate, we have a go at this five times if it fails */

    You need to modify the code, in this section, to set the PHY to 10/Full. It appears that all of the masks that you&#39;ll need to do this are already provided...in the <components>/altera_avalon_lan91c111/inc/altera_avalon_lan91c111.h header file.

    Best of luck!

    - slacker
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by slacker@Jun 28 2006, 10:28 AM

    take a look at the existing code (which sets the phy to auto negotiate) and modify it. i&#39;ve already mentioned which file it&#39;s in... <components>/altera_avalon_lan91c111/ucosii/src/altera_avalon_lan91c111.c

    there&#39;s a section which starts with the comment

    /* start the auto negotiation process */
    /* try to negotiate, we have a go at this five times if it fails */

    you need to modify the code, in this section, to set the phy to 10/full. it appears that all of the masks that you&#39;ll need to do this are already provided...in the <components>/altera_avalon_lan91c111/inc/altera_avalon_lan91c111.h header file.

    best of luck!

    - slacker

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16475)</div>

    --- Quote End ---

    Thanks slacker.

    I changed the register mask (PHY CONTROL register) in the header file altera_avalon_lan91c111_regs.h and set it for 10Mbps FDX mode. But it didn&#39;t work and gave an error &#39;Failure in initialiazing lwip_devices-init&#39; while running the rogram.

    Can you give a detailed answer how I can set the speed?

    Sincerely,