Skip to content

Commit

Permalink
Merge branch 'main' into fix/me18-uart-dma
Browse files Browse the repository at this point in the history
  • Loading branch information
crsz20 committed Nov 26, 2024
2 parents a5e6d4e + 98f390c commit dc04dbc
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Examples/MAX32657/Bluetooth/BLE5_ctr/project.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
LIB_CORDIO = 1

CORDIO_DIR = $(LIBS_DIR)/Packetcraft-ADI
RF_PHY_DIR = $(LIBS_DIR)/RF-PHY
LIB_PHY_DIR ?= $(LIBS_DIR)/RF-PHY

# Cordio library options
BLE_HOST = 0
Expand Down
3 changes: 3 additions & 0 deletions Libraries/PeriphDrivers/Include/MAX32675/mxc_pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions Libraries/PeriphDrivers/Include/MAX32680/mxc_pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Libraries/PeriphDrivers/Source/AFE/hart_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 4 additions & 0 deletions Libraries/PeriphDrivers/Source/SYS/pins_me16.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions Libraries/PeriphDrivers/Source/SYS/pins_me20.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion Libraries/libs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ INIT_EXTENDED ?= 0
# Default directory for libphy
LIB_PHY_DIR ?= $(LIBS_DIR)/BlePhy

BLE_API ?= Cordio
# Include the Cordio Library
CORDIO_DIR ?= $(LIBS_DIR)/Cordio
CORDIO_DIR ?= $(LIBS_DIR)/$(BLE_API)
include $(CORDIO_DIR)/platform/targets/maxim/build/cordio_lib.mk
PROJ_CFLAGS += -D__CORDIO__

Expand Down

0 comments on commit dc04dbc

Please sign in to comment.