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.

[参考译文] LP-MSPM0G3507:默认示例 SINGLE_TX 工程的 CANTx 引脚上看不到任何内容

Guru**** 2534260 points
Other Parts Discussed in Thread: SN65HVD230, MSPM0G3507, LP-MSPM0G3507, SYSCONFIG

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1557197/lp-mspm0g3507-i-cant-see-nothing-on-cantx-pin-with-default-example-single_tx-project

器件型号:LP-MSPM0G3507
Thread 中讨论的其他器件:MSPM0G3507、SN65HVD230、 SYSCONFIG

工具/软件:

您好、  

我正在使用 LP-MSPM0G3507 开发套件。 然后创建一个新的示例工程 名称 mcan_single_message_tx_LP_MSPM0G3507_nortos_gss。  

此工程基本上在每个 while 循环中编写 CAN 消息。 我进行了调试、看到代码在 while 循环中运行、因此我认为应该是发送消息。

之后,我决定使用 osiloscope。 我连接了 PA12 MCAN0 Tx 引脚、我看到了这一引脚;

我还使用 SN65HVD230 CAN 总线收发器。 有 CANH meas;

这是我当前使用的代码。 我关闭了 FD 模式。  

#include "ti_msp_dl_config.h"

int main(void)
{
    DL_MCAN_TxBufElement txMsg;

    SYSCFG_DL_init();

    txMsg.id  = ((uint32_t)(0x4)) << 18U;
    txMsg.rtr = 0U;
    txMsg.xtd = 0U;
    txMsg.esi = 0U;
    txMsg.dlc = 1U;
    txMsg.brs = 0U;
    txMsg.fdf = 0U;
    txMsg.efc = 1U;
    txMsg.mm  = 0xAAU;
    txMsg.data[0] = LED_STATUS_ON;

    while (DL_MCAN_OPERATION_MODE_NORMAL != DL_MCAN_getOpMode(MCAN0_INST));

    while (1) {
        DL_MCAN_writeMsgRam(MCAN0_INST, DL_MCAN_MEM_TYPE_BUF, 0U, &txMsg);
        DL_MCAN_TXBufAddReq(MCAN0_INST, 0U);

        for (volatile int i = 0; i < 100000; i++); // gecikme döngüsü
    }
}

如果有人能帮助我会很高兴。  

此致。  

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

    您好、

    我这边的代码看起来是正确的。   

    您可以在 SysConfig 中共享 MCAN 配置。 我们可以检查配置是否看起来正确。

    此致、

    现金好