cc3200: Do not kick the watchdog inside the idle task.

pull/1305/head
Daniel Campora 2015-06-04 10:12:03 +02:00
rodzic 71f85cc330
commit a3cf4ea2f6
3 zmienionych plików z 5 dodań i 14 usunięć

Wyświetl plik

@ -34,7 +34,6 @@
#include "inc/hw_memmap.h"
#include "pybuart.h"
#include "osi.h"
#include "pybwdt.h"
#include "mperror.h"
@ -49,8 +48,6 @@
//*****************************************************************************
void vApplicationIdleHook (void)
{
// kick the watchdog
pybwdt_kick();
// signal that we are alive and kicking
mperror_heartbeat_signal();
// gate the processor's clock to save power

Wyświetl plik

@ -73,15 +73,6 @@ __attribute__ ((section (".boot")))
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) {
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()
/// Kicks the watchdog timer
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;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_kick_wdt_obj, pyb_kick_wdt);

Wyświetl plik

@ -32,7 +32,6 @@
extern const mp_obj_type_t pyb_wdt_type;
void pybwdt_init0 (void);
void pybwdt_kick (void);
void pybwdt_srv_alive (void);
void pybwdt_srv_sleeping (bool state);
void pybwdt_sl_alive (void);