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.

[参考译文] MSPM0G3518:MCAN 配置函数查询

Guru**** 2511985 points
Other Parts Discussed in Thread: SYSCONFIG

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1554373/mspm0g3518-mcan-config-function-inquiry

器件型号:MSPM0G3518
主题:SysConfig 中讨论的其他器件

工具/软件:

尊敬的专家:

我们找到了此函数:DL_MCAN_CONFIG (MCAN0_INST、(DL_MCAN_ConfigParams*)&gMCANOConfigParams);之前在 SDK 演示中使用(第 1 张)、但未显示 在 SysConfig 中(第 2 张)。 此功能的详细作用是什么? 看起来像是一个参数配置函数、它配置了什么参数?

Joyce

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、

    它用于配置以下参数:

    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;

    您可以在 SDK 的 dl_mcan.c 文件中了解它是如何实现的。

    马修