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.

Delfino F2837xD SYS/BIOS examples

Other Parts Discussed in Thread: C2000WARE, SYSBIOS, TMS320F28379D, TMS320F28377D

Are there any SYS/BIOS Examples for  Delfino F2837xD  ??

  • Yes, there are. In CCS, you should be able to go to File -> New -> CCS Project and select the F2837xD. In the templates and examples section, you should see a SYS/BIOS section. There are a few basic "empty" projects and a link to the import wizard where you can find examples for a number of different modules.

    Whitney

  • Thanks,

    I could not find example using Hwi & DMA. 

    How could I configure to use interrupts & DMA with SYS/BIOS ?

  • There's an example called "pie" that demonstrates Hwis. SYS/BIOS doesn't configure or manage the DMA, so you would still want to use the standard C2000Ware examples for a demonstration on configuring the DMA. The only difference is that you would set up a Hwi to call the DMA ISR instead of plugging it into the PIE vector table yourself.

    Whitney

  • Hi  Whitney,

    Is there a way for configuring PIE with SYS/BIOS in runtime, the example  called "pie" shows how to configure the interrupts with the *.cfg file ...

    Thanks

  • Yes, you can do that. Pull up the SYS/BIOS API Reference document and find the ti.sysbios.hal.Hwi module. It lists all the APIs and gives a little code snippet showing how to set up Hwis at runtime.

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios/6_76_04_02/exports/bios_6_76_04_02/docs/cdoc/index.html#ti/sysbios/hal/Hwi.html

    Whitney

  • Thanks,

    I was looking for a Guide or Manual...

    I am trying to create two projects ( one for each core - F28379D) where the Core1 is performing a hard real-time task without OS ,

    and Core2 has a more soft real-time task with SYS/BIOS ...

    before adding the SYS/BIOS everything is working as expected,  but after I add the SYS/BIOS to project of core2 both cores stop working

    Any ideas what is wrong ?

    P.S.: I've added WD disable to core2

  • Can you elaborate on what you mean by "stop working"? Are they getting stuck somewhere?

    Whitney

    1. I am using TMS320F28379D - which is not in the supported devices  list - but the TMS320F28377D is supported, is there a reason for that ? And may this be the problem I am facing ?
    2. Core1 is working OK, but the second core gets stuck and it looks like it is stuck in "unhandled interrupt routine"  ( program uses drivelib.lib )I am using two interrupts that I am  defining in the *.cfg file as it shown in "pie" example
    3. Afterwards I've commented out almost everything on Core2, and trying to run simple program that creates one task at run-time which toggles LED - this got me this error:

    >[C28xx_CPU2] Invalid CIO command (0) in the CIO buffer at address (0x8C80) was not recognized. Please check the device and program memory maps.

    1. Then I took my previous test project that has driverlib + sys/bios : 
      1. This project runs on Core1
      2. Works as expected - no problem
      3. After converting this project to run on Core2 ( changing predefined symbol from CPU1 to CPU2 ) and I got the same error above

     

  • You shouldn't call the driverlib functions that initialize the PIE on CPU2 if it's running SYS/BIOS. SYS/BIOS will fill the PIE vector table with its Hwi dispatcher so calling the the driverlib init vector table function will overwrite that and cause issues.

    Whitney

  • I am not calling Init PIE functions, my program is very simple:

    /*
     *  ======== taskFxn ========
     */
    Void taskFxn(UArg a0, UArg a1)
    {
        uint16_t i, k;
    
        /* Initialize the data buffers */
        for(i = 0, k = 128 ; i < 128; i++, k += 2)
        {
            sData[i] = k;
            rData[i] = 0xFFFF;
        }
        GPIO_writePin(DEVICE_GPIO_PIN_LED2, 1);
    
        while(1)
        {
            GPIO_togglePin(DEVICE_GPIO_PIN_LED2);
            Task_sleep(100000);
        }
    }
    
    /*
     *  ======== main ========
     */
    Int main()
    { 
        Task_Handle task;
        Task_Params taskParams;
    
        Task_Params_init(&taskParams);
        taskParams.priority = 1;
        task = Task_create(taskFxn, &taskParams, NULL);
        if (task == NULL)
        {
            System_printf("Task create failed");
            BIOS_exit(0);
        }
    
        BIOS_start();    /* does not return */
        return(0);
    }

    After I'll be able to run this simple program with SYS/BIOS on CORE2, I will try to use Interrupts and DMA.

  • Okay, I don't see anything wrong with that at first glance. Can you clarify what error you're seeing with this simple application on core 2? Is it just the CIO error or is it executing incorrectly as well? If you put a breakpoint in the task, does it hit it? Is it getting stuck somewhere?

    Whitney

  • Sometimes I get the CIO error,

    If I set breakpoint in the task the program gets stuck somewhere and never hits it.

    Program is not executing correctly, the LED is not being toggled.

    If I run this program on CORE1,  it executes as expected and there are no problems.

  • Where is it getting stuck? If you halt CPU2, where is it? Is it in SYS/BIOS code? Is it at some address in boot ROM? Does it get stuck before main()? After BIOS_start()? Please use breakpoints to try to narrow it down a bit.

    I assume your CPU1 program properly assigns ownership of the LED GPIO to CPU2?

    If you go to Tools -> ROV Classic in CCS and look though the different sections, do you see anything odd? Like if you go to "BIOS" and "Scan for errors..." do you see anything? If you go to "Task" do you see a line for your "taskFxn"? In the "Detailed" tab can you see if it's blocked on Task_sleep or some other status?

    Do you mind sharing your .cfg file?

    Thanks,

    Whitney

  • Hi Whitney,

    I was able to fix the problem, my code was missing the following line:

    memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

    Now I am able to toggle LED, execute DMA with interrupts  ....

    Is there a way to configure the boot process to do the memcpy before the main() function ???

    Thanks 

  • SYS/BIOS has some Boot hooks where you can plug code that run before main, so you could consider doing the memcopy there. There's some more info here on this wiki page.

    There's also table(BINIT) that you can use in your linker (see the Assembly Language Tools Guide).

    Whitney