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.

[参考译文] AM2634:Mcu_Get form452.RawResetReason 实现不正确、MCAL 版本09.00.00

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1395036/am2634-mcu_getplatformrawresetreason-implementation-is-not-correct-mcal-version-09-00-00

器件型号:AM2634

工具与软件:

您好!  

Mcu_Get 042formRawResetReasonImplementation 不正确、请在下面找到所附代码片段:
Mcu_RawResetType Mcu_GetPlatformRawResetReason(void)
{
    VAR(Mcu_RawResetType, MCU_VAR) rawResetReason = 0U;
    
    Mcu_controlModuleUnlockMMR(0, MCU_TOP_RCM_PARTITION0);
    /* Get reset reason, stored in WARM_RST_CAUSE by startup code */
    rawResetReason = (Mcu_RawResetType)toprcmREG->WARM_RST_CAUSE;
    
    HW_SET_FIELD32(toprcmREG->WARM_RST_CAUSE_CLR, TOP_RCM_WARM_RST_CAUSE_CLR_CLEAR, 0x7);

    Mcu_controlModuleLockMMR(0, MCU_TOP_RCM_PARTITION0);

    return rawResetReason;
}


_sysResetCauseHandler_

        ; Obtain the reset cause by reading the system reset cause register
        ldr     r6, SYS_RST_CAUSE
        ldr     r6, [r6]
        ; Check if reset cause has been cleared, skip if so
        cmp     r6, #0

        beq EXIT_RST_HNDL
            ; Store the reset cause in SPARE REG RW0
            ldr     r5, TOPRCM_SPARE_RW0
            ; Store the reset cause value
            str     r6, [r5]

            ; Clear the System reset cause
            ldr     r5, SYS_RST_CAUSE_CLR
            mov     r4, #0x7U
            str     r4, [r5]


启动代码会清除复位原因并将其存储在硬件备用寄存器中、但 MCAL API 会读取复位原因寄存器。

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

    您好!

    对于延迟响应、我们深表歉意。 此问题已在09.01.00 MCAL 版本中修复。

    谢谢、此致、
    Gunjan