summaryrefslogtreecommitdiffstatshomepage
path: root/cc3200/mptask.c
diff options
context:
space:
mode:
Diffstat (limited to 'cc3200/mptask.c')
-rw-r--r--cc3200/mptask.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/cc3200/mptask.c b/cc3200/mptask.c
index a96bd1b93d..87990b43c2 100644
--- a/cc3200/mptask.c
+++ b/cc3200/mptask.c
@@ -139,18 +139,13 @@ soft_reset:
#endif
#ifdef LAUNCHXL
- // configure the stdio uart pins with the correct alternate functions
- // param 3 ("mode") is DON'T CARE" for AFs others than GPIO
- pin_config ((pin_obj_t *)&MICROPY_STDIO_UART_TX_PIN, MICROPY_STDIO_UART_TX_PIN_AF, 0, PIN_TYPE_STD_PU, -1, PIN_STRENGTH_2MA);
- pin_config ((pin_obj_t *)&MICROPY_STDIO_UART_RX_PIN, MICROPY_STDIO_UART_RX_PIN_AF, 0, PIN_TYPE_STD_PU, -1, PIN_STRENGTH_2MA);
- // instantiate the stdio uart
+ // instantiate the stdio uart on the default pins
mp_obj_t args[2] = {
mp_obj_new_int(MICROPY_STDIO_UART),
mp_obj_new_int(MICROPY_STDIO_UART_BAUD),
};
pyb_stdio_uart = pyb_uart_type.make_new((mp_obj_t)&pyb_uart_type, MP_ARRAY_SIZE(args), 0, args);
- // create a callback for the uart, in order to enable the rx interrupts
- uart_callback_new (pyb_stdio_uart, mp_const_none, MICROPY_STDIO_UART_RX_BUF_SIZE, INT_PRIORITY_LVL_3);
+ uart_callback_new (pyb_stdio_uart, mp_const_none, INT_PRIORITY_LVL_3, E_UART_TRIGGER_RX_ANY);
#else
pyb_stdio_uart = MP_OBJ_NULL;
#endif
@@ -239,10 +234,9 @@ soft_reset_exit:
pybsleep_signal_soft_reset();
mp_printf(&mp_plat_print, "PYB: soft reboot\n");
- // disable all peripherals that could trigger a callback
- pyb_rtc_callback_disable(NULL);
- timer_disable_all();
- uart_disable_all();
+ // disable all callbacks to avoid undefined behaviour
+ // when coming out of a soft reset
+ mpcallback_disable_all();
// flush the serial flash buffer
sflash_disk_flush();