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.

Does csl function work in SYS/BIOS?

Other Parts Discussed in Thread: TMS320C6678, SYSBIOS


Hi,all!
I have met a problem: when I use CSL_GPIO_setOutputData() function in SYS/BIOS,this function does'nt work.But if not use SYS/BIOS,this funion does work.So I wonder whether csl function can use in SYS.BIOS or not.Is it possible that the initialization is wrong?I use GPIO11 as output.The code is as below:


In addtion,I want to know the main difference between ***.h and ***Aux.h.
For example,csl_gpio.h and csl_gpioAux.h.
I have read the note of csl_gpio.h as"This is the main Header File for the GPIO Module which defines all the data structures and exported API.".
and the csl_gpioAux.h as" This is the GPIO Auxilary Header File which exposes the various CSL Functional Layer API's to configure the GPIO Module.".

But I really don't know what the word 'Aux'exactly mean.Hope for your help!
Many thanks!


TMS320C6678
ccs 5.2
bios 6_33_05_46
pdk_C6678_1_0_0_18

  • Hi,
    I have not used GPIO module with SYS/BIOS. Someone can comment on the first half of the above post.

    The CSL GPIO has two modules,
    1. Data structures. (csl_gpio.h)
    2. Functions. (csl_gpioAux.h)
    Refer: ..\ti\pdk_C6678_x_x_x_x\packages\ti\csl\docs\doxygen\html\modules.html
    Thank you.
  • Hi,

    SYS/BIOS does not effect the CSL function. Please share your GPIO test project .cfg file.

    Thanks,
  • Here is the cfg file:

    /* 
     * Copyright (c) 2012, 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.
     * */
    
    var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
    
    /*
     *  Get the list of names that the build device supports.
     *  I.e. ["CORE0", "CORE1", "CORE2" ... ]
     */
    var nameList = MultiProc.getDeviceProcNames();
    
    /* 
     *  Since this is a single-image example, we don't (at build-time) which 
     *  processor we're building for.  We therefore supply 'null' 
     *  as the local procName and allow IPC to set the local procId at runtime.
     */
    MultiProc.setConfig(null, nameList);
    //MultiProc.setConfig("CORE6", [ "CORE0", "CORE1", "CORE2", "CORE3", "CORE4", "CORE5", "CORE6", "CORE7" ]);                           
    /* 
     *  The SysStd System provider is a good one to use for debugging 
     *  but does not have the best performance. Use xdc.runtime.SysMin
     *  for better performance.
     */
    var Memory = xdc.useModule('xdc.runtime.Memory');
    var System   = xdc.useModule('xdc.runtime.System');
    var SysStd   = xdc.useModule('xdc.runtime.SysStd');
    System.SupportProxy = SysStd;
    
    /* Modules explicitly used in the application */
    var MessageQ    = xdc.useModule('ti.sdo.ipc.MessageQ');
    var Notify      = xdc.useModule('ti.sdo.ipc.Notify');
    var Ipc         = xdc.useModule('ti.sdo.ipc.Ipc');
    var HeapBufMP   = xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');
    var MultiProc   = xdc.useModule('ti.sdo.utils.MultiProc');
    
    /* BIOS/XDC modules */
    var BIOS        = xdc.useModule('ti.sysbios.BIOS');
    BIOS.heapSize   = 0x20000;
    var Task        = xdc.useModule('ti.sysbios.knl.Task');
    
    var System = xdc.useModule("xdc.runtime.System");
    var SysMin = xdc.useModule("xdc.runtime.SysMin");
    System.SupportProxy = SysMin; /* not really necessary since SysMin is the default */
    
    
    /* Hardware Interrupt  module */
    var Hwi	= xdc.useModule ('ti.sysbios.hal.Hwi');
    var Ecm = xdc.useModule ('ti.sysbios.family.c64p.EventCombiner');
    
    var Program = xdc.useModule('xdc.cfg.Program'); 
    Program.stack = 0x20000;
    
    
    
    
    /*
     * Enable Event Groups here and registering of ISR for specific GEM INTC is done
     * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
    
    Ecm.eventGroupHwiNum[0] = 7;
    Ecm.eventGroupHwiNum[1] = 8;
    Ecm.eventGroupHwiNum[2] = 9;
    Ecm.eventGroupHwiNum[3] = 10;
     */
    
    
    
    /* Synchronize all processors (this will be done in Ipc_start) */
    //Ipc.procSync = Ipc.ProcSync_PAIR;
    
    Ipc.procSync = Ipc.ProcSync_ALL;
    
    /* Shared Memory base address and length */
    var SHAREDMEM           = 0x0C350000;
    var SHAREDMEMSIZE       = 0x000A0000;
    
    /* 
     *  Need to define the shared region. The IPC modules use this
     *  to make portable pointers. All processors need to add this
     *  call with their base address of the shared memory region.
     *  If the processor cannot access the memory, do not add it.
     */ 
    var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
    SharedRegion.setEntryMeta(0,
        { base: SHAREDMEM, 
          len:  SHAREDMEMSIZE,
          ownerProcId: 0,
          isValid: true,
          name: "MSMC_IPC",
        });
    
    
    var tskMain  	    = Task.create("&tsk0_func");
    //tskMain.stackSize  = 0x10000;
    tskMain.priority   = 0x1;
    tskMain.instance.name	= "tsk0_func";
    

  • Hi,

    Thanks for your update. As per your cfg file you did not import the CSL packages. For my understanding, CSL packages are not imported means, the SYSBIOS will not support the CSL functions.

    /* Load and use the CSL packages */
    var cslSettings = xdc.useModule ('ti.csl.Settings');

    Thanks,