Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
71d482df
Commit
71d482df
authored
May 01, 2015
by
Daniel Campora
Browse files
cc3200: Clear the pending interrupt flag when disabling RTC callbacks.
parent
a9afcb15
Changes
1
Hide whitespace changes
Inline
Side-by-side
cc3200/mods/pybrtc.c
View file @
71d482df
...
...
@@ -111,11 +111,13 @@ STATIC void pyb_rtc_callback_enable (mp_obj_t self_in) {
STATIC
void
pyb_rtc_callback_disable
(
mp_obj_t
self_in
)
{
// check the wake from param
if
(
pybrtc_data
.
prwmode
&
PYB_PWR_MODE_ACTIVE
)
{
//
en
able the slow clock interrupt
//
dis
able the slow clock interrupt
MAP_PRCMIntDisable
(
PRCM_INT_SLOW_CLK_CTR
);
}
// disable wake from ldps and hibernate
pybsleep_configure_timer_wakeup
(
PYB_PWR_MODE_ACTIVE
);
// read the interrupt status to clear any pending interrupt
(
void
)
MAP_PRCMIntStatus
();
}
/******************************************************************************/
...
...
@@ -217,7 +219,7 @@ STATIC mp_obj_t pyb_rtc_callback (mp_uint_t n_args, const mp_obj_t *pos_args, mp
// set the lpds callback
pybsleep_set_timer_lpds_callback
(
_callback
);
// the interrupt priority is ignored since is already set to to highest level by the sleep module
// the interrupt priority is ignored since i
t'
s already set to to highest level by the sleep module
// to make sure that the wakeup callbacks are always called first when resuming from sleep
// enable the interrupt (the object is not relevant here, the function already knows it)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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