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.

some question about the sys/bios .

Other Parts Discussed in Thread: OMAPL138, SYSBIOS

I running the following code in the omapl138 arm chip. when execute  GPIO_setDir(GPIO_BANK6, GPIO_PIN13, GPIO_OUTPUT); 

program hangup,ccsv4 console tip some error,i cannot find where cause of error.

dle: 0xc3010020.
Task stack base: 0xc3010068.
Task stack size: 0x800.
R0 = 0x00002000  R8  = 0xffffffff
R1 = 0x0000000d  R9  = 0xffffffff
R2 = 0xc3010838  R10 = 0xffffffff
R3 = 0x00000000  R11 = 0xffffffff
R4 = 0xffffffff  R12 = 0x01e26088
R5 = 0xffffffff  SP(R13) = 0xc3014370
R6 = 0xffffffff  LR(R14) = 0xc3009f48
R7 = 0xffffffff  PC(R15) = 0xc3001b74
PSR = 0x600000df
ti.sysbios.family.arm.exc.Exception: line 174: E_dataAbort: pc = 0xc3001b74, lr = 0xc3009f48.
xdc.runtime.Error.raise: terminating execution
 

#include <xdc/std.h>
#include <xdc/runtime/Error.h>
#include <xdc/runtime/System.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Task.h>
#include "types.h"
#include "evmomapl138.h"
#include "evmomapl138_gpio.h"
#include "evmomapl138_timer.h"

#define PINMUX_8 *(unsigned int *)0x01c14154
#define KICK0  *(unsigned int *)0x01c14038
#define KICK1  *(unsigned int *)0x01c1403c


void _wait(int delay)
{
 int i;
 for(i=0;i<delay;i++);
}

