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.

EMAC failure for the LCDK-OMAP-L138 (and I can't explain why)

Other Parts Discussed in Thread: OMAPL138, SYSBIOS

Hi all,

Let me start out with a brief description of my problem. I'm attempting to build a small NDK demo application on the LCDK-OMAP-L138 board [1]. However, through debugging, I've found that the system fails (in a weird way) at this line of code:

/* Disable wrapper interrupt pacing */
ECTL_REGS->INTCONTROL = 0x00;

This code is found at line 983 of /opt/ti/nsp_1_10_02_09/packages/ti/drv/omapl138/csl_emac.c

When that line is attempted to be executed, the system fails to continue, and instead, the emulator reports that the program counter has moved to 0xFFFF0010 (where no symbol is defined).

I basically have no code that I've written in my own project (even more so if we only look at code that gets executed). I really don't have any clue on how to go about determining why writing to this register causes the machine to fail.

I guess I can also say that if I look in the memory map, this is the contents around 0xFFFF0010:
* 0xFFFF0000 ti_sysbios_family_arm_da830_Hwi_vectors
* 0xFFFF0040 ti_sysbios_family_arm_da830_Hwi0
* 0xFFFF0040 ti_sysbios_family_arm_da830_Hwi_vectorTable
* 0xFFFF0048 ti_sysbios_family_arm_da830_Hwi1

Full package list:
* BIOS 6.35.04.50
* NDK 2.22.03.20
* EDMA3 LLD 02.11.09.08
* MCSDK BIOS 3.00.01.12
* NSP 1.10.02.09

References:
[1]: http://www.ti.com/tool/tmdxlcdk138 

  • This might also be useful. Here's the contents of my cfg file:

    var Diags  = xdc.useModule('xdc.runtime.Diags');
    var Log    = xdc.useModule('xdc.runtime.Log');
    var Main   = xdc.useModule('xdc.runtime.Main');
    var Global = xdc.useModule('ti.ndk.config.Global');
    var Emac   = xdc.useModule('ti.ndk.config.Emac');
    var Udp    = xdc.useModule('ti.ndk.config.Udp');
    var Ip     = xdc.useModule('ti.ndk.config.Ip');
    var Icmp   = xdc.useModule('ti.ndk.config.Icmp');

    Program.argSize = 0;
    Program.stack = 16384;

    Main.common$.diags_INFO = Diags.ALWAYS_ON;
    Main.common$.diags_INTERNAL = Diags.ALWAYS_ON;
    Main.common$.diags_ENTRY = Diags.ALWAYS_ON;
    Main.common$.diags_EXIT = Diags.ALWAYS_ON;

    Global.networkOpenHook = "&NetworkOpen";
    Global.networkCloseHook = "&NetworkClose";
    Emac.device = Emac.EVMOMAPL138;
    Ip.hostName = "lcdkomapl138";
    Global.IPv6 = false;
    Ip.autoIp = false;
    Ip.address = "10.10.1.50";
    Ip.mask = "255.255.255.0";
    Ip.gatewayIpAddr = "10.10.1.1";

  • William,

    Please add the below lines on your cfg file. It may solve your issue.

    /*  Use the OMAPL138 Emac module.  This will cause the dirver library to link into the program. */
    xdc.useModule('ti.drv.omapl138.Emac');

  • Hi Pubesh:

    var Emac   = xdc.useModule('ti.ndk.config.Emac');
    Emac.device = Emac.EVMOMAPL138;

    is functionally identical to:

    xdc.useModule('ti.drv.omapl138.Emac');

    That being said, I did give it a try anyways, and the result was the same.

  • William,

    Thanks for the update.
    Which NDK demo(cfgdemo, client, helloworld or your own code) are you running?
    Did you get any error message from EMAC_open function call?
    If you are writing custom code for EMAC, the below wiki page will help you,
    http://processors.wiki.ti.com/index.php/StarterWare_EMAC