Skip to content

Commit

Permalink
cc3200: Do not kick the watchdog inside the idle task.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Campora committed Jun 4, 2015
1 parent 71f85cc commit a3cf4ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
3 changes: 0 additions & 3 deletions cc3200/misc/FreeRTOSHooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "inc/hw_memmap.h"
#include "pybuart.h"
#include "osi.h"
#include "pybwdt.h"
#include "mperror.h"


Expand All @@ -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
Expand Down
15 changes: 5 additions & 10 deletions cc3200/mods/pybwdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion cc3200/mods/pybwdt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a3cf4ea

Please sign in to comment.