Introduction
The CHIP_EN (chip enable) is an external pin that can be used to control the reset status of the whole SoC. This pin can work in level reset mode, interrupt reset mode or pulse reset mode. By default, it works in level reset mode. This pin always has the function of resetting system no matter in which mode.
In RTL8721Dx, the button with CHIP_EN
is connected to the CHIP_EN
pin, as CHIP_EN on board shows.

CHIP_EN on board
Three Working Modes
There are three working modes of CHIP_EN for different usages.
Level Reset Mode
Level reset mode is the default mode of CHIP_EN. In this mode, a low level on this pin longer than debounce time will trigger RESET directly and the SoC will reboot when this pin goes from low to high.
User can reset the whole chip by simply pressing down and releasing the CHIP_EN button. When low level is detected longer than debounce time, the chip will be reset after the CHIP_EN button is released. So user can adjust the sensitivity of CHIP_EN by setting different debounce time from 100us to 16ms.
Interrupt Reset Mode
In interrupt reset mode, a low level on this pin longer than the sum of debounce and short press time can trigger an interrupt instead of resetting the system directly. Thus, software can handle the interrupt and choose whether to reset the system.
The interrupt reset mode is mainly designed for the power save scenario. The CHIP_EN button just likes the power button of the smartphone: a short press will trigger the system to enter low power mode or wake up the system; a long press will trigger an interrupt to remind the user whether to reset the system. The reboot will happen if user chooses reboot or the system crashed.
Pulse Reset Mode
In pulse reset mode, a low level on this pin longer than debounce time will trigger RESET directly and the SoC will reboot immediately. User can read the status of the CHIPEN pin in boot code to distinguish short/long press. This mode usually can be found in router. Short press will cause the system cold boot; long press will cause the system code boot and restore factory settings.
Once the chip is configured working in Pulse Reset Mode, software cannot change the mode anymore. Only power off will take the chip to Level Reset Mode.
How to Choose Work Mode
For device does not need any control on this pin, tie this pin to
high
.For simply reset requirement, use the
default level reset mode
.If both reset and re-storage of factory settings are needed, use the
pulse reset mode
.For low power scenario, power control and reset are needed on a single pin, use the
interrupt reset mode
.
CHIP_EN Driver APIs
CHIPEN_WorkMode
Items |
Description |
---|---|
Introduction |
Configure CHIP_EN work mode CHIP_EN works in HW reset mode by default. |
Parameters |
mode: new work mode of CHIPEN, which can be
|
Return |
None |
CHIPEN_DebounceSet
Items |
Description |
---|---|
Introduction |
Set the CHIP_EN debounce Time, which works in all work mode |
Parameters |
debounce: new debounce counter, which can be
|
Return |
None |
CHIPEN_ThresHoldSet
Items |
Description |
---|---|
Introduction |
Set long press and short press threshold, which only works in interrupt reset mode |
Parameters |
|
Return |
None |
CHIPEN_AckTimeSet
Items |
Description |
---|---|
Introduction |
Set the ACK threshold for long press interrupt. If long press interrupt can’t be cleared within Tack, the system will reboot |
Parameters |
Tack:
|
Return |
None |
CHIPEN_ClearINT
Items |
Description |
---|---|
Introduction |
Clear CHIP_EN interrupt status |
Parameters |
INTrBit: interrupt to be cleared |
Return |
None |
CHIPEN_GetINT
Items |
Description |
---|---|
Introduction |
Get CHIP_EN interrupt status |
Parameters |
None |
Return |
Interrupt status |