Skip to content

Commit a3cf4ea

Browse files
author
Daniel Campora
committed
cc3200: Do not kick the watchdog inside the idle task.
1 parent 71f85cc commit a3cf4ea

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

cc3200/misc/FreeRTOSHooks.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#include "inc/hw_memmap.h"
3535
#include "pybuart.h"
3636
#include "osi.h"
37-
#include "pybwdt.h"
3837
#include "mperror.h"
3938

4039

@@ -49,8 +48,6 @@
4948
//*****************************************************************************
5049
void vApplicationIdleHook (void)
5150
{
52-
// kick the watchdog
53-
pybwdt_kick();
5451
// signal that we are alive and kicking
5552
mperror_heartbeat_signal();
5653
// gate the processor's clock to save power

cc3200/mods/pybwdt.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,6 @@ __attribute__ ((section (".boot")))
7373
void pybwdt_init0 (void) {
7474
}
7575

76-
void pybwdt_kick (void) {
77-
// check that the servers and simplelink are running fine
78-
if ((pybwdt_data.servers || pybwdt_data.servers_sleeping) && pybwdt_data.simplelink && pybwdt_data.running) {
79-
pybwdt_data.servers = false;
80-
pybwdt_data.simplelink = false;
81-
MAP_WatchdogIntClear(WDT_BASE);
82-
}
83-
}
84-
8576
void pybwdt_srv_alive (void) {
8677
pybwdt_data.servers = true;
8778
}
@@ -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
139130
/// \function wdt_kick()
140131
/// Kicks the watchdog timer
141132
STATIC mp_obj_t pyb_kick_wdt(mp_obj_t self) {
142-
pybwdt_kick ();
133+
if ((pybwdt_data.servers || pybwdt_data.servers_sleeping) && pybwdt_data.simplelink) {
134+
pybwdt_data.servers = false;
135+
pybwdt_data.simplelink = false;
136+
MAP_WatchdogIntClear(WDT_BASE);
137+
}
143138
return mp_const_none;
144139
}
145140
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_kick_wdt_obj, pyb_kick_wdt);

cc3200/mods/pybwdt.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
extern const mp_obj_type_t pyb_wdt_type;
3333

3434
void pybwdt_init0 (void);
35-
void pybwdt_kick (void);
3635
void pybwdt_srv_alive (void);
3736
void pybwdt_srv_sleeping (bool state);
3837
void pybwdt_sl_alive (void);

0 commit comments

Comments
 (0)