From 26b3600b0ff1c9b3d3bd26d840e71472249edf2d Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 15 Nov 2024 20:29:45 +0000 Subject: [PATCH] Update Zephyr MSDK Hal based on MSDK PR: https://github.com/analogdevicesinc/msdk/pull/1272 --- MAX/Libraries/PeriphDrivers/Include/MAX32675/mxc_pins.h | 3 +++ MAX/Libraries/PeriphDrivers/Include/MAX32680/mxc_pins.h | 2 ++ MAX/Libraries/PeriphDrivers/Source/AFE/hart_uart.c | 4 ++-- MAX/Libraries/PeriphDrivers/Source/SYS/pins_me16.c | 4 ++++ MAX/Libraries/PeriphDrivers/Source/SYS/pins_me20.c | 4 ++++ MAX/msdk_sha | 2 +- 6 files changed, 16 insertions(+), 3 deletions(-) diff --git a/MAX/Libraries/PeriphDrivers/Include/MAX32675/mxc_pins.h b/MAX/Libraries/PeriphDrivers/Include/MAX32675/mxc_pins.h index 37004110..344dbe93 100644 --- a/MAX/Libraries/PeriphDrivers/Include/MAX32675/mxc_pins.h +++ b/MAX/Libraries/PeriphDrivers/Include/MAX32675/mxc_pins.h @@ -44,6 +44,9 @@ extern const mxc_gpio_cfg_t gpio_cfg_uart0_flow; extern const mxc_gpio_cfg_t gpio_cfg_uart0_flow_disable; extern const mxc_gpio_cfg_t gpio_cfg_uart1; extern const mxc_gpio_cfg_t gpio_cfg_uart1_flow; + +extern const mxc_gpio_cfg_t gpio_cfg_hart; + extern const mxc_gpio_cfg_t gpio_cfg_uart2; extern const mxc_gpio_cfg_t gpio_cfg_uart2_flow; extern const mxc_gpio_cfg_t gpio_cfg_uart2_flow_disable; diff --git a/MAX/Libraries/PeriphDrivers/Include/MAX32680/mxc_pins.h b/MAX/Libraries/PeriphDrivers/Include/MAX32680/mxc_pins.h index 45028d36..5289f4de 100644 --- a/MAX/Libraries/PeriphDrivers/Include/MAX32680/mxc_pins.h +++ b/MAX/Libraries/PeriphDrivers/Include/MAX32680/mxc_pins.h @@ -41,6 +41,8 @@ extern const mxc_gpio_cfg_t gpio_cfg_i2c2; extern const mxc_gpio_cfg_t gpio_cfg_i2c2b; extern const mxc_gpio_cfg_t gpio_cfg_i2c2c; +extern const mxc_gpio_cfg_t gpio_cfg_hart; + extern const mxc_gpio_cfg_t gpio_cfg_uart0; extern const mxc_gpio_cfg_t gpio_cfg_uart0_flow; extern const mxc_gpio_cfg_t gpio_cfg_uart0_flow_disable; diff --git a/MAX/Libraries/PeriphDrivers/Source/AFE/hart_uart.c b/MAX/Libraries/PeriphDrivers/Source/AFE/hart_uart.c index c1782bae..4cd3fa8c 100644 --- a/MAX/Libraries/PeriphDrivers/Source/AFE/hart_uart.c +++ b/MAX/Libraries/PeriphDrivers/Source/AFE/hart_uart.c @@ -193,12 +193,12 @@ static int hart_uart_init(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clo switch (MXC_UART_GET_IDX(uart)) { case 0: - MXC_AFE_GPIO_Config(&gpio_cfg_uart0); + MXC_AFE_GPIO_Config(&gpio_cfg_hart); MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_UART0); break; case 2: - MXC_AFE_GPIO_Config(&gpio_cfg_uart2); + MXC_AFE_GPIO_Config(&gpio_cfg_hart); MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_UART2); break; diff --git a/MAX/Libraries/PeriphDrivers/Source/SYS/pins_me16.c b/MAX/Libraries/PeriphDrivers/Source/SYS/pins_me16.c index 5a897c98..0fd55ce6 100644 --- a/MAX/Libraries/PeriphDrivers/Source/SYS/pins_me16.c +++ b/MAX/Libraries/PeriphDrivers/Source/SYS/pins_me16.c @@ -55,6 +55,10 @@ const mxc_gpio_cfg_t gpio_cfg_uart1_flow = { MXC_GPIO0, (MXC_GPIO_PIN_30 | MXC_G const mxc_gpio_cfg_t gpio_cfg_uart1_flow_disable = { MXC_GPIO0, (MXC_GPIO_PIN_30 | MXC_GPIO_PIN_31), MXC_GPIO_FUNC_IN, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }; +// NOTE: UART2 mapping B is tied to HART modem in the AFE and cannot be moved. +const mxc_gpio_cfg_t gpio_cfg_hart = { MXC_GPIO0, (MXC_GPIO_PIN_14 | MXC_GPIO_PIN_15), MXC_GPIO_FUNC_ALT2, + MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }; + const mxc_gpio_cfg_t gpio_cfg_uart2 = { MXC_GPIO1, (MXC_GPIO_PIN_8 | MXC_GPIO_PIN_9), MXC_GPIO_FUNC_ALT1, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }; const mxc_gpio_cfg_t gpio_cfg_uart2_flow = { MXC_GPIO1, (MXC_GPIO_PIN_10 | MXC_GPIO_PIN_11), MXC_GPIO_FUNC_ALT1, diff --git a/MAX/Libraries/PeriphDrivers/Source/SYS/pins_me20.c b/MAX/Libraries/PeriphDrivers/Source/SYS/pins_me20.c index ecb6a2f7..f3247bfd 100644 --- a/MAX/Libraries/PeriphDrivers/Source/SYS/pins_me20.c +++ b/MAX/Libraries/PeriphDrivers/Source/SYS/pins_me20.c @@ -41,6 +41,10 @@ const mxc_gpio_cfg_t gpio_cfg_i2c1 = { MXC_GPIO0, (MXC_GPIO_PIN_16 | MXC_GPIO_PI const mxc_gpio_cfg_t gpio_cfg_i2c2 = { MXC_GPIO0, (MXC_GPIO_PIN_30 | MXC_GPIO_PIN_31), MXC_GPIO_FUNC_ALT1, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }; +// NOTE: UART0 is tied to HART modem in the AFE and cannot be moved. +const mxc_gpio_cfg_t gpio_cfg_hart = { MXC_GPIO0, (MXC_GPIO_PIN_0 | MXC_GPIO_PIN_1), MXC_GPIO_FUNC_ALT1, + MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }; + const mxc_gpio_cfg_t gpio_cfg_uart0 = { MXC_GPIO0, (MXC_GPIO_PIN_0 | MXC_GPIO_PIN_1), MXC_GPIO_FUNC_ALT1, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }; const mxc_gpio_cfg_t gpio_cfg_uart0_flow = { MXC_GPIO0, (MXC_GPIO_PIN_2 | MXC_GPIO_PIN_3), MXC_GPIO_FUNC_ALT2, diff --git a/MAX/msdk_sha b/MAX/msdk_sha index ee8f2cde..e2ac06fd 100644 --- a/MAX/msdk_sha +++ b/MAX/msdk_sha @@ -1 +1 @@ -3eba814816893de7f3d57359fc436b9b8234670e +7500d4f154aee84e0b6010e2bdae1ba0555bc976