From 1bb1c7985652fa44876ebfad00360f773f1bc762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Sat, 17 Mar 2018 10:08:41 +0100 Subject: [PATCH] boards: Add UART LLWU config to Kinetis boards --- boards/common/kw41z/include/periph_conf_common.h | 7 +++++-- boards/frdm-k22f/include/periph_conf.h | 1 + boards/frdm-k64f/include/periph_conf.h | 1 + boards/mulle/include/periph_conf.h | 2 ++ boards/pba-d-01-kw2x/include/periph_conf.h | 2 ++ boards/teensy31/include/periph_conf.h | 2 ++ 6 files changed, 13 insertions(+), 2 deletions(-) diff --git a/boards/common/kw41z/include/periph_conf_common.h b/boards/common/kw41z/include/periph_conf_common.h index 0df5c16cf000c..811df7333068e 100644 --- a/boards/common/kw41z/include/periph_conf_common.h +++ b/boards/common/kw41z/include/periph_conf_common.h @@ -115,12 +115,15 @@ static const uart_conf_t uart_config[] = { .scgc_bit = SIM_SCGC5_LPUART0_SHIFT, .mode = UART_MODE_8N1, .type = KINETIS_LPUART, + .llwu_rx = LLWU_WAKEUP_PIN_PTC6, }, }; #define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0])) #define LPUART_0_ISR isr_lpuart0 -/* Use MCGIRCLK (internal reference 4 MHz clock) */ -#define LPUART_0_SRC 3 +/* Use MCGIRCLK (4 MHz internal reference - not available <= KINETIS_PM_LLS) */ +#define LPUART_0_SRC 3 +#define UART_CLOCK_PM_BLOCKER KINETIS_PM_LLS +#define UART_MAX_UNCLOCKED_BAUDRATE 19200ul /** @} */ /** diff --git a/boards/frdm-k22f/include/periph_conf.h b/boards/frdm-k22f/include/periph_conf.h index 1e44cdb58207a..264d320919908 100644 --- a/boards/frdm-k22f/include/periph_conf.h +++ b/boards/frdm-k22f/include/periph_conf.h @@ -114,6 +114,7 @@ static const uart_conf_t uart_config[] = { .scgc_bit = SIM_SCGC4_UART1_SHIFT, .mode = UART_MODE_8N1, .type = KINETIS_UART, + .llwu_rx = LLWU_WAKEUP_PIN_PTE1, }, { .dev = UART0, diff --git a/boards/frdm-k64f/include/periph_conf.h b/boards/frdm-k64f/include/periph_conf.h index 41561aaa32dfb..3b054b0fd19f0 100644 --- a/boards/frdm-k64f/include/periph_conf.h +++ b/boards/frdm-k64f/include/periph_conf.h @@ -115,6 +115,7 @@ static const uart_conf_t uart_config[] = { .scgc_bit = SIM_SCGC4_UART0_SHIFT, .mode = UART_MODE_8N1, .type = KINETIS_UART, + .llwu_rx = LLWU_WAKEUP_PIN_UNDEF, }, }; diff --git a/boards/mulle/include/periph_conf.h b/boards/mulle/include/periph_conf.h index fa35056f1e556..21368f1b165ff 100644 --- a/boards/mulle/include/periph_conf.h +++ b/boards/mulle/include/periph_conf.h @@ -138,6 +138,7 @@ static const uart_conf_t uart_config[] = { .scgc_bit = SIM_SCGC4_UART0_SHIFT, .mode = UART_MODE_8N1, .type = KINETIS_UART, + .llwu_rx = LLWU_WAKEUP_PIN_UNDEF, }, { .dev = UART1, @@ -151,6 +152,7 @@ static const uart_conf_t uart_config[] = { .scgc_bit = SIM_SCGC4_UART1_SHIFT, .mode = UART_MODE_8N1, .type = KINETIS_UART, + .llwu_rx = LLWU_WAKEUP_PIN_PTC3, }, }; diff --git a/boards/pba-d-01-kw2x/include/periph_conf.h b/boards/pba-d-01-kw2x/include/periph_conf.h index c8afe2c38c3ea..11598625321eb 100644 --- a/boards/pba-d-01-kw2x/include/periph_conf.h +++ b/boards/pba-d-01-kw2x/include/periph_conf.h @@ -108,6 +108,7 @@ static const uart_conf_t uart_config[] = { .scgc_bit = SIM_SCGC4_UART2_SHIFT, .mode = UART_MODE_8N1, .type = KINETIS_UART, + .llwu_rx = LLWU_WAKEUP_PIN_PTD2, }, { .dev = UART0, @@ -121,6 +122,7 @@ static const uart_conf_t uart_config[] = { .scgc_bit = SIM_SCGC4_UART0_SHIFT, .mode = UART_MODE_8N1, .type = KINETIS_UART, + .llwu_rx = LLWU_WAKEUP_PIN_PTD6, } }; diff --git a/boards/teensy31/include/periph_conf.h b/boards/teensy31/include/periph_conf.h index c9024e04dd800..c87900b6fb6f8 100644 --- a/boards/teensy31/include/periph_conf.h +++ b/boards/teensy31/include/periph_conf.h @@ -113,6 +113,7 @@ static const uart_conf_t uart_config[] = { .scgc_bit = SIM_SCGC4_UART0_SHIFT, .mode = UART_MODE_8N1, .type = KINETIS_UART, + .llwu_rx = LLWU_WAKEUP_PIN_UNDEF, }, { .dev = UART1, @@ -126,6 +127,7 @@ static const uart_conf_t uart_config[] = { .scgc_bit = SIM_SCGC4_UART1_SHIFT, .mode = UART_MODE_8N1, .type = KINETIS_UART, + .llwu_rx = LLWU_WAKEUP_PIN_PTC3, }, };