如何在 ARM 处理器上检测冷启动与热启动? [英] How to detect cold boot versus warm boot on an ARM processor?

查看:45
本文介绍了如何在 ARM 处理器上检测冷启动与热启动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法来确定 ARM 处理器是从冷启动(即初始开机)还是热启动(即在没有实际断电的情况下重置断言)启动.具体来说,我使用的是 ARM968 内核,将使用 C 或程序集进行确定,并且我将使用该确定,因此某些操作仅在初始开机时运行,而不是在随后的重置时运行.在以前的项目中,我利用外部电路(例如 FPGA)来检测不同的启动场景,但在这种情况下,我仅限于 ARM 内核.

I'm looking for a way to determine whether an ARM processor is booting from a cold boot (i.e. initial power-on) versus a warm boot (i.e. reset assertion without actual power loss). Specifically I'm using an ARM968 core, will be making the determination using C or assembly, and I will use the determination so certain operations only run on the initial power-on and not on subsequent resets. In previous projects I've leveraged external circuitry (e.g. FPGA) to detect the different boot scenarios, but in this case I am limited to the ARM core.

推荐答案

您可以将 RAM 中的全局变量初始化为冷启动期间不太可能出现的值,并在启动期间检查该值.

You can initialize a global variable in RAM to a value that is unlikely during cold boot, and check for that during boot.

对于微控制器,特定芯片的复位逻辑通常会提供一个状态寄存器,它指示复位源.我不知道这个更大的核心是否存在,以及你是否可以使用它.

For microcontrollers normally the reset logic of the specific chip provides a status register, which indicates the source of the reset. I don't know if that exists for this bigger core, and whether you could use that.

这篇关于如何在 ARM 处理器上检测冷启动与热启动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