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.

[参考译文] MSPM0L1306:如何测试 NRST 触发的 BOOTRST (<1s 保持)?

Guru**** 2393085 points
Other Parts Discussed in Thread: MSPM0L1306

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1447571/mspm0l1306-how-to-test-nrst-triggered-bootrst-1s-hold

器件型号:MSPM0L1306

工具与软件:

您好!

我正在使用 MSPM0L1306 MCU、并且正在尝试测试 NRST 触发的 BOOTRST。

我在 RSTCAUSE 寄存器中看不到0x0C 值。  

如何测试此场景?  

如何生成低于条件?

NRST (低电平<1s)

请帮助生成  NRST 触发的 BOOTRST 复位。

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

    尊敬的 Sourabh:

    我对延迟答复表示歉意。 您是否在使用 Code Composer Studio?如果是、哪个版本?

    假设您在使用 CCS、则可以启动调试会话、使您能够在目标运行时进行连接。  请参阅随附的 PDF 文件、其中说明了步骤。  连接到目标后、执行复位(NRST 至 GND)并查看 RSTCAUSE 寄存器。  我看到0x0C。

    如果不使用 CCS、请告诉我。


    e2e.ti.com/.../how-to-connect-to-target.pdf

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

    尊敬的 Dennis:  

    我正在使用 Keil IDE、是否有办法 在 Keil IDE 中生成 BOOTRST?

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

    尊敬的 Sourabh:

    我对 Keil IDE 没有什么经验、所以我会请团队的其他成员了解哪些人最有经验。 BTW、您是在 MSPM0L1306 Launchpad 还是在您自己的 PCB 上执行该操作?  如果不是 Launchpad、您在使用哪个调试工具?

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

    尊敬的 Dennis:  

    不是 Launchpad、是定制电路板。 我将使用 J-Link 调试器、

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

    尊敬的 Sourabh:

    好的、正如您从下面的示例中所看到的、这非常简单。  一个 driverlib 函数返回复位原因。  我在代码中设置了一个断点(__BKPT (0))、但对于您的应用程序、您可能会根据返回值执行各种代码。

    int main(void)
    {
        uint32_t cause;
        cause = DL_SYSCTL_getResetCause();
        __BKPT(0);
    
          SYSCFG_DL_init();
    
         while (1) {
           __WFI();
        }
    }
    
    #if 0
    //from hw_sysctl_mspm0l11xx_l13xx.h
    /* SYSCTL_RSTCAUSE Bits */
    /* SYSCTL_RSTCAUSE[ID] Bits */
    #define SYSCTL_RSTCAUSE_ID_OFS                   (0)                             /* !< ID Offset */
    #define SYSCTL_RSTCAUSE_ID_MASK                  ((uint32_t)0x0000001FU)         /* !< ID is a read-to-clear field which
                                                                                        indicates the lowest level reset
                                                                                        cause since the last read. */
    #define SYSCTL_RSTCAUSE_ID_NORST                 ((uint32_t)0x00000000U)         /* !< No reset since last read */
    #define SYSCTL_RSTCAUSE_ID_PORHWFAIL             ((uint32_t)0x00000001U)         /* !< POR- violation, SHUTDNSTOREx or PMU
                                                                                        trim parity fault */
    #define SYSCTL_RSTCAUSE_ID_POREXNRST             ((uint32_t)0x00000002U)         /* !< NRST triggered POR (>1s hold) */
    #define SYSCTL_RSTCAUSE_ID_PORSW                 ((uint32_t)0x00000003U)         /* !< Software triggered POR */
    #define SYSCTL_RSTCAUSE_ID_BORSUPPLY             ((uint32_t)0x00000004U)         /* !< BOR0- violation */
    #define SYSCTL_RSTCAUSE_ID_BORWAKESHUTDN         ((uint32_t)0x00000005U)         /* !< SHUTDOWN mode exit */
    #define SYSCTL_RSTCAUSE_ID_BOOTNONPMUPARITY      ((uint32_t)0x00000008U)         /* !< Non-PMU trim parity fault */
    #define SYSCTL_RSTCAUSE_ID_BOOTCLKFAIL           ((uint32_t)0x00000009U)         /* !< Fatal clock failure */
    #define SYSCTL_RSTCAUSE_ID_BOOTEXNRST            ((uint32_t)0x0000000CU)         /* !< NRST triggered BOOTRST (<1s
                                                                                        hold) */
    #define SYSCTL_RSTCAUSE_ID_BOOTSW                ((uint32_t)0x0000000DU)         /* !< Software triggered BOOTRST */
    #define SYSCTL_RSTCAUSE_ID_SYSWWDT0              ((uint32_t)0x0000000EU)         /* !< WWDT0 violation */
    #define SYSCTL_RSTCAUSE_ID_SYSBSLEXIT            ((uint32_t)0x00000010U)         /* !< BSL exit */
    #define SYSCTL_RSTCAUSE_ID_SYSBSLENTRY           ((uint32_t)0x00000011U)         /* !< BSL entry */
    #define SYSCTL_RSTCAUSE_ID_SYSWWDT1              ((uint32_t)0x00000013U)         /* !< WWDT1 violation */
    #define SYSCTL_RSTCAUSE_ID_SYSFLASHECC           ((uint32_t)0x00000014U)         /* !< Flash uncorrectable ECC error */
    #define SYSCTL_RSTCAUSE_ID_SYSCPULOCK            ((uint32_t)0x00000015U)         /* !< CPULOCK violation */
    #define SYSCTL_RSTCAUSE_ID_SYSDBG                ((uint32_t)0x0000001AU)         /* !< Debug triggered SYSRST */
    #define SYSCTL_RSTCAUSE_ID_SYSSW                 ((uint32_t)0x0000001BU)         /* !< Software triggered SYSRST */
    #define SYSCTL_RSTCAUSE_ID_CPUDBG                ((uint32_t)0x0000001CU)         /* !< Debug triggered CPURST */
    #define SYSCTL_RSTCAUSE_ID_CPUSW                 ((uint32_t)0x0000001DU)         /* !< Software triggered CPURST */
    
    // For reference, here is driverlib function to see how it is implemented
    /**
     *  @brief  Return byte that is stored in RSTCAUSE.
     *
     *  @return The cause of reset. One of @ref DL_SYSCTL_RESET_CAUSE
     */
    
    __STATIC_INLINE DL_SYSCTL_RESET_CAUSE DL_SYSCTL_getResetCause(void)
    {
        uint32_t resetCause = SYSCTL->SOCLOCK.RSTCAUSE & SYSCTL_RSTCAUSE_ID_MASK;
    
        return (DL_SYSCTL_RESET_CAUSE)(resetCause);
    }
    #endif

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

    尊敬的 Dennis:

    我尝试了您在 PDF 中提到的顺序。 但我 从 RSTCAUSE 寄存器中获得 SYSSW。 一旦我将 NRST 连接至 GND、它就会从调试模式中退出  

    我正在使用中

    IDE - CCS

    调试器- JLINK

    器件- MSPM0L1306 (定制电路板)。