cc3200: Ensure UART can wake up Zephyr after wfi in idle
Previously, running UART applications in Zephyr from sFlash would
not show consistent character output.
The PRCM clock enable for UART was missing the sleep mode while
enabling the UART clock.
This has been fixed, and verified with philosophers (polled output)
and shell (interrupt driven) zephyr examples running from sFlash.
Change-Id: I95a87996f252d82b0c1c13d3f77535971b5cf9c5
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
diff --git a/boards/arm/cc3200_launchxl/pinmux.c b/boards/arm/cc3200_launchxl/pinmux.c
index 629b3f6..1ea9cc3 100644
--- a/boards/arm/cc3200_launchxl/pinmux.c
+++ b/boards/arm/cc3200_launchxl/pinmux.c
@@ -73,8 +73,12 @@
ARG_UNUSED(port);
#ifdef CONFIG_UART_CC32XX
- /* Enable Peripheral Clocks */
- MAP_PRCMPeripheralClkEnable(PRCM_UARTA0, PRCM_RUN_MODE_CLK);
+ /*
+ * Enable Peripheral Clocks, ensuring UART can wake the processor from
+ * idle (after ARM wfi instruction)
+ */
+ MAP_PRCMPeripheralClkEnable(PRCM_UARTA0, PRCM_RUN_MODE_CLK |
+ PRCM_SLP_MODE_CLK);
/* Configure PIN_55 for UART0 UART0_TX */
MAP_PinTypeUART(PIN_55, PIN_MODE_3);