FAQS32K144 RUN模式下,LVD Reset之后,程序卡死在CAN

S32K144 RUN模式下,LVD Reset之后,程序卡死在CAN初始化,进入freeze mode时的循环中
更新时间:2022.03.28 浏览量:0

客户使用的SDK 版本为 SDK 3.0.0 


根据数据手册,S32K14X CAN进入freeze mode需要按照以下顺序

1. Set both CAN_MCR[FRZ] (Freeze Enable) and CAN_MCR[HALT] (Halt) to 1.

2. Check whether CAN_MCR[MDIS] (Module Disable) is set to 1. If it is, clear it to 0.

3. Poll the MCR register until CAN_MCR[FRZACK] (Freeze Mode Acknowledge) is

set to 1 or the timeout is reached.

The minimum timeout duration must be equivalent to:

a. 730 CAN Nominal bits if CAN_MCR[FDEN] (CAN

FD Operation Enable) is set to 1 (CAN bits calculated

at arbitration bit rate),

b. 180 CAN bits if CAN_MCR[FDEN] is cleared to 0.

4. If CAN_MCR[FRZACK] is set to 1, no further action is required. Skip steps 5 to 8.

5. If the timeout is reached because CAN_MCR[FRZACK] remains cleared to 0, then

set CAN_MCR[SOFTRST] (Soft Reset) to 1.

6. Poll MCR until CAN_MCR[SOFTRST] is cleared to 0.

7. Reconfigure the Module Control register (CAN_MCR).

8. Reconfigure all the Interrupt Mask registers (CAN_IMASKn).


由于客户使用的SDK版本较早,CAN的驱动代码中,没有进行超时判断,导致卡死在Freezemode的进入判断


最新版本中,加入了Freezemode的timeout处理和CAN模块的软件复位,程序在LVD之后则不会卡死,且能正常初始化


  • 上一篇:S32K1XX进入到VLPS模式时,无法通过CAN中断唤醒的问题
  • 下一篇:S32K14x SPI通讯当主机时满足和不同速率和帧位数的从机通讯问题