cc3200: Do not kick the watchdog inside the idle task.
This commit is contained in:
parent
71f85cc330
commit
a3cf4ea2f6
|
@ -34,7 +34,6 @@
|
||||||
#include "inc/hw_memmap.h"
|
#include "inc/hw_memmap.h"
|
||||||
#include "pybuart.h"
|
#include "pybuart.h"
|
||||||
#include "osi.h"
|
#include "osi.h"
|
||||||
#include "pybwdt.h"
|
|
||||||
#include "mperror.h"
|
#include "mperror.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,8 +48,6 @@
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
void vApplicationIdleHook (void)
|
void vApplicationIdleHook (void)
|
||||||
{
|
{
|
||||||
// kick the watchdog
|
|
||||||
pybwdt_kick();
|
|
||||||
// signal that we are alive and kicking
|
// signal that we are alive and kicking
|
||||||
mperror_heartbeat_signal();
|
mperror_heartbeat_signal();
|
||||||
// gate the processor's clock to save power
|
// gate the processor's clock to save power
|
||||||
|
|
|
@ -73,15 +73,6 @@ __attribute__ ((section (".boot")))
|
||||||
void pybwdt_init0 (void) {
|
void pybwdt_init0 (void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void pybwdt_kick (void) {
|
|
||||||
// check that the servers and simplelink are running fine
|
|
||||||
if ((pybwdt_data.servers || pybwdt_data.servers_sleeping) && pybwdt_data.simplelink && pybwdt_data.running) {
|
|
||||||
pybwdt_data.servers = false;
|
|
||||||
pybwdt_data.simplelink = false;
|
|
||||||
MAP_WatchdogIntClear(WDT_BASE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void pybwdt_srv_alive (void) {
|
void pybwdt_srv_alive (void) {
|
||||||
pybwdt_data.servers = true;
|
pybwdt_data.servers = true;
|
||||||
}
|
}
|
||||||
|
@ -139,7 +130,11 @@ STATIC mp_obj_t pyb_wdt_make_new (mp_obj_t type_in, mp_uint_t n_args, mp_uint_t
|
||||||
/// \function wdt_kick()
|
/// \function wdt_kick()
|
||||||
/// Kicks the watchdog timer
|
/// Kicks the watchdog timer
|
||||||
STATIC mp_obj_t pyb_kick_wdt(mp_obj_t self) {
|
STATIC mp_obj_t pyb_kick_wdt(mp_obj_t self) {
|
||||||
pybwdt_kick ();
|
if ((pybwdt_data.servers || pybwdt_data.servers_sleeping) && pybwdt_data.simplelink) {
|
||||||
|
pybwdt_data.servers = false;
|
||||||
|
pybwdt_data.simplelink = false;
|
||||||
|
MAP_WatchdogIntClear(WDT_BASE);
|
||||||
|
}
|
||||||
return mp_const_none;
|
return mp_const_none;
|
||||||
}
|
}
|
||||||
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_kick_wdt_obj, pyb_kick_wdt);
|
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_kick_wdt_obj, pyb_kick_wdt);
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
extern const mp_obj_type_t pyb_wdt_type;
|
extern const mp_obj_type_t pyb_wdt_type;
|
||||||
|
|
||||||
void pybwdt_init0 (void);
|
void pybwdt_init0 (void);
|
||||||
void pybwdt_kick (void);
|
|
||||||
void pybwdt_srv_alive (void);
|
void pybwdt_srv_alive (void);
|
||||||
void pybwdt_srv_sleeping (bool state);
|
void pybwdt_srv_sleeping (bool state);
|
||||||
void pybwdt_sl_alive (void);
|
void pybwdt_sl_alive (void);
|
||||||
|
|
Loading…
Reference in New Issue