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

问题描述

我正在寻找一种方法来确定一个ARM处理器是否从冷启动启动(即初始上电)与热启动(即重置没有实际的功率损耗断言)。特别是我使用的是ARM968内核,将使得使用C或组装的决心,我会用这样的决心某些操作只能在随后的复位初始上电和无法运行。在previous项目,我已经利用外部电路(如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.

推荐答案

您可以在内存中的全局变量初始化到冷启动过程中是不可能的值,并且在引导过程中检查这一点。

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处理器上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 19:23