AURIX TC3xx Application Reset与System Reset差异技术说明

文章目录

  • [AURIX TC3xx Application Reset 与 System Reset 差异技术说明](#AURIX TC3xx Application Reset 与 System Reset 差异技术说明)
    • [1. 概述](#1. 概述)
    • [2. AURIX 复位层次](#2. AURIX 复位层次)
      • [图 2:复位层次示意](#图 2:复位层次示意)
      • [图 1:复位范围对比](#图 1:复位范围对比)
    • [3. 硬件机制:三个关键寄存器](#3. 硬件机制:三个关键寄存器)
      • [3.1 `SCU_RSTCON` 位域](#3.1 SCU_RSTCON 位域)
      • [3.2 `SCU_RSTSTAT` 常见触发源](#3.2 SCU_RSTSTAT 常见触发源)
      • [图 3:三寄存器协作](#图 3:三寄存器协作)
    • [4. 核心差异对照表](#4. 核心差异对照表)
      • [4.1 硬件行为](#4.1 硬件行为)
      • [4.2 复位后的寄存器差异](#4.2 复位后的寄存器差异)
    • [5. 总结](#5. 总结)

AURIX TC3xx Application Reset 与 System Reset 差异技术说明

1. 概述

在 AURIX TC3xx 中,Application Reset(应用复位)System Reset(系统复位) 是 SCU 管理的两种不同深度的复位动作。它们不是两个独立的硬件按钮,而是由:

  1. 复位源(谁触发:SW / SMU / ESR / STM / PORST ...)
  2. 复位类型配置SCU_RSTCON 中该源对应的 2 bit)

共同决定的。

概念 含义
复位源 触发事件,记录在 SCU_RSTSTAT(如 SW=1 表示软件复位)
复位类型 实际执行的复位深度,由 SCU_RSTCON 中对应域配置

常见误区 :看到 RSTSTAT.SW=1 就认为是 Application Reset。

正确理解SW=1 只说明「上次是软件触发的」;究竟是 Application 还是 System Reset,要看 RSTCON.SW[9:8] 在触发时刻的配置,SW9:8为1时为System Reset,为2时为Application Reset。


2. AURIX 复位层次

TC3xx 复位由浅到深大致分为:

层次 名称 典型触发 复位深度
最浅 Application Reset UDS 1101、Mcu_PerformReset(SW=10) CPU + 大部分外设重启;部分 SCU/内存状态可保留
中等 System Reset 看门狗/SMU 超时(SMU=01)、错误配置的 SW 复位 比 Application 更深;RSTCON 等回到默认
较深 Warm PORST 外部 PORST 引脚(非冷启动组合) 电源相关复位
最深 Cold PORST 上电 / 冷启动组合 最彻底;LBIST、Standby 等路径相关

图 2:复位层次示意

#mermaid-svg-IOC252tHGt9Yyo6O{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-IOC252tHGt9Yyo6O .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-IOC252tHGt9Yyo6O .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-IOC252tHGt9Yyo6O .error-icon{fill:#552222;}#mermaid-svg-IOC252tHGt9Yyo6O .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-IOC252tHGt9Yyo6O .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-IOC252tHGt9Yyo6O .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-IOC252tHGt9Yyo6O .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-IOC252tHGt9Yyo6O .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-IOC252tHGt9Yyo6O .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-IOC252tHGt9Yyo6O .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-IOC252tHGt9Yyo6O .marker{fill:#333333;stroke:#333333;}#mermaid-svg-IOC252tHGt9Yyo6O .marker.cross{stroke:#333333;}#mermaid-svg-IOC252tHGt9Yyo6O svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-IOC252tHGt9Yyo6O p{margin:0;}#mermaid-svg-IOC252tHGt9Yyo6O .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-IOC252tHGt9Yyo6O .cluster-label text{fill:#333;}#mermaid-svg-IOC252tHGt9Yyo6O .cluster-label span{color:#333;}#mermaid-svg-IOC252tHGt9Yyo6O .cluster-label span p{background-color:transparent;}#mermaid-svg-IOC252tHGt9Yyo6O .label text,#mermaid-svg-IOC252tHGt9Yyo6O span{fill:#333;color:#333;}#mermaid-svg-IOC252tHGt9Yyo6O .node rect,#mermaid-svg-IOC252tHGt9Yyo6O .node circle,#mermaid-svg-IOC252tHGt9Yyo6O .node ellipse,#mermaid-svg-IOC252tHGt9Yyo6O .node polygon,#mermaid-svg-IOC252tHGt9Yyo6O .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-IOC252tHGt9Yyo6O .rough-node .label text,#mermaid-svg-IOC252tHGt9Yyo6O .node .label text,#mermaid-svg-IOC252tHGt9Yyo6O .image-shape .label,#mermaid-svg-IOC252tHGt9Yyo6O .icon-shape .label{text-anchor:middle;}#mermaid-svg-IOC252tHGt9Yyo6O .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-IOC252tHGt9Yyo6O .rough-node .label,#mermaid-svg-IOC252tHGt9Yyo6O .node .label,#mermaid-svg-IOC252tHGt9Yyo6O .image-shape .label,#mermaid-svg-IOC252tHGt9Yyo6O .icon-shape .label{text-align:center;}#mermaid-svg-IOC252tHGt9Yyo6O .node.clickable{cursor:pointer;}#mermaid-svg-IOC252tHGt9Yyo6O .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-IOC252tHGt9Yyo6O .arrowheadPath{fill:#333333;}#mermaid-svg-IOC252tHGt9Yyo6O .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-IOC252tHGt9Yyo6O .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-IOC252tHGt9Yyo6O .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-IOC252tHGt9Yyo6O .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-IOC252tHGt9Yyo6O .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-IOC252tHGt9Yyo6O .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-IOC252tHGt9Yyo6O .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-IOC252tHGt9Yyo6O .cluster text{fill:#333;}#mermaid-svg-IOC252tHGt9Yyo6O .cluster span{color:#333;}#mermaid-svg-IOC252tHGt9Yyo6O div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-IOC252tHGt9Yyo6O .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-IOC252tHGt9Yyo6O rect.text{fill:none;stroke-width:0;}#mermaid-svg-IOC252tHGt9Yyo6O .icon-shape,#mermaid-svg-IOC252tHGt9Yyo6O .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-IOC252tHGt9Yyo6O .icon-shape p,#mermaid-svg-IOC252tHGt9Yyo6O .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-IOC252tHGt9Yyo6O .icon-shape .label rect,#mermaid-svg-IOC252tHGt9Yyo6O .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-IOC252tHGt9Yyo6O .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-IOC252tHGt9Yyo6O .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-IOC252tHGt9Yyo6O :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 复位深度(由浅到深)
Application Reset

应用软重启
System Reset

系统级复位
Warm PORST
Cold PORST

冷启动
典型: 1101, Mcu_PerformReset

RSTCON.SW=10
典型: Wdg/SMU 超时

RSTCON.SMU=01
典型: 上电

FwCheck Cold PORST 路径

图 1:复位范围对比


3. 硬件机制:三个关键寄存器

寄存器 地址 作用
SCU_RSTCON 0xF0036058 配置各复位源对应的复位类型(Application / System)
SCU_SWRSTCON 0xF0036060 发起 软件复位(SWRSTREQ=1,即 Mcu_PerformReset
SCU_RSTSTAT 0xF0036050 记录上次复位触发源(只读,需 CLRC 清除)

3.1 SCU_RSTCON 位域

本工程典型值 含义
ESR0/ESR1 1:0/3:2 配置于 Mcu 外部复位脚触发时的类型
SMU 7:6 APP: 01 SMU/看门狗触发 → System Reset
SW 9:8 APP/Boot: 10 软件复位 → Application Reset
STM0/1/2 11:10... 配置于 Mcu 定时器比较匹配触发时的类型

3.2 SCU_RSTSTAT 常见触发源

名称 含义
bit0 ESR0 外部复位请求 0
bit3 SMU SMU 触发
bit4 SW 软件复位Mcu_PerformReset
bit5--7 STM0/1/2 定时器比较匹配
bit16 PORST 电源复位
bit26/27 HSMS/HSMA HSM System / Application Reset

图 3:三寄存器协作

#mermaid-svg-oJlkmVTPn5dyKLsB{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-oJlkmVTPn5dyKLsB .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-oJlkmVTPn5dyKLsB .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-oJlkmVTPn5dyKLsB .error-icon{fill:#552222;}#mermaid-svg-oJlkmVTPn5dyKLsB .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-oJlkmVTPn5dyKLsB .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-oJlkmVTPn5dyKLsB .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-oJlkmVTPn5dyKLsB .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-oJlkmVTPn5dyKLsB .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-oJlkmVTPn5dyKLsB .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-oJlkmVTPn5dyKLsB .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-oJlkmVTPn5dyKLsB .marker{fill:#333333;stroke:#333333;}#mermaid-svg-oJlkmVTPn5dyKLsB .marker.cross{stroke:#333333;}#mermaid-svg-oJlkmVTPn5dyKLsB svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-oJlkmVTPn5dyKLsB p{margin:0;}#mermaid-svg-oJlkmVTPn5dyKLsB .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-oJlkmVTPn5dyKLsB .cluster-label text{fill:#333;}#mermaid-svg-oJlkmVTPn5dyKLsB .cluster-label span{color:#333;}#mermaid-svg-oJlkmVTPn5dyKLsB .cluster-label span p{background-color:transparent;}#mermaid-svg-oJlkmVTPn5dyKLsB .label text,#mermaid-svg-oJlkmVTPn5dyKLsB span{fill:#333;color:#333;}#mermaid-svg-oJlkmVTPn5dyKLsB .node rect,#mermaid-svg-oJlkmVTPn5dyKLsB .node circle,#mermaid-svg-oJlkmVTPn5dyKLsB .node ellipse,#mermaid-svg-oJlkmVTPn5dyKLsB .node polygon,#mermaid-svg-oJlkmVTPn5dyKLsB .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-oJlkmVTPn5dyKLsB .rough-node .label text,#mermaid-svg-oJlkmVTPn5dyKLsB .node .label text,#mermaid-svg-oJlkmVTPn5dyKLsB .image-shape .label,#mermaid-svg-oJlkmVTPn5dyKLsB .icon-shape .label{text-anchor:middle;}#mermaid-svg-oJlkmVTPn5dyKLsB .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-oJlkmVTPn5dyKLsB .rough-node .label,#mermaid-svg-oJlkmVTPn5dyKLsB .node .label,#mermaid-svg-oJlkmVTPn5dyKLsB .image-shape .label,#mermaid-svg-oJlkmVTPn5dyKLsB .icon-shape .label{text-align:center;}#mermaid-svg-oJlkmVTPn5dyKLsB .node.clickable{cursor:pointer;}#mermaid-svg-oJlkmVTPn5dyKLsB .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-oJlkmVTPn5dyKLsB .arrowheadPath{fill:#333333;}#mermaid-svg-oJlkmVTPn5dyKLsB .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-oJlkmVTPn5dyKLsB .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-oJlkmVTPn5dyKLsB .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-oJlkmVTPn5dyKLsB .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-oJlkmVTPn5dyKLsB .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-oJlkmVTPn5dyKLsB .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-oJlkmVTPn5dyKLsB .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-oJlkmVTPn5dyKLsB .cluster text{fill:#333;}#mermaid-svg-oJlkmVTPn5dyKLsB .cluster span{color:#333;}#mermaid-svg-oJlkmVTPn5dyKLsB div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-oJlkmVTPn5dyKLsB .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-oJlkmVTPn5dyKLsB rect.text{fill:none;stroke-width:0;}#mermaid-svg-oJlkmVTPn5dyKLsB .icon-shape,#mermaid-svg-oJlkmVTPn5dyKLsB .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-oJlkmVTPn5dyKLsB .icon-shape p,#mermaid-svg-oJlkmVTPn5dyKLsB .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-oJlkmVTPn5dyKLsB .icon-shape .label rect,#mermaid-svg-oJlkmVTPn5dyKLsB .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-oJlkmVTPn5dyKLsB .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-oJlkmVTPn5dyKLsB .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-oJlkmVTPn5dyKLsB :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 复位后(记录)
硬件执行
复位触发
复位前(配置)
SCU_RSTCON

SW=10 / SMU=01 ...
SWRSTREQ=1

1101 / Mcu_PerformReset
SMU / Wdg 超时
Application Reset
System Reset
SCU_RSTSTAT

SW=1 / SMU=1 ...


4. 核心差异对照表

4.1 硬件行为

对比项 Application Reset System Reset
复位深度 较浅:应用级软重启 较深:系统级复位
CPU 全部 TriCore 复位重启 全部 TriCore 复位重启
外设 大部分外设模块复位 更多模块/子系统回到复位态
SCU_RSTCON 通常保留触发前的配置 回到芯片复位默认值 (如 0x140
SMU 状态机 可能保持 RUN(未回到 START) 更可能复位到 START 或不同初始态
Standby RAM / DLMU 配置允许时可保留 保留性更差 / 行为更保守
启动流程 仍从复位向量启动;有 Boot 时经 Boot→App 同左,但寄存器/外设初始态不同
典型场景 UDS 1101、正常 ECU Reset、应用主动重启 看门狗超时、SMU 安全复位、严重故障恢复

4.2 复位后的寄存器差异

不同的复位源,对应的SMU_AG0-11中的值可能不一样,SCU_STMEM3-6值可能不一样,在做Fwcheck时需要考虑 。以System Reset为例,参考如下:

5. 总结

维度 Application Reset System Reset
本质 应用级软重启,较浅 系统级复位,较深
配置 RSTCON.xxx = 10 RSTCON.xxx = 01
1101 应使用 不应在 SW 域配置
Wdg/SMU 一般不选用 应使用
RSTCON 保留 Application Reset 后多保留 常回默认值

一句话 :Application Reset 与 System Reset 的区别不在于「谁触发」,而在于 SCU_RSTCON 对该触发源的配置 ;同一 SW 源可产生两种不同深度的复位,本工程 1101 应走 Application Reset,看门狗应走 System Reset,二者通过 RSTCON 不同域分别配置。