From c9396365e96a7a6e84b9254012a089a60db62b49 Mon Sep 17 00:00:00 2001 From: Kevin Gillespie Date: Tue, 3 Dec 2024 15:34:34 -0600 Subject: [PATCH 01/15] Adding build flag -mno-unaligned-access. --- Libraries/CMSIS/Device/Maxim/MAX32657/Source/GCC/max32657.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Libraries/CMSIS/Device/Maxim/MAX32657/Source/GCC/max32657.mk b/Libraries/CMSIS/Device/Maxim/MAX32657/Source/GCC/max32657.mk index f238fb9607..12ad01308f 100644 --- a/Libraries/CMSIS/Device/Maxim/MAX32657/Source/GCC/max32657.mk +++ b/Libraries/CMSIS/Device/Maxim/MAX32657/Source/GCC/max32657.mk @@ -227,6 +227,8 @@ MCPU := cortex-m33 # Single-precision with 16 double-word registers MFPU := fpv5-sp-d16 +PROJ_CFLAGS += -mno-unaligned-access + # Include the rules and goals for building include $(CMSIS_ROOT)/Device/Maxim/GCC/gcc.mk From 948c120ce880c48d5606711df723db3bb6505239 Mon Sep 17 00:00:00 2001 From: Kevin Gillespie Date: Tue, 3 Dec 2024 15:58:25 -0600 Subject: [PATCH 02/15] Adding mallinfo function. --- .../CMSIS/Device/Maxim/MAX32657/Source/heap.c | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/Libraries/CMSIS/Device/Maxim/MAX32657/Source/heap.c b/Libraries/CMSIS/Device/Maxim/MAX32657/Source/heap.c index 80559e9503..4409f35aff 100644 --- a/Libraries/CMSIS/Device/Maxim/MAX32657/Source/heap.c +++ b/Libraries/CMSIS/Device/Maxim/MAX32657/Source/heap.c @@ -21,6 +21,7 @@ #include #include #include +#include /* sbrk @@ -48,3 +49,79 @@ caddr_t _sbrk(int incr) return (caddr_t)prev_heap_end; } + +// struct mallinfo { +// size_t arena; /* total space allocated from system */ +// size_t ordblks; /* number of non-inuse chunks */ +// size_t smblks; /* unused -- always zero */ +// size_t hblks; /* number of mmapped regions */ +// size_t hblkhd; /* total space in mmapped regions */ +// size_t usmblks; /* unused -- always zero */ +// size_t fsmblks; /* unused -- always zero */ +// size_t uordblks; /* total allocated space */ +// size_t fordblks; /* total non-inuse space */ +// size_t keepcost; /* top-most, releasable (via malloc_trim) space */ +// }; + +/* +The structure fields contain the following information: + + arena The total amount of memory allocated by means other than + mmap(2) (i.e., memory allocated on the heap). This figure + includes both in-use blocks and blocks on the free list. + + ordblks + The number of ordinary (i.e., non-fastbin) free blocks. + + smblks The number of fastbin free blocks (see mallopt(3)). + + hblks The number of blocks currently allocated using mmap(2). + (See the discussion of M_MMAP_THRESHOLD in mallopt(3).) + + hblkhd The number of bytes in blocks currently allocated using + mmap(2). + + usmblks + This field is unused, and is always 0. Historically, it + was the "highwater mark" for allocated space—that is, the + maximum amount of space that was ever allocated (in + bytes); this field was maintained only in nonthreading + environments. + + fsmblks + The total number of bytes in fastbin free blocks. + + uordblks + The total number of bytes used by in-use allocations. + + fordblks + The total number of bytes in free blocks. + + keepcost + The total amount of releasable free space at the top of + the heap. This is the maximum number of bytes that could + ideally (i.e., ignoring page alignment restrictions, and + so on) be released by malloc_trim(3). +*/ + +struct mallinfo mallinfo(void) +{ + struct mallinfo temp_mallinfo; + + if (heap_end == 0) { + heap_end = (caddr_t)&__HeapBase; + } + + temp_mallinfo.arena = ((size_t)&__HeapLimit - (size_t)&__HeapBase); + temp_mallinfo.ordblks = 0; /* Unused */ + temp_mallinfo.smblks = 0; /* Unused */ + temp_mallinfo.hblks = 0; /* Unused */ + temp_mallinfo.hblkhd = 0; /* Unused */ + temp_mallinfo.usmblks = 0; /* Unused */ + temp_mallinfo.fsmblks = 0; /* Unused */ + temp_mallinfo.uordblks = (size_t)heap_end - (size_t)&__HeapBase; + temp_mallinfo.fordblks = (size_t)&__HeapLimit - (size_t)heap_end; + temp_mallinfo.keepcost = 0 /* Unused */; + + return temp_mallinfo; +} From c87494489624526aafd3dfb4282b388c530fa454 Mon Sep 17 00:00:00 2001 From: Kevin Gillespie Date: Tue, 3 Dec 2024 15:58:44 -0600 Subject: [PATCH 03/15] Adding call to PalSysInit. --- .../CMSIS/Device/Maxim/MAX32657/Source/system_max32657.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Libraries/CMSIS/Device/Maxim/MAX32657/Source/system_max32657.c b/Libraries/CMSIS/Device/Maxim/MAX32657/Source/system_max32657.c index 5e24e6a32e..966d96d9c1 100644 --- a/Libraries/CMSIS/Device/Maxim/MAX32657/Source/system_max32657.c +++ b/Libraries/CMSIS/Device/Maxim/MAX32657/Source/system_max32657.c @@ -131,6 +131,9 @@ __weak int Board_Init(void) return 0; } +/* This function is used for the Bluetooth stack initialization */ +__weak void PalSysInit(void) {} + /** * This function is called just before control is transferred to main(). * @@ -182,6 +185,8 @@ __weak void SystemInit(void) PinInit(); Board_Init(); + + PalSysInit(); } #if defined(__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) From 45b3083a5f9c05f2fb572099b372bdab251f00ff Mon Sep 17 00:00:00 2001 From: Kevin Gillespie Date: Tue, 3 Dec 2024 16:07:09 -0600 Subject: [PATCH 04/15] Adding placeholder LED and push button. --- Libraries/Boards/MAX32657/EvKit_V1/Source/board.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/Boards/MAX32657/EvKit_V1/Source/board.c b/Libraries/Boards/MAX32657/EvKit_V1/Source/board.c index d646e717d7..a8688a0145 100644 --- a/Libraries/Boards/MAX32657/EvKit_V1/Source/board.c +++ b/Libraries/Boards/MAX32657/EvKit_V1/Source/board.c @@ -34,11 +34,13 @@ extern uint32_t SystemCoreClock; // clang-format off const mxc_gpio_cfg_t pb_pin[] = { // TODO(ME30): Add push-buttons + { MXC_GPIO0, MXC_GPIO_PIN_0, MXC_GPIO_FUNC_IN, MXC_GPIO_PAD_PULL_UP, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } }; const unsigned int num_pbs = (sizeof(pb_pin) / sizeof(mxc_gpio_cfg_t)); const mxc_gpio_cfg_t led_pin[] = { - // TODO(ME30): Add LEDs + // TODO(ME30): Add LED pins + { MXC_GPIO0, MXC_GPIO_PIN_1, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } }; const unsigned int num_leds = (sizeof(led_pin) / sizeof(mxc_gpio_cfg_t)); // clang-format on From 3c364dbf5988ac56bd78e0b6a15a532369bd4043 Mon Sep 17 00:00:00 2001 From: Kevin Gillespie Date: Tue, 3 Dec 2024 16:52:13 -0600 Subject: [PATCH 05/15] Setting the UART clock source bits. --- Libraries/PeriphDrivers/Source/UART/uart_me30.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Libraries/PeriphDrivers/Source/UART/uart_me30.c b/Libraries/PeriphDrivers/Source/UART/uart_me30.c index 9963fa8479..29e8043529 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_me30.c +++ b/Libraries/PeriphDrivers/Source/UART/uart_me30.c @@ -77,6 +77,11 @@ int MXC_UART_Init(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clock_t clo } #endif // MSDK_NO_GPIO_CLK_INIT + retval = MXC_UART_SetClockSource(uart, clock); + if (retval != E_NO_ERROR) { + return retval; + } + return MXC_UART_RevB_Init((mxc_uart_revb_regs_t *)uart, baud, clock); } @@ -173,7 +178,16 @@ int MXC_UART_SetFlowCtrl(mxc_uart_regs_t *uart, mxc_uart_flow_t flowCtrl, int rt int MXC_UART_SetClockSource(mxc_uart_regs_t *uart, mxc_uart_clock_t clock) { - return MXC_UART_RevB_SetClockSource((mxc_uart_revb_regs_t *)uart, clock); + switch (clock) { + case MXC_UART_APB_CLK: + return MXC_UART_RevB_SetClockSource((mxc_uart_revb_regs_t *)uart, 0); + + case MXC_UART_IBRO_CLK: + return MXC_UART_RevB_SetClockSource((mxc_uart_revb_regs_t *)uart, 1); + + default: + return E_BAD_PARAM; + } } int MXC_UART_GetActive(mxc_uart_regs_t *uart) From e19bc9c1125a39d50cd38ede6d9341722c7ab8eb Mon Sep 17 00:00:00 2001 From: EricB-ADI Date: Wed, 4 Dec 2024 16:10:48 -0600 Subject: [PATCH 06/15] disable trace enable debug in ble5_ctr --- Examples/MAX32657/Bluetooth/BLE5_ctr/project.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Examples/MAX32657/Bluetooth/BLE5_ctr/project.mk b/Examples/MAX32657/Bluetooth/BLE5_ctr/project.mk index f1de6ad0dd..0da48952d1 100644 --- a/Examples/MAX32657/Bluetooth/BLE5_ctr/project.mk +++ b/Examples/MAX32657/Bluetooth/BLE5_ctr/project.mk @@ -37,4 +37,5 @@ BLE_CONTROLLER = 1 # TRACE option # Set to 0 to disable # Set to 2 to enable serial port trace messages -TRACE = 2 +TRACE = 0 +DEBUG = 1 From ab8a6e05d26b27d86b40dd8fcf5fb6bd7254a227 Mon Sep 17 00:00:00 2001 From: Kevin Gillespie Date: Thu, 5 Dec 2024 10:21:09 -0600 Subject: [PATCH 07/15] Adding one remaining interrupt. --- Libraries/PeriphDrivers/Source/UART/uart_revb.c | 10 +++++----- Libraries/PeriphDrivers/Source/UART/uart_revb_regs.h | 6 ++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Libraries/PeriphDrivers/Source/UART/uart_revb.c b/Libraries/PeriphDrivers/Source/UART/uart_revb.c index 83e99ad081..49d3214e48 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_revb.c +++ b/Libraries/PeriphDrivers/Source/UART/uart_revb.c @@ -636,7 +636,7 @@ int MXC_UART_RevB_Transaction(mxc_uart_revb_req_t *req) while (req->txCnt < req->txLen) { while (!(MXC_UART_GetFlags((mxc_uart_regs_t *)(req->uart)) & - MXC_F_UART_REVB_INT_FL_TX_HE) && + (MXC_F_UART_REVB_INT_FL_TX_HE | MXC_F_UART_REVB_INT_FL_TX_OR)) && !(req->uart->status & MXC_F_UART_REVB_STATUS_TX_EM)) {} numToWrite = MXC_UART_GetTXFIFOAvailable((mxc_uart_regs_t *)(req->uart)); @@ -644,7 +644,7 @@ int MXC_UART_RevB_Transaction(mxc_uart_revb_req_t *req) numToWrite; req->txCnt += MXC_UART_WriteTXFIFO((mxc_uart_regs_t *)(req->uart), &req->txData[req->txCnt], numToWrite); - MXC_UART_ClearFlags((mxc_uart_regs_t *)(req->uart), MXC_F_UART_REVB_INT_FL_TX_HE); + MXC_UART_ClearFlags((mxc_uart_regs_t *)(req->uart), (MXC_F_UART_REVB_INT_FL_TX_HE | MXC_F_UART_REVB_INT_FL_TX_OR)); } } @@ -709,7 +709,7 @@ int MXC_UART_RevB_TransactionAsync(mxc_uart_revb_req_t *req) NVIC_SetPendingIRQ(MXC_UART_GET_IRQ(uart_num)); } else { /* Else enable the half empty interrupt */ - MXC_UART_EnableInt((mxc_uart_regs_t *)(req->uart), MXC_F_UART_REVB_INT_EN_TX_HE); + MXC_UART_EnableInt((mxc_uart_regs_t *)(req->uart), (MXC_F_UART_REVB_INT_EN_TX_HE | MXC_F_UART_REVB_INT_EN_TX_OR)); } } @@ -783,7 +783,7 @@ int MXC_UART_RevB_AsyncCallback(mxc_uart_revb_regs_t *uart, int retVal) int MXC_UART_RevB_AsyncStopTx(mxc_uart_revb_regs_t *uart) { - MXC_UART_DisableInt((mxc_uart_regs_t *)uart, MXC_F_UART_REVB_INT_EN_TX_HE); + MXC_UART_DisableInt((mxc_uart_regs_t *)uart, (MXC_F_UART_REVB_INT_EN_TX_HE | MXC_F_UART_REVB_INT_EN_TX_OR)); return E_NO_ERROR; } @@ -838,7 +838,7 @@ int MXC_UART_RevB_AsyncHandler(mxc_uart_revb_regs_t *uart) numToWrite = MXC_UART_WriteTXFIFO((mxc_uart_regs_t *)(req->uart), &req->txData[req->txCnt], numToWrite); req->txCnt += numToWrite; - MXC_UART_ClearFlags(req->uart, MXC_F_UART_REVB_INT_FL_TX_HE); + MXC_UART_ClearFlags(req->uart, (MXC_F_UART_REVB_INT_FL_TX_HE | MXC_F_UART_REVB_INT_FL_TX_OR)); } req = (mxc_uart_req_t *)AsyncRxRequests[uart_num]; diff --git a/Libraries/PeriphDrivers/Source/UART/uart_revb_regs.h b/Libraries/PeriphDrivers/Source/UART/uart_revb_regs.h index 061aad630a..d5a7cbe37b 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_revb_regs.h +++ b/Libraries/PeriphDrivers/Source/UART/uart_revb_regs.h @@ -239,6 +239,9 @@ typedef struct { #define MXC_F_UART_REVB_INT_EN_RX_THD_POS 4 /**< INT_EN_RX_THD Position */ #define MXC_F_UART_REVB_INT_EN_RX_THD ((uint32_t)(0x1UL << MXC_F_UART_REVB_INT_EN_RX_THD_POS)) /**< INT_EN_RX_THD Mask */ + #define MXC_F_UART_REVB_INT_EN_TX_OR_POS 5 /**< INT_EN_TX_OR Position */ + #define MXC_F_UART_REVB_INT_EN_TX_OR ((uint32_t)(0x1UL << MXC_F_UART_REVB_INT_EN_TX_OR_POS)) /**< INT_EN_TX_OR Mask */ + #define MXC_F_UART_REVB_INT_EN_TX_HE_POS 6 /**< INT_EN_TX_HE Position */ #define MXC_F_UART_REVB_INT_EN_TX_HE ((uint32_t)(0x1UL << MXC_F_UART_REVB_INT_EN_TX_HE_POS)) /**< INT_EN_TX_HE Mask */ @@ -265,6 +268,9 @@ typedef struct { #define MXC_F_UART_REVB_INT_FL_RX_THD_POS 4 /**< INT_FL_RX_THD Position */ #define MXC_F_UART_REVB_INT_FL_RX_THD ((uint32_t)(0x1UL << MXC_F_UART_REVB_INT_FL_RX_THD_POS)) /**< INT_FL_RX_THD Mask */ + #define MXC_F_UART_REVB_INT_FL_TX_OR_POS 5 /**< INT_FL_TX_OR Position */ + #define MXC_F_UART_REVB_INT_FL_TX_OR ((uint32_t)(0x1UL << MXC_F_UART_REVB_INT_FL_TX_OR_POS)) /**< INT_FL_TX_OR Mask */ + #define MXC_F_UART_REVB_INT_FL_TX_HE_POS 6 /**< INT_FL_TX_HE Position */ #define MXC_F_UART_REVB_INT_FL_TX_HE ((uint32_t)(0x1UL << MXC_F_UART_REVB_INT_FL_TX_HE_POS)) /**< INT_FL_TX_HE Mask */ From 6d07949bfd41623f15e23c4f88570b2aab9aa23a Mon Sep 17 00:00:00 2001 From: Kevin Gillespie Date: Fri, 6 Dec 2024 09:30:39 -0600 Subject: [PATCH 08/15] Fixing formatting. --- Libraries/PeriphDrivers/Source/UART/uart_revb.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Libraries/PeriphDrivers/Source/UART/uart_revb.c b/Libraries/PeriphDrivers/Source/UART/uart_revb.c index 49d3214e48..14a98f7cbf 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_revb.c +++ b/Libraries/PeriphDrivers/Source/UART/uart_revb.c @@ -644,7 +644,8 @@ int MXC_UART_RevB_Transaction(mxc_uart_revb_req_t *req) numToWrite; req->txCnt += MXC_UART_WriteTXFIFO((mxc_uart_regs_t *)(req->uart), &req->txData[req->txCnt], numToWrite); - MXC_UART_ClearFlags((mxc_uart_regs_t *)(req->uart), (MXC_F_UART_REVB_INT_FL_TX_HE | MXC_F_UART_REVB_INT_FL_TX_OR)); + MXC_UART_ClearFlags((mxc_uart_regs_t *)(req->uart), + (MXC_F_UART_REVB_INT_FL_TX_HE | MXC_F_UART_REVB_INT_FL_TX_OR)); } } @@ -709,7 +710,8 @@ int MXC_UART_RevB_TransactionAsync(mxc_uart_revb_req_t *req) NVIC_SetPendingIRQ(MXC_UART_GET_IRQ(uart_num)); } else { /* Else enable the half empty interrupt */ - MXC_UART_EnableInt((mxc_uart_regs_t *)(req->uart), (MXC_F_UART_REVB_INT_EN_TX_HE | MXC_F_UART_REVB_INT_EN_TX_OR)); + MXC_UART_EnableInt((mxc_uart_regs_t *)(req->uart), + (MXC_F_UART_REVB_INT_EN_TX_HE | MXC_F_UART_REVB_INT_EN_TX_OR)); } } @@ -783,7 +785,8 @@ int MXC_UART_RevB_AsyncCallback(mxc_uart_revb_regs_t *uart, int retVal) int MXC_UART_RevB_AsyncStopTx(mxc_uart_revb_regs_t *uart) { - MXC_UART_DisableInt((mxc_uart_regs_t *)uart, (MXC_F_UART_REVB_INT_EN_TX_HE | MXC_F_UART_REVB_INT_EN_TX_OR)); + MXC_UART_DisableInt((mxc_uart_regs_t *)uart, + (MXC_F_UART_REVB_INT_EN_TX_HE | MXC_F_UART_REVB_INT_EN_TX_OR)); return E_NO_ERROR; } @@ -838,7 +841,8 @@ int MXC_UART_RevB_AsyncHandler(mxc_uart_revb_regs_t *uart) numToWrite = MXC_UART_WriteTXFIFO((mxc_uart_regs_t *)(req->uart), &req->txData[req->txCnt], numToWrite); req->txCnt += numToWrite; - MXC_UART_ClearFlags(req->uart, (MXC_F_UART_REVB_INT_FL_TX_HE | MXC_F_UART_REVB_INT_FL_TX_OR)); + MXC_UART_ClearFlags(req->uart, + (MXC_F_UART_REVB_INT_FL_TX_HE | MXC_F_UART_REVB_INT_FL_TX_OR)); } req = (mxc_uart_req_t *)AsyncRxRequests[uart_num]; From 8c5cee37063ff410f4bd0b2d122052f9aa18dab8 Mon Sep 17 00:00:00 2001 From: Kevin Gillespie Date: Fri, 6 Dec 2024 10:21:35 -0600 Subject: [PATCH 09/15] Enabling ICC. --- .../CMSIS/Device/Maxim/MAX32657/Source/system_max32657.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Libraries/CMSIS/Device/Maxim/MAX32657/Source/system_max32657.c b/Libraries/CMSIS/Device/Maxim/MAX32657/Source/system_max32657.c index 966d96d9c1..b286490f62 100644 --- a/Libraries/CMSIS/Device/Maxim/MAX32657/Source/system_max32657.c +++ b/Libraries/CMSIS/Device/Maxim/MAX32657/Source/system_max32657.c @@ -26,6 +26,7 @@ #include "system_max32657.h" #include "gcr_regs.h" #include "mpc.h" +#include "icc.h" #if defined(__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) #include "partition_max32657.h" @@ -175,8 +176,8 @@ __weak void SystemInit(void) /* Enable interrupts */ __enable_irq(); - // TODO(ICC): Enable the internal cache controller after testing. - // MXC_ICC_Enable(); + // Enable the internal cache controller. + MXC_ICC_Enable(); /* Change system clock source to the main high-speed clock */ MXC_SYS_Clock_Select(MXC_SYS_CLOCK_IPO); From cd6abdf6f8dde455877da0f2066ecb765f1f4122 Mon Sep 17 00:00:00 2001 From: EricB-ADI Date: Fri, 6 Dec 2024 10:37:55 -0600 Subject: [PATCH 10/15] added WLP Bench Board Folder --- .../Boards/MAX32657/WLP_Bench/Include/board.h | 88 ++++++++++++ .../Boards/MAX32657/WLP_Bench/Source/board.c | 127 ++++++++++++++++++ .../Boards/MAX32657/WLP_Bench/adapters.txt | 2 + Libraries/Boards/MAX32657/WLP_Bench/board.mk | 41 ++++++ .../Boards/MAX32657/WLP_Bench/examples.txt | 1 + .../Boards/MAX32657/WLP_Bench/target.txt | 1 + 6 files changed, 260 insertions(+) create mode 100644 Libraries/Boards/MAX32657/WLP_Bench/Include/board.h create mode 100644 Libraries/Boards/MAX32657/WLP_Bench/Source/board.c create mode 100644 Libraries/Boards/MAX32657/WLP_Bench/adapters.txt create mode 100644 Libraries/Boards/MAX32657/WLP_Bench/board.mk create mode 100644 Libraries/Boards/MAX32657/WLP_Bench/examples.txt create mode 100644 Libraries/Boards/MAX32657/WLP_Bench/target.txt diff --git a/Libraries/Boards/MAX32657/WLP_Bench/Include/board.h b/Libraries/Boards/MAX32657/WLP_Bench/Include/board.h new file mode 100644 index 0000000000..1cb5f8006d --- /dev/null +++ b/Libraries/Boards/MAX32657/WLP_Bench/Include/board.h @@ -0,0 +1,88 @@ +/****************************************************************************** + * + * Copyright (C) 2024 Analog Devices, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/** + * @file board.h + * @brief Board support package API. + */ + +#include + +// TODO(ME30): Update this file to match first EVKIT + +#ifndef LIBRARIES_BOARDS_MAX32657_EVKIT_V1_INCLUDE_BOARD_H_ +#define LIBRARIES_BOARDS_MAX32657_EVKIT_V1_INCLUDE_BOARD_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef CONSOLE_UART +#define CONSOLE_UART 0 /// UART instance to use for console +#endif + +#ifndef CONSOLE_BAUD +#define CONSOLE_BAUD 115200 /// Console baud rate +#endif + +#ifdef LED_OFF +#undef LED_OFF +#endif +#define LED_OFF 1 /// Override inactive state of LEDs + +#ifdef LED_ON +#undef LED_ON +#endif +#define LED_ON 0 /// Override active state of LEDs + +#define LED1 0 +#define LED_RED LED1 + +#define LED2 1 +#define LED_GREEN LED2 + +/** + * \brief Initialize the BSP and board interfaces. + * \returns #E_NO_ERROR if everything is successful + */ +int Board_Init(void); + +/** + * \brief Initialize or reinitialize the console. This may be necessary if the + * system clock rate is changed. + * \returns #E_NO_ERROR if everything is successful + */ +int Console_Init(void); + +/** + * \brief Shutdown the console. + * \returns #E_NO_ERROR if everything is successful + */ +int Console_Shutdown(void); + +/** + * \brief Attempt to prepare the console for sleep. + * \returns #E_NO_ERROR if ready to sleep, #E_BUSY if not ready for sleep. + */ +int Console_PrepForSleep(void); + +#ifdef __cplusplus +} +#endif + +#endif // LIBRARIES_BOARDS_MAX32657_EVKIT_V1_INCLUDE_BOARD_H_ diff --git a/Libraries/Boards/MAX32657/WLP_Bench/Source/board.c b/Libraries/Boards/MAX32657/WLP_Bench/Source/board.c new file mode 100644 index 0000000000..b564ef2fe3 --- /dev/null +++ b/Libraries/Boards/MAX32657/WLP_Bench/Source/board.c @@ -0,0 +1,127 @@ +/****************************************************************************** + * + * Copyright (C) 2024 Analog Devices, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +#include +#include "mxc_device.h" +#include "mxc_sys.h" +#include "mxc_assert.h" +#include "board.h" +#include "uart.h" +#include "gpio.h" +#include "mxc_pins.h" +#include "led.h" +#include "pb.h" + +/***** Global Variables *****/ +mxc_uart_regs_t *ConsoleUart = MXC_UART_GET_UART(CONSOLE_UART); +extern uint32_t SystemCoreClock; + +// clang-format off +const mxc_gpio_cfg_t pb_pin[] = { + // TODO(ME30): Add push-buttons + { MXC_GPIO0, MXC_GPIO_PIN_0, MXC_GPIO_FUNC_IN, MXC_GPIO_PAD_PULL_UP, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } +}; +const unsigned int num_pbs = (sizeof(pb_pin) / sizeof(mxc_gpio_cfg_t)); + +const mxc_gpio_cfg_t led_pin[] = { + // System LED + { MXC_GPIO0, MXC_GPIO_PIN_1, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } + { MXC_GPIO0, MXC_GPIO_PIN_8, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } + + //BLE Debug + { MXC_GPIO0, MXC_GPIO_PIN_10, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } // TX + { MXC_GPIO0, MXC_GPIO_PIN_11, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } // RX + { MXC_GPIO0, MXC_GPIO_PIN_12, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } // RX OK + { MXC_GPIO0, MXC_GPIO_PIN_13, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } // RX Timeout + { MXC_GPIO0, MXC_GPIO_PIN_2, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } // RX CRC FAIL + { MXC_GPIO0, MXC_GPIO_PIN_7, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } // BB ISR + +}; +const unsigned int num_leds = (sizeof(led_pin) / sizeof(mxc_gpio_cfg_t)); +// clang-format on + +/***** File Scope Variables *****/ + +/******************************************************************************/ +void mxc_assert(const char *expr, const char *file, int line) +{ + printf("MXC_ASSERT %s #%d: (%s)\n", file, line, expr); + + while (1) {} +} + +/******************************************************************************/ +/** + * NOTE: This weak definition is included to support Push Button interrupts in + * case the user does not define this interrupt handler in their application. + **/ +__weak void GPIO0_IRQHandler(void) +{ + MXC_GPIO_Handler(MXC_GPIO_GET_IDX(MXC_GPIO0)); +} + +/******************************************************************************/ +int Board_Init(void) +{ + int err; + + if ((err = Console_Init()) < E_NO_ERROR) { + return err; + } + + if ((err = PB_Init()) != E_NO_ERROR) { + MXC_ASSERT_FAIL(); + return err; + } + + if ((err = LED_Init()) != E_NO_ERROR) { + MXC_ASSERT_FAIL(); + return err; + } + + return E_NO_ERROR; +} + +/******************************************************************************/ +int Console_Init(void) +{ + int err; + + if ((err = MXC_UART_Init(ConsoleUart, CONSOLE_BAUD, MXC_UART_APB_CLK)) != E_NO_ERROR) { + return err; + } + + return E_NO_ERROR; +} + +int Console_Shutdown(void) +{ + int err; + + if ((err = MXC_UART_Shutdown(ConsoleUart)) != E_NO_ERROR) { + return err; + } + + return E_NO_ERROR; +} + +/******************************************************************************/ +void NMI_Handler(void) +{ + __NOP(); +} diff --git a/Libraries/Boards/MAX32657/WLP_Bench/adapters.txt b/Libraries/Boards/MAX32657/WLP_Bench/adapters.txt new file mode 100644 index 0000000000..9ee4ed2a72 --- /dev/null +++ b/Libraries/Boards/MAX32657/WLP_Bench/adapters.txt @@ -0,0 +1,2 @@ +CMSIS-DAP, interface/cmsis-dap.cfg +MAX32625_PICO, interface/cmsis-dap.cfg \ No newline at end of file diff --git a/Libraries/Boards/MAX32657/WLP_Bench/board.mk b/Libraries/Boards/MAX32657/WLP_Bench/board.mk new file mode 100644 index 0000000000..15d6244287 --- /dev/null +++ b/Libraries/Boards/MAX32657/WLP_Bench/board.mk @@ -0,0 +1,41 @@ +############################################################################### + # + # Copyright (C) 2024 Analog Devices, Inc. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + ############################################################################## + +ifeq "$(BOARD_DIR)" "" +BOARD_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) +endif + +# Source files for this test (add path to VPATH below) +SRCS += board.c +SRCS += stdio.c +SRCS += led.c +SRCS += pb.c + +MISC_DRIVERS_DIR ?= $(MAXIM_PATH)/Libraries/MiscDrivers + +# Where to find BSP source files +VPATH += $(BOARD_DIR)/Source +VPATH += $(MISC_DRIVERS_DIR) +VPATH += $(MISC_DRIVERS_DIR)/LED +VPATH += $(MISC_DRIVERS_DIR)/PushButton + +# Where to find BSP header files +IPATH += $(BOARD_DIR)/Include +IPATH += $(MISC_DRIVERS_DIR) +IPATH += $(MISC_DRIVERS_DIR)/LED +IPATH += $(MISC_DRIVERS_DIR)/PushButton diff --git a/Libraries/Boards/MAX32657/WLP_Bench/examples.txt b/Libraries/Boards/MAX32657/WLP_Bench/examples.txt new file mode 100644 index 0000000000..b74d7d85b6 --- /dev/null +++ b/Libraries/Boards/MAX32657/WLP_Bench/examples.txt @@ -0,0 +1 @@ +TODO: Add list of supported examples diff --git a/Libraries/Boards/MAX32657/WLP_Bench/target.txt b/Libraries/Boards/MAX32657/WLP_Bench/target.txt new file mode 100644 index 0000000000..22a5ea5b25 --- /dev/null +++ b/Libraries/Boards/MAX32657/WLP_Bench/target.txt @@ -0,0 +1 @@ +max32657.cfg From 43ce3962ea7d70f763d33cc5c933a0f805e68601 Mon Sep 17 00:00:00 2001 From: EricB-ADI Date: Fri, 6 Dec 2024 10:40:54 -0600 Subject: [PATCH 11/15] fixed board file --- Libraries/Boards/MAX32657/WLP_Bench/Source/board.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Libraries/Boards/MAX32657/WLP_Bench/Source/board.c b/Libraries/Boards/MAX32657/WLP_Bench/Source/board.c index b564ef2fe3..0ff2ad98f4 100644 --- a/Libraries/Boards/MAX32657/WLP_Bench/Source/board.c +++ b/Libraries/Boards/MAX32657/WLP_Bench/Source/board.c @@ -40,15 +40,15 @@ const unsigned int num_pbs = (sizeof(pb_pin) / sizeof(mxc_gpio_cfg_t)); const mxc_gpio_cfg_t led_pin[] = { // System LED - { MXC_GPIO0, MXC_GPIO_PIN_1, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } - { MXC_GPIO0, MXC_GPIO_PIN_8, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } + { MXC_GPIO0, MXC_GPIO_PIN_1, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }, + { MXC_GPIO0, MXC_GPIO_PIN_8, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }, //BLE Debug - { MXC_GPIO0, MXC_GPIO_PIN_10, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } // TX - { MXC_GPIO0, MXC_GPIO_PIN_11, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } // RX - { MXC_GPIO0, MXC_GPIO_PIN_12, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } // RX OK - { MXC_GPIO0, MXC_GPIO_PIN_13, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } // RX Timeout - { MXC_GPIO0, MXC_GPIO_PIN_2, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } // RX CRC FAIL + { MXC_GPIO0, MXC_GPIO_PIN_10, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }, // TX + { MXC_GPIO0, MXC_GPIO_PIN_11, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }, // RX + { MXC_GPIO0, MXC_GPIO_PIN_12, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }, // RX OK + { MXC_GPIO0, MXC_GPIO_PIN_13, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }, // RX Timeout + { MXC_GPIO0, MXC_GPIO_PIN_2, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }, // RX CRC FAIL { MXC_GPIO0, MXC_GPIO_PIN_7, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } // BB ISR }; From 0b3b5c76852dfbec9faabb74875b10f852802c1d Mon Sep 17 00:00:00 2001 From: EricB-ADI Date: Fri, 6 Dec 2024 11:00:01 -0600 Subject: [PATCH 12/15] add isr led as option --- Libraries/Cordio/platform/include/pal_led.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Libraries/Cordio/platform/include/pal_led.h b/Libraries/Cordio/platform/include/pal_led.h index c7bb1ff5f5..e0da35182e 100644 --- a/Libraries/Cordio/platform/include/pal_led.h +++ b/Libraries/Cordio/platform/include/pal_led.h @@ -49,8 +49,11 @@ enum PalLedReserved_id PAL_LED_ID_BB_RX_OK = 0x4, /*!< Baseband RX success impulse. */ PAL_LED_ID_BB_RX_TO = 0x5, /*!< Baseband RX timeout impulse. */ PAL_LED_ID_BB_RX_CRC = 0x6, /*!< Baseband RX CRC error impulse. */ + PAL_LED_ID_BB_ISR = 0x7, /*!< Baseband ISR impulse. */ + }; + /************************************************************************************************** Function Declarations **************************************************************************************************/ From 7311d6d8cc86a5b51827be9be1df8317713c887d Mon Sep 17 00:00:00 2001 From: Kevin Gillespie Date: Tue, 10 Dec 2024 15:01:07 -0600 Subject: [PATCH 13/15] Fixing comments. --- Libraries/Boards/MAX32657/WLP_Bench/Include/board.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Libraries/Boards/MAX32657/WLP_Bench/Include/board.h b/Libraries/Boards/MAX32657/WLP_Bench/Include/board.h index 1cb5f8006d..8979b40035 100644 --- a/Libraries/Boards/MAX32657/WLP_Bench/Include/board.h +++ b/Libraries/Boards/MAX32657/WLP_Bench/Include/board.h @@ -23,10 +23,8 @@ #include -// TODO(ME30): Update this file to match first EVKIT - -#ifndef LIBRARIES_BOARDS_MAX32657_EVKIT_V1_INCLUDE_BOARD_H_ -#define LIBRARIES_BOARDS_MAX32657_EVKIT_V1_INCLUDE_BOARD_H_ +#ifndef LIBRARIES_BOARDS_MAX32657_WLP_BENCH_INCLUDE_BOARD_H_ +#define LIBRARIES_BOARDS_MAX32657_WLP_BENCH_INCLUDE_BOARD_H_ #ifdef __cplusplus extern "C" { @@ -85,4 +83,4 @@ int Console_PrepForSleep(void); } #endif -#endif // LIBRARIES_BOARDS_MAX32657_EVKIT_V1_INCLUDE_BOARD_H_ +#endif // LIBRARIES_BOARDS_MAX32657_WLP_BENCH_INCLUDE_BOARD_H_ From bb8072f60f59d0cb97dd32d8bca08289603688a0 Mon Sep 17 00:00:00 2001 From: Kevin Gillespie Date: Tue, 10 Dec 2024 15:26:56 -0600 Subject: [PATCH 14/15] Fixing formatting. --- Libraries/Boards/MAX32657/WLP_Bench/Source/board.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Libraries/Boards/MAX32657/WLP_Bench/Source/board.c b/Libraries/Boards/MAX32657/WLP_Bench/Source/board.c index 0ff2ad98f4..845b61e34e 100644 --- a/Libraries/Boards/MAX32657/WLP_Bench/Source/board.c +++ b/Libraries/Boards/MAX32657/WLP_Bench/Source/board.c @@ -45,12 +45,11 @@ const mxc_gpio_cfg_t led_pin[] = { //BLE Debug { MXC_GPIO0, MXC_GPIO_PIN_10, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }, // TX - { MXC_GPIO0, MXC_GPIO_PIN_11, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }, // RX + { MXC_GPIO0, MXC_GPIO_PIN_11, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }, // RX { MXC_GPIO0, MXC_GPIO_PIN_12, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }, // RX OK { MXC_GPIO0, MXC_GPIO_PIN_13, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }, // RX Timeout { MXC_GPIO0, MXC_GPIO_PIN_2, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 }, // RX CRC FAIL { MXC_GPIO0, MXC_GPIO_PIN_7, MXC_GPIO_FUNC_OUT, MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 } // BB ISR - }; const unsigned int num_leds = (sizeof(led_pin) / sizeof(mxc_gpio_cfg_t)); // clang-format on From e08a0c9ac86eac86cb60cb0318a66ac04ee7a6b0 Mon Sep 17 00:00:00 2001 From: Kevin Gillespie Date: Tue, 17 Dec 2024 09:44:10 -0600 Subject: [PATCH 15/15] Renaming OR to OB. --- Libraries/PeriphDrivers/Source/UART/uart_revb.c | 10 +++++----- Libraries/PeriphDrivers/Source/UART/uart_revb_regs.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Libraries/PeriphDrivers/Source/UART/uart_revb.c b/Libraries/PeriphDrivers/Source/UART/uart_revb.c index 14a98f7cbf..49522049c4 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_revb.c +++ b/Libraries/PeriphDrivers/Source/UART/uart_revb.c @@ -636,7 +636,7 @@ int MXC_UART_RevB_Transaction(mxc_uart_revb_req_t *req) while (req->txCnt < req->txLen) { while (!(MXC_UART_GetFlags((mxc_uart_regs_t *)(req->uart)) & - (MXC_F_UART_REVB_INT_FL_TX_HE | MXC_F_UART_REVB_INT_FL_TX_OR)) && + (MXC_F_UART_REVB_INT_FL_TX_HE | MXC_F_UART_REVB_INT_FL_TX_OB)) && !(req->uart->status & MXC_F_UART_REVB_STATUS_TX_EM)) {} numToWrite = MXC_UART_GetTXFIFOAvailable((mxc_uart_regs_t *)(req->uart)); @@ -645,7 +645,7 @@ int MXC_UART_RevB_Transaction(mxc_uart_revb_req_t *req) req->txCnt += MXC_UART_WriteTXFIFO((mxc_uart_regs_t *)(req->uart), &req->txData[req->txCnt], numToWrite); MXC_UART_ClearFlags((mxc_uart_regs_t *)(req->uart), - (MXC_F_UART_REVB_INT_FL_TX_HE | MXC_F_UART_REVB_INT_FL_TX_OR)); + (MXC_F_UART_REVB_INT_FL_TX_HE | MXC_F_UART_REVB_INT_FL_TX_OB)); } } @@ -711,7 +711,7 @@ int MXC_UART_RevB_TransactionAsync(mxc_uart_revb_req_t *req) } else { /* Else enable the half empty interrupt */ MXC_UART_EnableInt((mxc_uart_regs_t *)(req->uart), - (MXC_F_UART_REVB_INT_EN_TX_HE | MXC_F_UART_REVB_INT_EN_TX_OR)); + (MXC_F_UART_REVB_INT_EN_TX_HE | MXC_F_UART_REVB_INT_EN_TX_OB)); } } @@ -786,7 +786,7 @@ int MXC_UART_RevB_AsyncCallback(mxc_uart_revb_regs_t *uart, int retVal) int MXC_UART_RevB_AsyncStopTx(mxc_uart_revb_regs_t *uart) { MXC_UART_DisableInt((mxc_uart_regs_t *)uart, - (MXC_F_UART_REVB_INT_EN_TX_HE | MXC_F_UART_REVB_INT_EN_TX_OR)); + (MXC_F_UART_REVB_INT_EN_TX_HE | MXC_F_UART_REVB_INT_EN_TX_OB)); return E_NO_ERROR; } @@ -842,7 +842,7 @@ int MXC_UART_RevB_AsyncHandler(mxc_uart_revb_regs_t *uart) numToWrite); req->txCnt += numToWrite; MXC_UART_ClearFlags(req->uart, - (MXC_F_UART_REVB_INT_FL_TX_HE | MXC_F_UART_REVB_INT_FL_TX_OR)); + (MXC_F_UART_REVB_INT_FL_TX_HE | MXC_F_UART_REVB_INT_FL_TX_OB)); } req = (mxc_uart_req_t *)AsyncRxRequests[uart_num]; diff --git a/Libraries/PeriphDrivers/Source/UART/uart_revb_regs.h b/Libraries/PeriphDrivers/Source/UART/uart_revb_regs.h index d5a7cbe37b..ff2e8c77e9 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_revb_regs.h +++ b/Libraries/PeriphDrivers/Source/UART/uart_revb_regs.h @@ -239,8 +239,8 @@ typedef struct { #define MXC_F_UART_REVB_INT_EN_RX_THD_POS 4 /**< INT_EN_RX_THD Position */ #define MXC_F_UART_REVB_INT_EN_RX_THD ((uint32_t)(0x1UL << MXC_F_UART_REVB_INT_EN_RX_THD_POS)) /**< INT_EN_RX_THD Mask */ - #define MXC_F_UART_REVB_INT_EN_TX_OR_POS 5 /**< INT_EN_TX_OR Position */ - #define MXC_F_UART_REVB_INT_EN_TX_OR ((uint32_t)(0x1UL << MXC_F_UART_REVB_INT_EN_TX_OR_POS)) /**< INT_EN_TX_OR Mask */ + #define MXC_F_UART_REVB_INT_EN_TX_OB_POS 5 /**< INT_EN_TX_OB Position */ + #define MXC_F_UART_REVB_INT_EN_TX_OB ((uint32_t)(0x1UL << MXC_F_UART_REVB_INT_EN_TX_OB_POS)) /**< INT_EN_TX_OB Mask */ #define MXC_F_UART_REVB_INT_EN_TX_HE_POS 6 /**< INT_EN_TX_HE Position */ #define MXC_F_UART_REVB_INT_EN_TX_HE ((uint32_t)(0x1UL << MXC_F_UART_REVB_INT_EN_TX_HE_POS)) /**< INT_EN_TX_HE Mask */ @@ -268,8 +268,8 @@ typedef struct { #define MXC_F_UART_REVB_INT_FL_RX_THD_POS 4 /**< INT_FL_RX_THD Position */ #define MXC_F_UART_REVB_INT_FL_RX_THD ((uint32_t)(0x1UL << MXC_F_UART_REVB_INT_FL_RX_THD_POS)) /**< INT_FL_RX_THD Mask */ - #define MXC_F_UART_REVB_INT_FL_TX_OR_POS 5 /**< INT_FL_TX_OR Position */ - #define MXC_F_UART_REVB_INT_FL_TX_OR ((uint32_t)(0x1UL << MXC_F_UART_REVB_INT_FL_TX_OR_POS)) /**< INT_FL_TX_OR Mask */ + #define MXC_F_UART_REVB_INT_FL_TX_OB_POS 5 /**< INT_FL_TX_OB Position */ + #define MXC_F_UART_REVB_INT_FL_TX_OB ((uint32_t)(0x1UL << MXC_F_UART_REVB_INT_FL_TX_OB_POS)) /**< INT_FL_TX_OB Mask */ #define MXC_F_UART_REVB_INT_FL_TX_HE_POS 6 /**< INT_FL_TX_HE Position */ #define MXC_F_UART_REVB_INT_FL_TX_HE ((uint32_t)(0x1UL << MXC_F_UART_REVB_INT_FL_TX_HE_POS)) /**< INT_FL_TX_HE Mask */