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.

AM62A7: SysConfig Global MCAN settings wrong number conversion

Part Number: AM62A7
Other Parts Discussed in Thread: SYSCONFIG

Hi,

in the SysConfig tool the values for the global settings are wrong converted in the generated code. (discrepancy between decimal and hex)

  • Hi Alexander,

    Thank you for your query.

    I have taken your inputs. Please allow some time to revert back.

    Regards,

    Tushar

  • Hi Alexander,

    Apologies for the delayed response.

    The mcan config template file didn't contain the code to convert the decimal value to hex value. Please update the mcan_config.c.xdt file with the below code. 

    %%{
        let module = system.modules['/drivers/mcan/mcan'];
    %%}
    /*
     * MCAN
     */
    /* MCASP Default Bit timing Parameters */
    MCAN_BitTimingParams gMcanBitTimingDefaultParams =
    {
        .nomRatePrescalar   = 0x`module.$static.nomRatePrescalar.toString(16).toUpperCase()`U,
        .nomTimeSeg1        = 0x`module.$static.nomTimeSeg1.toString(16).toUpperCase()`U,
        .nomTimeSeg2        = 0x`module.$static.nomTimeSeg2.toString(16).toUpperCase()`U,
        .nomSynchJumpWidth  = 0x`module.$static.nomSynchJumpWidth.toString(16).toUpperCase()`U,
        .dataRatePrescalar  = 0x`module.$static.dataRatePrescalar.toString(16).toUpperCase()`U,
        .dataTimeSeg1       = 0x`module.$static.dataTimeSeg1.toString(16).toUpperCase()`U,
        .dataTimeSeg2       = 0x`module.$static.dataTimeSeg2.toString(16).toUpperCase()`U,
        .dataSynchJumpWidth = 0x`module.$static.dataSynchJumpWidth.toString(16).toUpperCase()`U,
    };
    

    The mcan_config.c.xdt file is located at path {MCU+SDK}/source/drivers/.meta/mcan/templates. After updating the file restart the sysconfig tool and it will work fine. Please let me know if this solution works for you.

    Thanks & Regards,

    Tushar