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.

TMS320F28377D: SyntaxError: Unexpected token '&&' when I open sysconfig

Part Number: TMS320F28377D
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Tool/software:

Hello,

When I opened sysconfig, there is SyntaxError: Unexpected token '&&' like below picture.
the error wasn't occurred in my colleagues' PC. Only my PC had a problem.

CCS 12.7.1.00001 

C2000 SysConfig (5.01.00.00)

Please let me know how to do.

Thanks.

  • Hi, 

    Can you mention the C2000Ware version that you are using ? Also, request you to share the .syscfg file that you are using .

    Best Regards

    Siddharth

  • Thank you for reply. I'm sorry to response late.

    C2000ware version is 5.01.00.00

    And I attached .syscfg file code.

    /**
     * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
     * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
     * @cliArgs --device "F2837xD" --package "F2837xD_176PTP" --part "F2837xD_176PTP" --context "CPU2" --product "C2000WARE@5.01.00.00"
     * @versions {"tool":"1.19.0+3426"}
     */
    
    /**
     * Import the modules used in this configuration.
     */
    const adc            = scripting.addModule("/driverlib/adc.js", {}, false);
    const adc1           = adc.addInstance();
    const adc2           = adc.addInstance();
    const adc3           = adc.addInstance();
    const adc4           = adc.addInstance();
    const cputimer       = scripting.addModule("/driverlib/cputimer.js", {}, false);
    const cputimer1      = cputimer.addInstance();
    const cputimer2      = cputimer.addInstance();
    const device_support = scripting.addModule("/driverlib/device_support.js");
    const ipc            = scripting.addModule("/driverlib/ipc.js");
    const memcfg         = scripting.addModule("/driverlib/memcfg.js");
    const sysctl         = scripting.addModule("/driverlib/sysctl.js");
    const Vector         = scripting.addModule("/libraries/dsp/FPU/Vector/Vector.js", {}, false);
    const Vector1        = Vector.addInstance();
    
    /**
     * Write custom configuration values to the imported modules.
     */
    adc1.$name                          = "myADC0";
    adc1.adcResolutionMode              = "ADC_RESOLUTION_16BIT";
    adc1.adcSignalMode                  = "ADC_MODE_DIFFERENTIAL";
    adc1.enabledSOCs                    = ["ADC_SOC_NUMBER0","ADC_SOC_NUMBER2","ADC_SOC_NUMBER4"];
    adc1.soc0Channel                    = "ADC_CH_ADCIN0_ADCIN1";
    adc1.soc0Trigger                    = "ADC_TRIGGER_EPWM2_SOCA";
    adc1.soc0SampleWindow               = 64;
    adc1.soc2Channel                    = "ADC_CH_ADCIN2_ADCIN3";
    adc1.soc2Trigger                    = "ADC_TRIGGER_EPWM2_SOCA";
    adc1.soc2SampleWindow               = 64;
    adc1.soc4Trigger                    = "ADC_TRIGGER_EPWM2_SOCA";
    adc1.soc4SampleWindow               = 64;
    adc1.interruptPulseMode             = "ADC_PULSE_END_OF_CONV";
    adc1.adcClockPrescaler              = "ADC_CLK_DIV_4_0";
    adc1.registerInterrupts             = ["1"];
    adc1.enabledInts                    = ["ADC_INT_NUMBER1"];
    adc1.enableInterrupt1               = true;
    adc1.enableInterrupt1ContinuousMode = true;
    adc1.interrupt1SOCSource            = "ADC_SOC_NUMBER4";
    adc1.soc4Channel                    = "ADC_CH_ADCIN4_ADCIN5";
    adc1.adcInt1.enableInterrupt        = true;
    
    adc2.$name              = "myADC1";
    adc2.adcBase            = "ADCB_BASE";
    adc2.adcResolutionMode  = "ADC_RESOLUTION_16BIT";
    adc2.adcSignalMode      = "ADC_MODE_DIFFERENTIAL";
    adc2.enabledSOCs        = ["ADC_SOC_NUMBER0","ADC_SOC_NUMBER2"];
    adc2.soc0Channel        = "ADC_CH_ADCIN0_ADCIN1";
    adc2.soc0Trigger        = "ADC_TRIGGER_EPWM2_SOCA";
    adc2.soc0SampleWindow   = 64;
    adc2.soc2Channel        = "ADC_CH_ADCIN2_ADCIN3";
    adc2.soc2Trigger        = "ADC_TRIGGER_EPWM2_SOCA";
    adc2.soc2SampleWindow   = 64;
    adc2.interruptPulseMode = "ADC_PULSE_END_OF_CONV";
    adc2.useInterrupts      = false;
    adc2.adcClockPrescaler  = "ADC_CLK_DIV_4_0";
    
    adc3.$name                          = "myADC2";
    adc3.adcBase                        = "ADCD_BASE";
    adc3.adcResolutionMode              = "ADC_RESOLUTION_16BIT";
    adc3.adcSignalMode                  = "ADC_MODE_DIFFERENTIAL";
    adc3.enabledSOCs                    = ["ADC_SOC_NUMBER0","ADC_SOC_NUMBER2"];
    adc3.soc0Channel                    = "ADC_CH_ADCIN0_ADCIN1";
    adc3.soc0Trigger                    = "ADC_TRIGGER_EPWM2_SOCA";
    adc3.soc0SampleWindow               = 64;
    adc3.soc2Channel                    = "ADC_CH_ADCIN2_ADCIN3";
    adc3.soc2Trigger                    = "ADC_TRIGGER_EPWM2_SOCA";
    adc3.soc2SampleWindow               = 64;
    adc3.interruptPulseMode             = "ADC_PULSE_END_OF_CONV";
    adc3.enabledInts                    = ["ADC_INT_NUMBER1"];
    adc3.enableInterrupt1               = true;
    adc3.interrupt1SOCSource            = "ADC_SOC_NUMBER2";
    adc3.registerInterrupts             = ["1"];
    adc3.adcClockPrescaler              = "ADC_CLK_DIV_4_0";
    adc3.enableInterrupt1ContinuousMode = true;
    adc3.useInterrupts                  = false;
    
    adc4.$name              = "myADC3";
    adc4.adcBase            = "ADCC_BASE";
    adc4.adcClockPrescaler  = "ADC_CLK_DIV_4_0";
    adc4.soc2Channel        = "ADC_CH_ADCIN2";
    adc4.soc2Trigger        = "ADC_TRIGGER_EPWM2_SOCA";
    adc4.soc2SampleWindow   = 20;
    adc4.soc3Channel        = "ADC_CH_ADCIN3";
    adc4.soc3Trigger        = "ADC_TRIGGER_EPWM2_SOCA";
    adc4.soc3SampleWindow   = 20;
    adc4.interruptPulseMode = "ADC_PULSE_END_OF_CONV";
    adc4.useInterrupts      = false;
    adc4.soc4Channel        = "ADC_CH_ADCIN4";
    adc4.soc4SampleWindow   = 20;
    adc4.soc4Trigger        = "ADC_TRIGGER_EPWM2_SOCA";
    adc4.enabledSOCs        = ["ADC_SOC_NUMBER2","ADC_SOC_NUMBER3"];
    
    cputimer1.$name          = "myCPUTIMER2";
    cputimer1.cputimerBase   = "CPUTIMER2_BASE";
    cputimer1.timerPrescaler = 65535;
    cputimer1.timerPeriod    = 4294967295;
    cputimer1.startTimer     = true;
    
    cputimer2.$name                     = "myCPUTIMER1";
    cputimer2.cputimerBase              = "CPUTIMER1_BASE";
    cputimer2.timerPeriod               = 200000;
    cputimer2.enableInterrupt           = true;
    cputimer2.registerInterrupts        = true;
    cputimer2.startTimer                = true;
    cputimer2.timerInt.enableInterrupt  = true;
    cputimer2.timerInt.interruptHandler = "INT_myCPU2_TIMER1_ISR";
    
    ipc.ipcRegisterFlag          = ["IPC_FLAG31"];
    ipc.flagHandler31            = "SYNC_FLAG";
    ipc.registerInterrupts       = ["1"];
    ipc.ipcInt1.enableInterrupt  = true;
    ipc.ipcInt1.interruptHandler = "IPC_ISR1";
    
    sysctl.enable_SYSCTL_PERIPH_CLK_CLA1      = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_DMA       = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_TBCLKSYNC = true;
    sysctl.enable_SYSCTL_PERIPH_CLK_EPWM1     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_EPWM3     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_EPWM5     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_EPWM4     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_EPWM6     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_EPWM8     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_EPWM7     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_EPWM9     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_EPWM10    = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_EPWM11    = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_EPWM12    = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_ECAP1     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_ECAP2     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_ECAP3     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_ECAP4     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_ECAP5     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_ECAP6     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_EQEP1     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_EQEP2     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_EQEP3     = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_SD1       = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_SD2       = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_SCIA      = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_SCIB      = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_SCIC      = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_SCID      = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_SPIA      = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_SPIB      = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_SPIC      = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_I2CA      = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_I2CB      = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_CANA      = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_CANB      = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_MCBSPA    = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_MCBSPB    = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_CMPSS1    = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_CMPSS2    = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_CMPSS3    = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_CMPSS4    = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_CMPSS5    = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_CMPSS6    = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_CMPSS7    = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_CMPSS8    = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_DACA      = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_DACB      = false;
    sysctl.enable_SYSCTL_PERIPH_CLK_DACC      = false;
    
    Vector1.$name = "myVEC0";

  • Hi, 

    Looks like there are some errors in the SysConfig file . See Snaphot below

    Are you seeing similar errors when you open the SysConfig file?

    Also, are you running a dual core example?

    Best Regards

    Siddharth

  • In my PC, I can't open SysConfig file.

    In colleagues' PC, there are no errors.

    We are running dual core.

  • Hi, 

    That's strange and difficult to narrow down on the cause.

    Can you compare the development environment being used between these two PCs? 

    1. C2000ware version

    2. SysConfig version -  You can check the version used in the project properties

    3. CCS Version

    4. Compiler and compiler options used.

    Also, what happens if you try to compile the project without opening the .syscfg file?  Pls share the console log obtained during the compilation on both these PCs.

    Best Regards

    Siddharth

  • Hi, I checked development environments in our office.

    1. C2000ware version is same. (5.01.00.00)

    2. CCS version is different. (me: 12.7.1.00001, others: 12.6.0.00008)

    3. SysConfig version is different. (me: 1.20.0.3587, others: 1.19.0.3426)

    4. Compiler version is same (TI v22.6.1 LTS)

    We use same project files, so compiler option and build log is basically same. (directory is different)

    I can't open syscfg, but build and debug are running. but if I want to edit syscfg, I can't do it in my pc.

    Should I change my CCS and SysConfig version to same as colleague's?

    Thanks.

  • Hi, 

    Suggest you to have the same SysConfig version and see if it resolves the issue,

    Best Regards

    Siddharth

  • Hi, I installed SysConfig 1.19.0.3426 via https://www.ti.com/tool/download/SYSCONFIG/1.19.0.3426 and result is below.

    But, CCS still applied existing version like below.

    How to change the version? Should I click uninstall here?

    Thanks.

  • Hi, 

    You can select the product version to be used by the project. 

    Right click on the project , click on Properties and select the General Tab . You can select the version in the Products tab as shown below

    Best Regards

    Siddharth

  • Hi, I changed SysConfig version, but the error is still exist.

    This is my c2000ware's dac.js code. Are there some systax errors about '&&' ?

    let Common   = system.getScript("/driverlib/Common.js");
    let Pinmux   = system.getScript("/driverlib/pinmux.js");
    
    let device_driverlib_peripheral = 
        system.getScript("/driverlib/device_driverlib_peripherals/" + 
            Common.getDeviceName().toLowerCase() + "_dac.js");
    
    /* Intro splash on GUI */
    let longDescription = "DAC";
    
    var DAC_INSTANCE = [
        { name: "DACA_BASE", displayName: "DACA"},
        { name: "DACB_BASE", displayName: "DACB"},
        { name: "DACC_BASE", displayName: "DACC"},
    ];
    
    function onChangeDACVref(inst, ui)
    {
        if (["F28004x", "F28003x", "F28P65x"].includes(Common.getDeviceName())){
            if (inst.referenceVoltage == device_driverlib_peripheral.DAC_ReferenceVoltage[0].name){
                ui.gainMode.hidden = true
                
            }
            else {
                ui.gainMode.hidden = false
            }
        }
    }
    
    function onChangeLoadMode(inst, ui)
    {
        if (inst.loadMode == device_driverlib_peripheral.DAC_LoadMode[0].name){
            ui.ePWMSyncSignal.hidden = true
            
        }
        else {
            ui.ePWMSyncSignal.hidden = false
        }   
    }
    
    var dacStatic = undefined;
    
    /* determine ASYSCTL static module dependency */
    if (["F28004x","F28003x", "F28P65x", "F28P55x"].includes(Common.getDeviceName()))
    {
        dacStatic = {
            name: "dacGlobal",
            displayName: "DAC Global",
            modules: Common.autoForce("asysctl", "/driverlib/asysctl.js")
        }
    }
    
    var numberOfDACs = 3;
    
    if (["F28004x", "F28003x"].includes(Common.getDeviceName()))
    {
        DAC_INSTANCE = [
    	    { name: "DACA_BASE", displayName: "DACA"},
    	    { name: "DACB_BASE", displayName: "DACB"},
        ];
        numberOfDACs = 2;
    }
    else if (["F28P65x"].includes(Common.getDeviceName()))
    {
        DAC_INSTANCE = [
            { name: "DACA_BASE", displayName: "DACA"},
            { name: "DACC_BASE", displayName: "DACC"},
        ];
        numberOfDACs = 2;
    }
    else if (["F28P55x"].includes(Common.getDeviceName()))
    {
        DAC_INSTANCE = [
            { name: "DACA_BASE", displayName: "DACA"},
        ];
        numberOfDACs = 1;
    }
    
    /* Array of possible ePWM sync signals */
    var ePWMInstances = Common.peripheralCount("EPWM")
    var ePWMArray = [];
    for(var i = 0; i < ePWMInstances; i++) {
        ePWMArray.push()
        ePWMArray.push({ name: ""+(i+1), displayName: "EPWM"+(i+1)+"SYNCPER"})
    }
    
    /* Array of DAC configurables that are common across device families */
    let config = [
        {
            name        : "dacBase",
            displayName : "DAC Instance",
            description : 'Instance of the DAC used.',
            hidden      : false,
            default     : DAC_INSTANCE[0].name,
            options     : DAC_INSTANCE
        },
        {
            name        : "referenceVoltage",
            displayName : "Reference Voltage",
            description : 'Sets the DAC Reference Voltage',
            hidden      : false,
            onChange    : onChangeDACVref,
            default     : device_driverlib_peripheral.DAC_ReferenceVoltage[0].name,
            options     : device_driverlib_peripheral.DAC_ReferenceVoltage
        },
        {
            name        : "loadMode",
            displayName : "Load Mode",
            description : 'Sets the DAC Load Mode',
            hidden      : false,
            onChange    : onChangeLoadMode,
            default     : device_driverlib_peripheral.DAC_LoadMode[0].name,
            options     : device_driverlib_peripheral.DAC_LoadMode
        },
        {
            name        : "ePWMSyncSignal",
            displayName : "EPWMSYNCPER Signal",
            description : 'Sets the DAC ePWMSYNC Signal',
            hidden      : true,
            default     : ePWMArray[0].name,
            options     : ePWMArray
        },
        {
            name        : "shadowValue",
            displayName : "Shadow Value",
            description : 'Set the DAC Shadow Output Value.',
            hidden      : false,
            default     : 0
        },
        {
            name        : "enableOutput",
            displayName : "Enable Output",
            description : 'Whether or not to enable the DAC output.',
            hidden      : false,
            default     : false,
        },
        {
            name        : "lockedRegisters",
            displayName : "Lock DAC Registers",
            description : 'Which DAC Registers to enable.',
            hidden      : false,
            default     : [],
            minSelections: 0,
            options     : [
                {name: "DAC_LOCK_CONTROL", displayName: "Control Register"},
                {name: "DAC_LOCK_SHADOW", displayName: "Shadow Register"},
                {name: "DAC_LOCK_OUTPUT", displayName: "Output Register"},
            ],
            
        },
    ];
    
    if (!["F2837xD", "F2807x", "F2837xS"].includes(Common.getDeviceName()))
    {
        var defaultDacName = "DACA";
        defaultDacName = Pinmux.getDeviceDACName(defaultDacName)
        config.push(
            {
                name        : "dacDevicePinName",
                displayName : "DAC Device Pin Name",
                description : 'The device pin name and the signal name for that pin',
                hidden      : false,
                getValue    : (inst) => {
                    var dacOutName = Pinmux.getDeviceDACName(inst.dacBase.replace("_BASE", ""))
                    var dacAnalogPins = Pinmux.findAllAnalogPin(dacOutName);
                    return Pinmux.getDevicePinInfoDescription(dacAnalogPins);
                },
                default     : Pinmux.getDevicePinInfoDescription(defaultDacName)
            }
        )
    }
    
    /* Only show Gain options depending on device */
    if (["F28004x", "F28003x", "F28P65x"].includes(Common.getDeviceName()))
    {
        config.splice(2, 0, 
            {
                name        : "gainMode",
                displayName : "Gain Mode",
                description : 'Sets the DAC Gain Mode',
                hidden      : true,
                default     : device_driverlib_peripheral.DAC_GainMode[0].name,
                options     : device_driverlib_peripheral.DAC_GainMode
            }
        );
    }
    if (["F28P55x"].includes(Common.getDeviceName()))
    {
        config.splice(2, 0, 
            {
                name        : "gainMode",
                displayName : "Gain Mode",
                description : 'Sets the DAC Gain Mode',
                hidden      : false,
                default     : device_driverlib_peripheral.DAC_GainMode[0].name,
                options     : device_driverlib_peripheral.DAC_GainMode
            }
        );
    }
    
    function onValidate(inst, validation) {
    
        //
        // Check Multicontext
        //
        if (Common.isContextCPU2()) {
            if (Common.isMultiCoreSysConfig()) {
                //
                // Check if the analog module is added on CPU1 if the current context is CPU2
                //
                if (Common.isModuleOnOtherContext("/driverlib/analog.js") == false) && !["F2838x", "F2837xD"].includes(Common.getDeviceName())) {
                    validation.logError(
                        "The ANALOG PinMux module needs to be added on CPU1 when a DAC instance is added on CPU2",inst,"dacBase");
                }
            } 
            else {
                validation.logWarning(
                    "The ANALOG PinMux module needs to be added on CPU1 when a DAC instance is added on CPU2",inst,"dacBase");
            } 
        }
    
        var usedDACInsts = [];
        for (var instance_index in inst.$module.$instances)
        {
            var instance_obj = inst.$module.$instances[instance_index];
            usedDACInsts.push(instance_obj.dacBase);
        }
    
        var otherContexts = Common.getOtherContextNames()
        for (var cntx of otherContexts)
        {
            var onOtherCntx = Common.getModuleForCore(inst.$module.$name, cntx);
            if (onOtherCntx)
            {
                for (var instance_index in onOtherCntx.$instances)
                {
                    var instance_obj = onOtherCntx.$instances[instance_index];
                    usedDACInsts.push(instance_obj.dacBase);
                }
            }
        }
    
        var duplicatesResult = Common.findDuplicates(usedDACInsts)
    
        if (duplicatesResult.duplicates.length != 0)
        {
            var allDuplicates = "";
            for (var duplicateNamesIndex in duplicatesResult.duplicates)
            {
                allDuplicates = allDuplicates + Common.stringOrEmpty(allDuplicates, ", ") 
                                + duplicatesResult.duplicates[duplicateNamesIndex];
            }
            validation.logError(
                "The DAC Instance used. Duplicates: " + allDuplicates, 
                inst, "dacBase");
        }
    
        if (inst.shadowValue < 0 || inst.shadowValue > 4095)
        {
            validation.logError(
                "Enter an integer for Shadow Value between 0 and 4095!", 
                inst, "shadowValue");
        }
        if (!Number.isInteger(inst.shadowValue))
        {
            validation.logError(
                "Shadow Value must be an integer", 
                inst, "shadowValue");
        }
        var asysctlMod = system.modules['/driverlib/asysctl.js'];
        if (asysctlMod){
            var stat = asysctlMod.$static
            //validation.logError("An example error in gainMode", inst, "gainMode");
            if(["F2838x","F28003x","F28004x","F2807x","F2837xS", "F2837xD","F28P65x"].includes(Common.getDeviceName())){
                if(inst.referenceVoltage == "DAC_REF_VDAC" && inst.gainMode == "DAC_GAIN_TWO"){
                    validation.logError(
                        "Selected gain mode not supported for configured reference voltage.",
                        inst, "gainMode");
                    validation.logError(
                        "Selected reference voltage not supported for configured gain mode.",
                        inst, "referenceVoltage");
                } // the case of VDAC, no gain mode select! the case of [vdac,   x,        x,    gain 2x]
            }
            if(inst.referenceVoltage == "DAC_REF_ADC_VREFHI" && stat.analogReference == "INTERNAL" 
                    && stat.analogReferenceVoltage == "1P65" && inst.gainMode == "DAC_GAIN_ONE"){
                validation.logError(
                    "Selected gain mode not supported for configured analog reference voltage.", 
                    inst, "gainMode");
                validation.logError(
                    "Selected analog reference voltage not supported for configured gain mode.", 
                    stat, "analogReferenceVoltage");
            } // the case of [vrefhi, internal, 1.65, gain 1x]
            if(inst.referenceVoltage == "DAC_REF_ADC_VREFHI" && stat.analogReference == "INTERNAL"
                    && stat.analogReferenceVoltage == "2P5" && inst.gainMode == "DAC_GAIN_TWO"){
                validation.logError(
                    "Selected gain mode not supported for configured analog reference voltage.", 
                    inst, "gainMode");
                validation.logError(
                    "Selected analog reference voltage not supported for configured gain mode.", 
                    stat, "analogReferenceVoltage");               
            } // the case of [vrefhi, internal, 2.5,  gain 2x]
            if(inst.referenceVoltage == "DAC_REF_ADC_VREFHI" && stat.analogReference == "EXTERNAL" && inst.gainMode == "DAC_GAIN_TWO"){
                validation.logError(
                    "Selected gain mode not supported for configured analog reference.", 
                    inst, "gainMode");
                validation.logError(
                    "Selected analog reference not supported for configured gain mode.", 
                    stat, "analogReference");
            } // the case of [vrefhi, external, x,    gain 2x]
        }
    
    
        //
        // Check for Pin Usage in analog
        //
        if (Common.isContextCPU1()) {
            if (Common.peripheralCount("ANALOG") > 0)
            {
                if(inst.enableOutput){
                    var devicePinNameInfo = inst["dacDevicePinName"]
                    if (devicePinNameInfo == Pinmux.NO_DEVICE_PIN_FOUND)
                    {
                        validation.logWarning(
                            "DAC output selected has no device pin found.",
                            inst, "dacDevicePinName");
                    }
                    else
                    {
                        var dacOutName = Pinmux.getDeviceDACName(inst.dacBase.replace("_BASE", ""))
                        var dacAnalogPins = Pinmux.findAllAnalogPin(dacOutName);
                        var selectedInterfaces = Pinmux.getPeripheralUseCaseInterfaces(inst.analog, "ANALOG", inst.analog.useCase);
                        var allInterfaces = Pinmux.getPeripheralUseCaseInterfaces(inst.analog, "ANALOG", "ALL");
    
    
                        for (var dacPin of dacAnalogPins)
                        {
                            var pinSelected = dacPin.PinDesignSignalName;
                            if (!selectedInterfaces.includes(pinSelected) && allInterfaces.includes(pinSelected))
                            {
                                validation.logError(
                                    "The pin " + pinSelected + " is not selected in the ANALOG PinMux module." +
                                    " Add this pin to the 'Pins Used' or change the 'Use Case'",
                                    inst,"dacDevicePinName");
                            }
    
                        }
    
                    }
                }
            }
        }
    
        //
        // Check against ADC and CMPSS
        // Not available on F28X7x
        //
        if (inst["dacDevicePinName"])
        {
            if(inst.enableOutput){
                var devicePinNameInfo = inst["dacDevicePinName"]
                if (devicePinNameInfo != Pinmux.NO_DEVICE_PIN_FOUND)
                {
                    var dacOutName = Pinmux.getDeviceDACName(inst.dacBase.replace("_BASE", ""))
                    var dacAnalogPins = Pinmux.findAllAnalogPin(dacOutName);
                    var adcPinsUsed = Pinmux.getADCPinsUsed();
                    var cmpssPinsUsed = Pinmux.getCMPSSPinsUsed();
    				var cmpssLitePinsUsed = Pinmux.getCMPSSLitePinsUsed();
    
                    for (var dacPin of dacAnalogPins)
                    {
                        var pinSelected = dacPin.PinDesignSignalName;
                        if (adcPinsUsed.includes(pinSelected))
                        {
                            validation.logWarning(
                                "The pin " + pinSelected + " is also selected by the ADC module." +
                                " The DAC output will be driving the ADC pin input. This is an acceptable " + 
                                "use-case.",
                                inst, "dacDevicePinName");
                        }
    
                        if (cmpssPinsUsed.includes(pinSelected))
                        {
                            validation.logWarning(
                                "The pin " + pinSelected + " is also selected by the CMPSS module." +
                                " The DAC output will be driving the CMPSS pin input. This is an acceptable " + 
                                "use-case.",
                                inst, "dacDevicePinName");
                        }
    					if (cmpssLitePinsUsed.includes(pinSelected))
                        {
                            validation.logWarning(
                                "The pin " + pinSelected + " is also selected by the CMPSSLite module." +
                                " The DAC output will be driving the CMPSSLite pin input. This is an acceptable " + 
                                "use-case.",
                                inst, "dacDevicePinName");
                        }
                    }
                }
            }
        }
    }
    
    
    var sharedModuleInstances = undefined;
    if (Common.isContextCPU1()) {
        if (Common.peripheralCount("ANALOG") > 0) {
            sharedModuleInstances = function () {
                    return (
                        [
                            {
                                name: "analog",
                                displayName: "Analog PinMux",
                                moduleName: "/driverlib/analog.js"
                            },
                        ]
                    );
                }
        }
    }
    
    var dacModule = {
        peripheralName: "DAC",
        displayName: "DAC",
        maxInstances: numberOfDACs,
        defaultInstanceName: "myDAC",
        description: "Digital Analog Converter",
        longDescription: (Common.getCollateralFindabilityList("DAC")),
        config: config,
        moduleStatic: dacStatic,
        sharedModuleInstances: sharedModuleInstances,
        templates: {
            boardc : "/driverlib/dac/dac.board.c.xdt",
            boardh : "/driverlib/dac/dac.board.h.xdt"
        },
        validate    : onValidate,
    };
    
    exports = dacModule;

  • Pls try using the latest dac.js file from C2000Ware v5.03 

     I have attached it here , you can replace this in the folder <C2000WareInstallDir>\driverlib\.meta

    /cfs-file/__key/communityserver-discussions-components-files/171/dac.js

    Best Regards

    Siddharth

  • Hi, finally the error is solved!

    Now I can open syscfg in my PC.

    Thank you very much for your help.