MSPM0G3518: MCAN Config Function Inquiry

Part Number: MSPM0G3518
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi expert,

We found this function: DL_MCAN_config(MCAN0_INST,(DL_MCAN_ConfigParams*)&gMCANOConfigParams); was used in the SDK demo (1st picture) but didn't appear at Sysconfig (2nd picture). What does this function do in detail? Seems like a parameter configuration function, what parameters it configures?

Joyce

  • Hi,

    It is designed to configure the following parameters:

    typedef struct {
        /*! Bus Monitoring Mode
         *   0 = Bus Monitoring Mode is disabled
         *   1 = Bus Monitoring Mode is enabled
         */
        uint32_t monEnable;
        /*! Restricted Operation Mode
         *   0 = Normal CAN operation
         *   1 = Restricted Operation Mode active
         *   This mode should not be combined with test modes.
         */
        uint32_t asmEnable;
        /*! Timestamp Counter Prescaler.
         *   Range:[0x0-0xF]
         */
        uint32_t tsPrescalar;
        /*! Timestamp source selection.
         *   00= Timestamp counter value always 0x0000
         *   01= Timestamp counter value incremented according to tsPrescalar
         *   10= External timestamp counter value used
         *   11= Same as 0b00
         */
        uint32_t tsSelect;
        /*! Time-out counter source select.
         *   One of @ref DL_MCAN_TIMEOUT_SELECT.
         */
        uint32_t timeoutSelect;
        /*! Start value of the Timeout Counter (down-counter).
         *   The Timeout Counter is decremented in multiples of CAN bit times [1-16]
         *   depending on the configuration of the tsPrescalar.
         *   Range:[0x0-0xFFFF]
         */
        uint32_t timeoutPreload;
        /*! Time-out Counter Enable
         *   0 = Time-out Counter is disabled
         *   1 = Time-out Counter is enabled
         */
        uint32_t timeoutCntEnable;
        /*! Global Filter Configuration parameters.
         *    @ref DL_MCAN_GlobalFiltConfig.
         */
        DL_MCAN_GlobalFiltConfig filterConfig;
    } DL_MCAN_ConfigParams;

    You can see how it's implemented in the dl_mcan.c file within the SDK.

    -Matthew