Void taskFxn(UArg a0, UArg a1)
{
    System_printf("enter taskFxn()\n");

    
    EVMOMAPL138_pinmuxConfig(13,0x00000f00,0x000000800);
 GPIO_setDir(GPIO_BANK6, GPIO_PIN13, GPIO_OUTPUT); 
 GPIO_setOutput(GPIO_BANK6, GPIO_PIN13, OUTPUT_HIGH);
 
 SYSCONFIG->HOST1CFG = 0x80010000;//0xc0000000; //0x80002b80
 //EVMOMAPL138_enableDsp();
 Wake_DSP();
     
 while(1)
 {
  _wait(500000);
  GPIO_setOutput(GPIO_BANK6, GPIO_PIN13, OUTPUT_HIGH);
  _wait(500000);
  GPIO_setOutput(GPIO_BANK6, GPIO_PIN13, OUTPUT_LOW);
 }
}
int main(void)
{

    Task_Handle task;
    //Error_Block eb;

    System_printf("enter main()\n");

    //Error_init(&eb);
    task = Task_create(taskFxn, NULL, NULL);
    if (task == NULL) {
        System_printf("Task_create() failed!\n");
        BIOS_exit(0);
    }

    BIOS_start();     /* enable interrupts and start SYS/BIOS */
}

  • Hi Gao weidong ,

    Could you please specify the PSP version which you are using?

    And also, I think the mmu.cfg file is missing in the GPIO application's cfg file. Could you please verify it?

    Thanks and Regards,

    Sandeep K

  • i have not use psp driver.

    where is the mmu configure file?.this is my app.cfg file context:

    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    var Diags = xdc.useModule('xdc.runtime.Diags');
    var Error = xdc.useModule('xdc.runtime.Error');
    var Log = xdc.useModule('xdc.runtime.Log');
    var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
    var Main = xdc.useModule('xdc.runtime.Main');
    var Memory = xdc.useModule('xdc.runtime.Memory')
    var SysMin = xdc.useModule('xdc.runtime.SysMin');
    var System = xdc.useModule('xdc.runtime.System');
    var Text = xdc.useModule('xdc.runtime.Text');

    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var Swi = xdc.useModule('ti.sysbios.knl.Swi');
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');

    /*
    * Program.argSize sets the size of the .args section.
    * The examples don't use command line args so argSize is set to 0.
    */
    Program.argSize = 0x0;

    /*
    * Uncomment this line to globally disable Asserts.
    * All modules inherit the default from the 'Defaults' module. You
    * can override these defaults on a per-module basis using Module.common$.
    * Disabling Asserts will save code space and improve runtime performance.
    Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
    */

    /*
    * Uncomment this line to keep module names from being loaded on the target.
    * The module name strings are placed in the .const section. Setting this
    * parameter to false will save space in the .const section. Error and
    * Assert messages will contain an "unknown module" prefix instead
    * of the actual module name.
    Defaults.common$.namedModule = false;
    */

    /*
    * Minimize exit handler array in System. The System module includes
    * an array of functions that are registered with System_atexit() to be
    * called by System_exit().
    */
    System.maxAtexitHandlers = 4;

    /*
    * Uncomment this line to disable the Error print function.
    * We lose error information when this is disabled since the errors are
    * not printed. Disabling the raiseHook will save some code space if
    * your app is not using System_printf() since the Error_print() function
    * calls System_printf().
    Error.raiseHook = null;
    */

    /*
    * Uncomment this line to keep Error, Assert, and Log strings from being
    * loaded on the target. These strings are placed in the .const section.
    * Setting this parameter to false will save space in the .const section.
    * Error, Assert and Log message will print raw ids and args instead of
    * a formatted message.
    Text.isLoaded = false;
    */

    /*
    * Uncomment this line to disable the output of characters by SysMin
    * when the program exits. SysMin writes characters to a circular buffer.
    * This buffer can be viewed using the SysMin Output view in ROV.
    SysMin.flushAtExit = false;
    */

    /*
    * The BIOS module will create the default heap for the system.
    * Specify the size of this default heap.
    */
    BIOS.heapSize = 0x1000;

    /* System stack size (used by ISRs and Swis) */
    Program.stack = 0x2000;

    /* Circular buffer size for System_printf() */
    SysMin.bufSize = 0x200;

    /*
    * Create and install logger for the whole system
    */
    var loggerBufParams = new LoggerBuf.Params();
    loggerBufParams.numEntries = 16;
    var logger0 = LoggerBuf.create(loggerBufParams);
    Defaults.common$.logger = logger0;
    Main.common$.diags_INFO = Diags.ALWAYS_ON;

    System.SupportProxy = SysMin;
    var TSK_MainCtrlParams = new Task.Params();
    TSK_MainCtrlParams.instance.name = "TSK_MainCtrl";
    TSK_MainCtrlParams.priority = 1;
    TSK_MainCtrlParams.stackSize = 81920;
    Program.global.TSK_MainCtrl = Task.create("&MainCtrl_TSK", TSK_MainCtrlParams);
  • I think Sandeep has correctly identified the source of the problem.

    If your application tries to access memory regions that have no corresponding entry in the MMU table, a data abort exception such as the one you are getting will occur.

    For maximum performance, SYS/BIOS enables the ARM's program and data caches.

    In order to enable the data cache, the ARM's MMU table must be configured and enabled.

    By default, SYS/BIOS populates the MMU table with entries for ONLY those memory segments defined in the platform as well as for the peripherals SYS/BIOS uses (timers, interrupt controller, etc).

    There is an entry in the MMU table for each 1 MB page in the memory map.

    For the OMAPL138, in order to access the timers it uses, SYS/BIOS has already filled the entries for the 1MB pages starting at 0x01b00000 and 0x01c00000.

    You'll have to manually add MMU table entries for any peripherals who's base addresses are not within those address ranges.

    The forum post referenced below gives an example of how to add an entry to the MMU table for each of the peripherals you are trying to access:

        http://e2e.ti.com/support/embedded/bios/f/355/t/150298.aspx#543657

    Alan

  • I forgot to mention the FAQ regarding how to decode the Exception dump.

    Here is the link:

        http://processors.wiki.ti.com/index.php/SYS/BIOS_FAQs#ExceptionDumpDecodingAnchor

    Alan