This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C6746: c6746 connected to phy with rmii lines

Part Number: TMS320C6746

Hi

we are using the C6746 connected to a switch using RMII interface, the switch interface is like a PHY to the DSP.

I use the NIMUemacExampleclient_lcdkOMAPL138C674xBiosExampleProject in sdk 4.1.0.6. In the LCDK board the DSP EMAC is connected to a phy chip using MII interface.

I change the example code to work with RMII in the following way - change pinmux to use RMII insted of MII, change sys chipcfg3 register set to RMII mode.

the example do not run on our board - there is no ping from the board. 

Do I missed some setting needed for the RMII .

The switch itself in the board is working there are ping between 2 devices connected to the switch chip but no ping from the DSP. looking on the RMMI lines I can see data is being sent to the DSP but no data came out from the DSP

the application print the IP in use (static IP).

the example work fine on the LCDK board.

Best Regards

Ilan

  • Hi Ilan,

    Have you changed the EMACInitCfg structure in EMAC_soc.c:
    MAC_HwAttrs_V0 EMACInitCfg[1] =
    {
    1, /* num of dsp cores */
    - MII, /* mac select */
    + RMII,
    EMAC_CONFIG_MODEFLG_FULLDUPLEX |
    EMAC_CONFIG_MODEFLG_GMIIEN,

    This is explained in the EMAC user guide: processors.wiki.ti.com/.../Processor_SDK_RTOS_EMAC See the EMAC Configuration Structure section.

    Best Regards,
    Yordan
  • Hi Yordan

    I am using the NIMU_emacExampleclient_lcdkOMAPL138C674xBiosExampleProject example. In this example there is no call to emac_open function the only function in use are :

    NC_SystemOpen, NC_NetStart that are definde in netctrl.c in NDK.

    I tried to call :

    EMAC_socGetInitCfg(0, &emac_cfg);
    emac_cfg.macSel=1;//RMII
    EMAC_socSetInitCfg(0, &emac_cfg);

    to set driver RMII bit but still no ping. I also tried to modify the file emac_soc.c and change the flag mac_sel to RMII and recompile the driver.

    I attache the modified client_omap13.c file.

    how does the NDK know the driver to use (there are emac drivers in nsp_1_10_03_15 and in pdk_omap138_1_0_2)

    where does the emac_open function is being call in this example

    Best Regards

    Ilan

  • Hi Ilan,

    You also need to make sure that the RMII clock is set to external 50 MHz. See the following E2E thread for more info:

    LCDK6748 EMAC implementation for RMII - Processors forum - Processors - TI E2E support forums

    e2e.ti.com
    I have built the starterware software example "enet_echo" for the LCDK6748 development kit. The app runs correctly on the LCDK6748 hardware. The LCDK6748 hardware

  • Hi Sahin and Yordan

    Yes in the pinmux configuration I configure the 50MHZ clock to be external (received from the switch) and I can see that the switch send this clock correctly.

    But still there are no pink response from DSP - no data is getting out of DSP - I can see using the scope that when sending ping command from PC the DSP receive line have activity but no data is getting out from the DSP. In the E2E thread you sent me, John L seems to have the same problem - dsp do not send any data.

    attached is the client_omapl13x.c file with my changes

    Best Regards

    Ilan

    client_omapl13x.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    /**
    * @file client_omapl13x.c
    *
    * @brief TCP/IP Network Client example.
    */
    /*
    * Copyright (c) 2017, Texas Instruments Incorporated
    * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    *
    * * Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    *
    * * Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in the
    * documentation and/or other materials provided with the distribution.
    *
    * * Neither the name of Texas Instruments Incorporated nor the names of
    * its contributors may be used to endorse or promote products derived
    * from this software without specific prior written permission.
    *
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */
    #include <stdio.h>
    /* BIOS6 include */
    #include <ti/sysbios/BIOS.h>
    #include <ti/drv/uart/UART.h>
    #include <ti/drv/uart/UART_stdio.h>
    #include <ti/board/board.h>
    #include <ti/ndk/inc/netmain.h>
    #include <ti/ndk/inc/_stack.h>
    #include <ti/ndk/inc/tools/console.h>
    #include <ti/ndk/inc/tools/servers.h>
    #include <ti\board\src\lcdkOMAPL138\include\board_internal.h>
    #include <ti/csl/csl_syscfg.h>
    #include <ti/drv/emac/soc/emac_soc_V0.h>
    extern void AddWebFiles(void);
    #define platform_write printf
    //#define EMULATOR_BOARD 1
    /* Title String */
    char *VerStr = "\nTCP/IP Stack 'Client!' Application\n\n";
    UINT8 DHCP_OPTIONS[] = { DHCPOPT_SERVER_IDENTIFIER, DHCPOPT_ROUTER };
    /* System Task Code [ Server Daemon Servers ] */
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX