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
59f68313
Commit
59f68313
authored
Mar 20, 2015
by
danicampora
Browse files
cc3200: Reduce soft reset time. WLAN is not reinit, just reenabled.
parent
77791b56
Changes
4
Hide whitespace changes
Inline
Side-by-side
cc3200/mods/modwlan.h
View file @
59f68313
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
#define SIMPLELINK_SPAWN_TASK_PRIORITY 3
#define SIMPLELINK_SPAWN_TASK_PRIORITY 3
#define SIMPLELINK_TASK_STACK_SIZE 2048
#define SIMPLELINK_TASK_STACK_SIZE 2048
#define SL_STOP_TIMEOUT 35
#define SL_STOP_TIMEOUT 35
#define SL_STOP_TIMEOUT_LONG 2
5
5
#define SL_STOP_TIMEOUT_LONG 2
0
5
/******************************************************************************
/******************************************************************************
DEFINE TYPES
DEFINE TYPES
...
...
cc3200/mods/pybsleep.c
View file @
59f68313
...
@@ -226,6 +226,10 @@ void pybsleep_configure_timer_wakeup (uint pwrmode) {
...
@@ -226,6 +226,10 @@ void pybsleep_configure_timer_wakeup (uint pwrmode) {
pybsleep_wake_cb
.
timer_wake_pwrmode
=
pwrmode
;
pybsleep_wake_cb
.
timer_wake_pwrmode
=
pwrmode
;
}
}
pybsleep_reset_cause_t
pybsleep_get_reset_cause
(
void
)
{
return
pybsleep_reset_cause
;
}
/******************************************************************************
/******************************************************************************
DEFINE PRIVATE FUNCTIONS
DEFINE PRIVATE FUNCTIONS
******************************************************************************/
******************************************************************************/
...
...
cc3200/mods/pybsleep.h
View file @
59f68313
...
@@ -72,5 +72,6 @@ void pybsleep_set_wlan_lpds_callback (mp_obj_t cb_obj);
...
@@ -72,5 +72,6 @@ void pybsleep_set_wlan_lpds_callback (mp_obj_t cb_obj);
void
pybsleep_set_gpio_lpds_callback
(
mp_obj_t
cb_obj
);
void
pybsleep_set_gpio_lpds_callback
(
mp_obj_t
cb_obj
);
void
pybsleep_set_timer_lpds_callback
(
mp_obj_t
cb_obj
);
void
pybsleep_set_timer_lpds_callback
(
mp_obj_t
cb_obj
);
void
pybsleep_configure_timer_wakeup
(
uint
pwrmode
);
void
pybsleep_configure_timer_wakeup
(
uint
pwrmode
);
pybsleep_reset_cause_t
pybsleep_get_reset_cause
(
void
);
#endif
/* PYBSLEEP_H_ */
#endif
/* PYBSLEEP_H_ */
cc3200/mptask.c
View file @
59f68313
...
@@ -144,15 +144,13 @@ soft_reset:
...
@@ -144,15 +144,13 @@ soft_reset:
mperror_enable_heartbeat
();
mperror_enable_heartbeat
();
if
(
MAP_PRCMSysR
eset
C
ause
Get
()
!=
PRCM
_HIB_
EXI
T
)
{
if
(
pybsleep_get_r
eset
_c
ause
()
<
PYB_SLP
_HIB_
RESE
T
)
{
// only if not comming out of hibernate
// only if not comming out of hibernate
or a soft reset
mptask_enter_ap_mode
();
mptask_enter_ap_mode
();
// don't check for safeboot when comming out of hibernate
#ifndef DEBUG
#ifndef DEBUG
safeboot
=
PRCMIsSafeBootRequested
();
safeboot
=
PRCMIsSafeBootRequested
();
#endif
#endif
}
}
else
{
else
{
// when waking up from hibernate we just want
// when waking up from hibernate we just want
// to enable simplelink and leave it as is
// to enable simplelink and leave it as is
wlan_first_start
();
wlan_first_start
();
...
@@ -218,7 +216,7 @@ soft_reset:
...
@@ -218,7 +216,7 @@ soft_reset:
// Main script is finished, so now go into REPL mode.
// Main script is finished, so now go into REPL mode.
// The REPL mode can change, or it can request a soft reset.
// The REPL mode can change, or it can request a soft reset.
for
(
;;
)
{
for
(
;
;
)
{
if
(
pyexec_mode_kind
==
PYEXEC_MODE_RAW_REPL
)
{
if
(
pyexec_mode_kind
==
PYEXEC_MODE_RAW_REPL
)
{
if
(
pyexec_raw_repl
()
!=
0
)
{
if
(
pyexec_raw_repl
()
!=
0
)
{
break
;
break
;
...
...
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