This section provides high level APIs to upper layer.
More...
This section provides high level APIs to upper layer.
void mtk_os_hal_wdt_enable |
( |
void |
| ) |
|
This function is used to enable WDT.
- Parameters
-
- Returns
- None
void mtk_os_hal_wdt_disable |
( |
void |
| ) |
|
This function is used to disable WDT.
- Parameters
-
- Returns
- None
int mtk_os_hal_wdt_set_timeout |
( |
unsigned int |
sec | ) |
|
This function is used to set WDT timeout value.
- Parameters
-
[in] | sec | : WDT timeout value(unit: second). It should be less then 64 second. |
- Returns
- None
void mtk_os_hal_wdt_restart |
( |
void |
| ) |
|
This function is used to restart WDT counter.
- Parameters
-
- Returns
- None
void mtk_os_hal_wdt_sw_reset |
( |
void |
| ) |
|
This function is used to reset the M4 core immediately by WDT software reset.
Once this API been invoked, the M4 core will reboot immediately. mtk_os_hal_wdt_init() and mtk_os_hal_wdt_get_reset_status() could be invoked later to get the reboot reason. This API is usually used when M4 APP trigger reboot.
- Parameters
-
- Returns
- None
void mtk_os_hal_wdt_hw_reset |
( |
void |
| ) |
|
This function is used to reset the M4 core immediately by WDT counter timeout.
Once this API been invoked, the M4 core will reboot immediately. mtk_os_hal_wdt_init() and mtk_os_hal_wdt_get_reset_status() could be invoked later to get the reboot reason. This API is usually been invoked in WDT irq handler.
- Parameters
-
- Returns
- None
This function is used to config WDT irq mode.
OS_WDT_TRIGGER_IRQ means IRQ will be triggered when WDT timeout, while OS_WDT_TRIGGER_RESET means the M4 core will be reset immediately when WDT timeout.
- Parameters
-
[in] | irq | : config WDT to trigger irq(input OS_WDT_TRIGGER_IRQ), or trigger reset(input OS_WDT_TRIGGER_RESET) |
- Returns
- None
void mtk_os_hal_wdt_register_irq |
( |
struct os_wdt_int * |
wdt_int | ) |
|
This function is used to register user interrupt handle for WDT.
- Parameters
-
[in] | wdt_int | : a pointer of struct os_wdt_int to register user interrupt handle(wdt_cb_hdl) and callback data(wdt_cb_data). When WDT interrupt is triggered, wdt_cb_hdl(wdt_cb_data) will be called without any other process. If wdt_int is NULL, a default interrupt handle will be registered which will cause system reset after WDT interruption. |
- Returns
- None
void mtk_os_hal_wdt_init |
( |
void |
| ) |
|
This function is used to initialize WDT device(with disable WDT) and to make WDT driver effective.
Internal assurance that it will only be executed only one time effectively.
- Parameters
-
- Returns
- None