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.

TMS320F28P650DK: Sys Config Issue where configuring LIN in SCI mode fails

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

Tool/software:

If I configure the LIN peripheral via SYSConfig(1.24.0) in LIN mode, it works fine, however, when I try to configure the LIN peripheral in UART(SCI Mode). I get an error telling me it cannot read properties of undefined (reading 'peripheralName')

  • Error is with C2000Ware_v5_05_00_00\driverlib\.meta\lin.js

    Current working solution was to replace code on line 842. Changed code from:

    linCLK = parseInt(parseFloat((clocktree[inst.lin.$solution.peripheralName + "CLK"].in) * 1000000))
    

    To:

    linCLK = parseInt(parseFloat((clocktree["LINBCLK"].in) * 1000000))

    Error has gone away and code compiles.

    However, now when setting LINA baud rate the LINACLK seems to always be 100MHz regardless of the LINACLKDIV setting in the clock tree gui.

  • Hi Daniel, 

    Let me loop the LIN experts for better feedback.

    Thanks

    Aswin

  • Hi Daniel,

    I have configured LIN in SCI mode with the same version of C2000Ware and SysConfig, and I am unable to recreate the error you are facing. Can you attach your .syscfg file so I can check with the same?

    The change you have made hardcodes all LIN instances to pick the LINB clock, so it will be incorrect.

    Regards,

    Arnav

  • Thanks Arnav,

    I have attached the code from a .syscfg file from an empty driverlib example project that is showing the same error. 

    /**
     * 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 "F28P65x" --part "F28P65x_169NMR" --package "169NMR" --context "CPU1" --product "C2000WARE@5.05.00.00"
     * @v2CliArgs --device "TMS320F28P650DK" --package "169NMR" --variant "TMS320F28P650DK9" --context "CPU1" --product "C2000WARE@5.05.00.00"
     * @versions {"tool":"1.24.0+4110"}
     */
    
    /**
     * Import the modules used in this configuration.
     */
    const lin  = scripting.addModule("/driverlib/lin.js", {}, false);
    const lin1 = lin.addInstance();
    
    /**
     * Write custom configuration values to the imported modules.
     */
    const divider8       = system.clockTree["EPWMCLKDIV"];
    divider8.divideValue = 1;
    
    const divider9       = system.clockTree["LINACLKDIV"];
    divider9.divideValue = 2;
    
    lin1.$name                 = "myLIN0";
    lin1.opMode                = "SCI";
    lin1.enableMultibuffer     = false;
    lin1.lin.$assign           = "LINA";
    lin1.lin.lin_rxPin.$assign = "GPIO15";
    lin1.lin.lin_txPin.$assign = "GPIO14";
    lin1.rxQual.$name          = "myGPIOQUAL0";
    lin1.txQual.$name          = "myGPIOQUAL1";
    

  • Hi Daniel,

    Thank you for the .syscfg file. This stems from a minor bug in the SysConfig metadata. Please find attached the updated metadata files below. You can paste the /driverlib folder directly into your C2000Ware root directory and select "Replace All files" when prompted.

    C2000Ware_update.zip

    This will be fixed in an upcoming release of C2000Ware.

     Regards,

    Arnav

  • Hey Arnav,

    This has resolved the issue. Thank you for looking into it.

    Cheers,

    Daniel