Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
5a0c5f8f
Commit
5a0c5f8f
authored
May 26, 2015
by
Daniel Campora
Browse files
cc3200: Use the WDT stall feature in debug mode only.
parent
ec1f0e75
Changes
1
Hide whitespace changes
Inline
Side-by-side
cc3200/mods/pybwdt.c
View file @
5a0c5f8f
...
...
@@ -114,15 +114,17 @@ STATIC mp_obj_t pyb_enable_wdt(mp_obj_t self, mp_obj_t msec_in) {
// Unlock to be able to configure the registers
MAP_WatchdogUnlock
(
WDT_BASE
);
#ifdef DEBUG
// make the WDT stall when the debugger stops on a breakpoint
MAP_WatchdogStallEnable
(
WDT_BASE
);
#endif
// set the watchdog timer reload value
// the WDT trigger a system reset after the second timeout
// so, divide by the
2
timeout value received
// so, divide by
2
the timeout value received
MAP_WatchdogReloadSet
(
WDT_BASE
,
PYBWDT_MILLISECONDS_TO_TICKS
(
msec
/
2
));
// start the timer. Once
wdt i
s started, it cannot be disabled.
// start the timer. Once
it'
s started, it cannot be disabled.
MAP_WatchdogEnable
(
WDT_BASE
);
pybwdt_data
.
running
=
true
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment