From d60214f8d7051446201b3c77a5fd826ed814c4ce Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 10 Sep 2024 23:35:13 +0000 Subject: [PATCH] Update Zephyr MSDK Hal based on MSDK PR: https://github.com/analogdevicesinc/msdk/pull/1164 --- MAX/Libraries/PeriphDrivers/Source/UART/uart_ai87.c | 5 +++++ MAX/Libraries/PeriphDrivers/Source/UART/uart_me12.c | 3 +++ MAX/Libraries/PeriphDrivers/Source/UART/uart_me30.c | 3 +++ MAX/Libraries/PeriphDrivers/Source/UART/uart_me55.c | 3 +++ MAX/msdk_sha | 2 +- 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/MAX/Libraries/PeriphDrivers/Source/UART/uart_ai87.c b/MAX/Libraries/PeriphDrivers/Source/UART/uart_ai87.c index dfba30b..b9ff550 100644 --- a/MAX/Libraries/PeriphDrivers/Source/UART/uart_ai87.c +++ b/MAX/Libraries/PeriphDrivers/Source/UART/uart_ai87.c @@ -141,6 +141,11 @@ int MXC_UART_SetFrequency(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clo return E_BAD_PARAM; } + // Default OSR + // Setting LPUART Over-Sampling Rate in MXC_UART_RevB_SetFrequency function overwrites + // the sampling rate set below for the ERTCO. + uart->osr = 5; + unsigned int input_clock_freq = 0; switch (clock) { case MXC_UART_APB_CLK: diff --git a/MAX/Libraries/PeriphDrivers/Source/UART/uart_me12.c b/MAX/Libraries/PeriphDrivers/Source/UART/uart_me12.c index 23d9f75..c685f50 100644 --- a/MAX/Libraries/PeriphDrivers/Source/UART/uart_me12.c +++ b/MAX/Libraries/PeriphDrivers/Source/UART/uart_me12.c @@ -110,6 +110,9 @@ int MXC_UART_SetFrequency(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clo return E_BAD_PARAM; } + // Default OSR + uart->osr = 5; + switch (clock) { case MXC_UART_APB_CLK: clock_freq = SystemCoreClock / 2; diff --git a/MAX/Libraries/PeriphDrivers/Source/UART/uart_me30.c b/MAX/Libraries/PeriphDrivers/Source/UART/uart_me30.c index a54f770..9963fa8 100644 --- a/MAX/Libraries/PeriphDrivers/Source/UART/uart_me30.c +++ b/MAX/Libraries/PeriphDrivers/Source/UART/uart_me30.c @@ -113,6 +113,9 @@ int MXC_UART_SetFrequency(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clo return E_BAD_PARAM; } + // Default OSR + uart->osr = 5; + switch (clock) { case MXC_UART_APB_CLK: clock_freq = PeripheralClock; diff --git a/MAX/Libraries/PeriphDrivers/Source/UART/uart_me55.c b/MAX/Libraries/PeriphDrivers/Source/UART/uart_me55.c index d04def9..4662b16 100644 --- a/MAX/Libraries/PeriphDrivers/Source/UART/uart_me55.c +++ b/MAX/Libraries/PeriphDrivers/Source/UART/uart_me55.c @@ -127,6 +127,9 @@ int MXC_UART_SetFrequency(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clo return E_BAD_PARAM; } + // Default OSR + uart->osr = 5; + switch (clock) { case MXC_UART_APB_CLK: clock_freq = SystemCoreClock / 2; diff --git a/MAX/msdk_sha b/MAX/msdk_sha index 91ddc38..41b7577 100644 --- a/MAX/msdk_sha +++ b/MAX/msdk_sha @@ -1 +1 @@ -4664d3bad376c6c1f14515a4f3d5f229c3f50432 +11dfd2e78540a6b07796a898d5c82978302acaf1