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.

[参考译文] MSPM0G3519-Q1:3519 的正确时钟停止过程

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1623695/mspm0g3519-q1-proper-clock-stop-procedure-for-3519

器件型号: MSPM0G3519-Q1

您好:

我最近发现的 3519 的正确钟表程序如下:

                     DL_MCAN_txBufCancellationReq(MCAN0_INST, 0);
                    do {
                        cancellation_status = DL_MCAN_txBufCancellationStatus(MCAN0_INST);
                    }while((cancellation_status & 0x1) == 0);
                    DL_MCAN_setOpMode(MCAN0_INST, DL_MCAN_OPERATION_MODE_SW_INIT);
                    DL_MCAN_addClockStopRequest(MCAN0_INST, true);//CSR
                    while (DL_MCAN_OPERATION_MODE_SW_INIT != DL_MCAN_getOpMode(MCAN0_INST));//INIT must be set to '1' by h/w

                    DL_MCAN_enableClockStopGateRequest(MCAN0_INST);//STOPREQ
                    while (DL_MCAN_isClockStopGateRequestEnabled(MCAN0_INST) == false);//STOPREQ
                    do {
                    {
                       ackstatus = DL_MCAN_getClockStopAcknowledgeStatus(MCAN0_INST); //ACKSTS
                    }
                    }while (ackstatus == false);

                    DL_MCAN_disableModuleClock(MCAN0_INST);

这一个主要工作,但不幸的是不是 100%可靠,请建议.

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

    尊敬的 Mykhaylo:

    请参阅 TRM、我认为只 需要为时钟停止功能设置 MCAN_CCCR.CSR 或 MCANSS_CLKCTL.STOPREQ 中的一个。  

    我想您可以尝试删除  MCANSS_CLKCTL.STOPREQ 和 INIT 的代码、只需尝试设置 MCAN_CCCR.CSR (通过)、 DL_MCAN_addClockStopRequest然后检查 MCAN_CCCR.CSA(通过 DL_MCAN_getClkStopAck)以等待时钟停止完成。  

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

    嗨、Pengfei、感谢您的答复、

    我尝试过 — 没有帮助。 让我感到困惑的是、您建议删除 INIT 部分、这意味着将 MCAN 保持在“正常“运行模式。 是不是很奇怪? 您的同事 证实了 这一点、并建议切换到 init。
    实际帮助的是在 MCAN 初始化开始时添加已忘记的 MCAN 复位。