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.

[参考译文] CC1310:上电复位检测

Guru**** 2484615 points


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

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/1187519/cc1310-detection-of-power-on-reset

器件型号:CC1310

你(们)好。  

我想使用以下函数检测上电复位事件:

SysCtrlResetSourceGet ()

文档指出它返回32位值:

返回值为:

//! -\ref RSTSRC_PWR_ON
//! -\ref RSTSRC_PIN_RESET
//! -\ref RSTSRC_VDDS_LOSS
//! -\ref RSTSRC_VDDR_LOSS
//! -\ref RSTSRC_CLK_LOSS
//! -\ref RSTSRC_SYSRESET
//! -\ref RSTSRC_WARMRESET
//! -\ref RSTSRC_WAKEUP_FROW_SHUTDOWN

我看 了 RSTSRC_PWR_ON。 但实施是一种胡言之语:

#define RSTSRC_PWR_ON          (((AON_SYSCTL_RESETCTL_RESET_SRC_PWR_ON  )>>(AON_SYSCTL_RESETCTL_RESET_SRC_S))

AON_SYSCTL_RESETCTL_RESET_RESET_SRC_PWR_ON   为0

AON_SYSCTL_RESETCTL_RESET_SRC_S 为1

因此它向右移动0 1位。 此事件在这种情况下从未返回。 我弄错了吗?

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

    我认为可能有多种复位原因、但情况并非如此。 例如、设置了 POR 和 VDDS_LOSS。 因此、用法是:

    switch (SysCtrlResetSourceGet())
        {
            case RSTSRC_PWR_ON:
            {
                return OT_PLAT_RESET_REASON_POWER_ON;
            }
    
            case RSTSRC_PIN_RESET:
            ...

    resetTracker _isPowerLossGet