问候! 有谁知道如何通过等待外部中断或定时器中断使处理器进入睡眠模式?
离线
没有睡眠模式吧
离线
问候! 有谁知道如何通过等待外部中断或定时器中断使处理器进入睡眠模式?
ARM9内核裸机使用如下代码进入睡眠,任何中断都能进行唤醒:
void arm32_tickless(void){
__asm
{
mov r0, 0
mcr p15, 0, r0, c7, c0, 4
}
}
离线
mcr 指令 p15, 0, r0, c7, c0, 4 /* 等待中断 */
我对 DOZE/SLEEP mode 模式感兴趣 https://developer.arm.com/documentation/ddi0287/b/introduction-and-configuration/system-controller-and-configuration-logic/about-the-system-controller/system-mode-control?lang=en
ARM926EJ-S Development Chip Reference Manual
"SLEEP mode
In SLEEP mode, the system clocks, HCLK and CLK, are disabled and the System Controller clock, SCLK, is driven from a slow speed oscillator (nominally 32 768Hz).
When either a FIQ or an IRQ interrupt is activated (through the VIC) the system moves into the DOZE mode. Additionally, the required operating mode in the system control register automatically changes from SLEEP to DOZE.
Note
Before entering SLEEP mode you must ensure that the processor is in the Wait-for-interrupt state. Processor status is determined by the STANDBYWFI output from the processor.
DOZE mode
In DOZE mode, the system clocks and the System Controller clock are driven from a low frequency oscillator.
From DOZE mode it is possible to move into SLEEP mode when none of the mode control bits are set and the processor is in Wait-for-interrupt state.
If SLOW mode or NORMAL mode is required the system moves into the XTAL control transition state to initialize the crystal oscillator."
离线