Skip to content
Snippets Groups Projects
Commit a3cf4ea2 authored by Daniel Campora's avatar Daniel Campora
Browse files

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

parent 71f85cc3
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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);
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment