at91sam9260-shutdown controller 章节翻译,可用于待机功能

来源:互联网 发布:农产品网络市场 编辑:程序博客网 时间:2024/05/17 11:56

18. Shutdown Controller (SHDWC)

18.1 Description

The Shutdown Controller controls the power supplies VDDIO and VDDCORE and the wake-up detection on debounced input lines.

Shutdown控制电源供给,VDDIOVDDCORE同时肩负着唤醒管脚的检测。

18.2 Block Diagram

Figure 18-1. Shutdown Controller Block Diagram


18.3 I/O Lines Description


18.4 Product Dependencies

18.4.1 Power Management

The Shutdown Controller is continuously clocked by Slow Clock. The Power Management Controller has no effect on the behavior of the Shutdown Controller.

低速时钟(slow clock)提供Shutdown控制器的工作时钟。PMC对shutdown控制的行为没有任何影响。

18.5 Functional Description

The Shutdown Controller manages the main power supply. To do so, it is supplied with VDDBU and manages wake-up input pins and one output pin, SHDN.

Shutdown管理者主电源的供给。即提供了VDDBU 管理了一个输入唤醒管脚和一个输出管脚(SHUN)

A typical application connects the pin SHDN to the shutdown input of the DC/DC Converter providing the main power supplies of the system, and especially VDDCORE and/or VDDIO. The wake-up inputs (WKUP0) connect to any push-buttons or signal that wake up the system.

SHDN的一个典型应用就是连接到DC/DC转换器shutdown的输入管脚,以此来为系统提供供电,尤其是VDDCOREVDDIO唤醒输入管脚(WKUP0)连接到一个按键或者一个可以唤醒系统工作的信号线。

The software is able to control the pin SHDN by writing the Shutdown Control Register(SHDW_CR) with the bit SHDW at 1. The shutdown is taken into account only 2 slow clock cycles after the write of SHDW_CR. This register is password-protected and so the value written should contain the correct key for the command to be taken into account. As a result, the system should be powered down. A level change on WKUP0 is used as wake-up. Wake-up is configured in the Shutdown Mode Register (SHDW_MR). The transition detector can be programmed to detect either a positive or negative transition or any level change on WKUP0. The detection can also be disabled. Programming is performed by defining WKMODE0.

软件方面,通过写寄存器SHDW_CRSHDW位置1可以控制SHDN管脚。操作完后的2慢速时钟周期,就可以体现在管脚变化。这个寄存器是密码保护,所以寄存器的操作需要包含一个正确的key值。结果是,系统可以进入休眠模式,即power down.WKUP0的电平变化可以被当做唤醒动作。SHDW_MR寄存器可以配置相关的唤醒动作。探测器可以侦测一个上升沿或者下降沿,任何变化中的一个即可。这个检测也可以disabled。通过设置WKMODE0,来设置具体的功能模式。

Moreover, a debouncing circuit can be programmed for WKUP0. The debouncing circuit filters pulses on WKUP0 shorter than the programmed number of 16 SLCK cycles in CPTWK0 of theSHDW_MR register. If the programmed level change is detected on a pin, a counter starts.

更多的是,对于WKUP0同样有一个可编程的映射电路存在。这个电路能够过滤WKUP0管脚上的脉冲信号,脉冲宽度的定义需要通过设置SHDW_MR寄存器的CPTWK0。如果检测到一个电平变化,计数器则开始计时。

When the counter reaches the value programmed in the corresponding field, CPTWK0, the SHDN pin is released. If a new input change is detected before the counter reaches the corresponding value, the counter is stopped and cleared. WAKEUP0 of the Status Register(SHDW_SR) reports the detection of the programmed events on WKUP0, with a reset after the read of SHDW_SR.

当计数器计时到CPTWK0的峰值时,SHDN管脚被释放。如果计数器到达峰值之前,一个新的输入变化被侦测到,那么计数器将停止计数并被清零。在重启读取SHDW_SR寄存器后,WAKEUP0体现了这一段时间内事件的发生状态。

The Shutdown Controller can be programmed so as to activate the wake-up using the RTT alarm (the detection of the rising edge of the RTT alarm is synchronized with SLCK). This is done by writing the SHDW_MR register using the RTTWKEN fields. When enabled, the detection of the RTT alarm is reported in the RTTWK bit of the SHDW_SR Status register. It is reset after the read of SHDW_SR. When using the RTT alarm to wake up the system, the user must ensure that the RTT alarm status flag is cleared before shutting down the system. Otherwise, no rising edge of the status flag may be detected and the wake-up fails.

Shutdown控制器可以被配置,同样利用RTT也可以激活。通过写SHDW_MR寄存器的RTTWKEN,可以完成相关配置。当被使能时,RTT告警的检测,可以体现在SHDW_SR寄存器的RTTWK位域。

18.6 Shutdown Controller (SHDWC) User Interface

18.6.1 Register Mapping


18.6.2 Shutdown Control Register


• SHDW: Shutdown Command

0 = No effect.

1 = If KEY is correct, asserts the SHDN pin.如果被正确设置,则SHDN被确定控制。

• KEY: Password

Should be written at value 0xA5. Writing any other value in this field aborts the write operation.

必须A5,否则其他值会导致退出写操作。

18.6.3 Shutdown Mode Register

 

• WKMODE0: Wake-up Mode 0

 

• CPTWK0: Counter on Wake-up 0

Defines the number of 16 Slow Clock cycles, the level detection on the corresponding input pin shall last before the wakeup event occurs. Because of the internal synchronization of WKUP0 , the SHDN pin is released。

定义了一组最多16慢时钟周期,在wakeup时间发生之前,检测相应管脚的电平状态。由于WKUP0的内部同步作用,SHDN管脚会被释放。

(CPTWK x 16 + 1) Slow Clock cycles after the event on WKUP.

WKUP的事件发生后,会经历((CPTWK x 16 + 1) )个慢时钟周期。

• RTTWKEN: Real-time Timer Wake-up Enable

0 = The RTT Alarm signal has no effect on the Shutdown Controller.

1 = The RTT Alarm signal forces the de-assertion of the SHDN pin.

18.6.4 Shutdown Status Register

 

• WAKEUP0: Wake-up 0 Status

0 = No wake-up event occurred on the corresponding wake-up input since the last read of SHDW_SR.

1 = At least one wake-up event occurred on the corresponding wake-up input since the last read of SHDW_SR.

• RTTWK: Real-time Timer Wake-up

0 = No wake-up alarm from the RTT occurred since the last read of SHDW_SR.

1 = At least one wake-up alarm from the RTT occurred since the last read of SHDW_SR.



0 0
原创粉丝点击