Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/ALL_BSP_COMPILE.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@
"nxp/mcx/mcxa/frdm-mcxa153",
"nxp/mcx/mcxa/frdm-mcxa156",
"nxp/mcx/mcxa/frdm-mcxa346",
"nxp/mcx/mcxa/frdm-mcxa366",
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[custom/类别]: 🟡 [PR Title/PR 标题] Missing required prefix format

English: The PR title should follow the RT-Thread convention in lowercase, e.g. [nxp][mcx] ... or [nxp][bsp] .... Current title add nxp frdm-mcxa366 support has no prefix, which makes it harder to route/review.
中文:PR 标题应遵循 RT-Thread 约定的小写前缀格式,例如 [nxp][mcx] ...[nxp][bsp] ...。当前标题 add nxp frdm-mcxa366 support 缺少前缀,影响分类与审查。

Copilot generated this review using guidance from repository custom instructions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR 标题应遵循 RT-Thread 约定的小写前缀格式,例如 [nxp][mcx] ... 或 [nxp][bsp] ...。当前标题 add nxp frdm-mcxa366 support 缺少前缀,影响分类与审查。

Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[custom/类别]: 🟡 [PR Description/PR 描述] Description template not filled (missing What/Why/How and test info)

English: The PR description still contains the required template placeholders (square-bracket block) and does not state what changed, why it’s needed, and what BSP/config was verified (including any CI/action link). Please fill these sections so reviewers can validate the BSP support.
中文:PR 描述仍保留必须替换的模板占位内容(方括号块),且未说明 What/Why/How 以及已验证的 BSP/.config 与测试/CI 链接。请补全这些信息,便于审查与验证。

Copilot generated this review using guidance from repository custom instructions.
"nxp/mcx/mcxe/frdm-mcxe247",
"renesas/ebf_qi_min_6m5",
"renesas/ra6m4-cpk",
Expand Down
13 changes: 9 additions & 4 deletions bsp/nxp/mcx/mcxa/Libraries/drivers/drv_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
#define DBG_LVL DBG_INFO
#include <rtdbg.h>

#if (defined(CPU_MCXA346VLH) || defined(CPU_MCXA346VLL) || defined(CPU_MCXA346VLQ) || defined(CPU_MCXA346VPN) || \
defined(CPU_MCXA366VLH) || defined(CPU_MCXA366VLL) || defined(CPU_MCXA366VLQ) || defined(CPU_MCXA366VPN))
#define MCXA_I2C_USE_FRO_LF_DIV
#endif

enum
{
#ifdef BSP_USING_I2C0
Expand Down Expand Up @@ -55,7 +60,7 @@ struct lpc_i2c_bus lpc_obj[] =
{
.I2C = LPI2C0,
.baud = 100000U,
#if (defined(CPU_MCXA346VLH) || defined(CPU_MCXA346VLL) || defined(CPU_MCXA346VLQ) || defined(CPU_MCXA346VPN))
#if defined(MCXA_I2C_USE_FRO_LF_DIV)
.clock_attach_id = kFRO_LF_DIV_to_LPI2C0,
#else
.clock_attach_id = kFRO12M_to_LPI2C0,
Expand All @@ -69,7 +74,7 @@ struct lpc_i2c_bus lpc_obj[] =
{
.I2C = LPI2C1,
.baud = 100000U,
#if (defined(CPU_MCXA346VLH) || defined(CPU_MCXA346VLL) || defined(CPU_MCXA346VLQ) || defined(CPU_MCXA346VPN))
#if defined(MCXA_I2C_USE_FRO_LF_DIV)
.clock_attach_id = kFRO_LF_DIV_to_LPI2C1,
#else
.clock_attach_id = kFRO12M_to_LPI2C1,
Expand All @@ -83,7 +88,7 @@ struct lpc_i2c_bus lpc_obj[] =
{
.I2C = LPI2C2,
.baud = 100000U,
#if (defined(CPU_MCXA346VLH) || defined(CPU_MCXA346VLL) || defined(CPU_MCXA346VLQ) || defined(CPU_MCXA346VPN))
#if defined(MCXA_I2C_USE_FRO_LF_DIV)
.clock_attach_id = kFRO_LF_DIV_to_LPI2C2,
#else
.clock_attach_id = kFRO12M_to_LPI2C2,
Expand All @@ -97,7 +102,7 @@ struct lpc_i2c_bus lpc_obj[] =
{
.I2C = LPI2C3,
.baud = 100000U,
#if (defined(CPU_MCXA346VLH) || defined(CPU_MCXA346VLL) || defined(CPU_MCXA346VLQ) || defined(CPU_MCXA346VPN))
#if defined(MCXA_I2C_USE_FRO_LF_DIV)
.clock_attach_id = kFRO_LF_DIV_to_LPI2C3,
#else
.clock_attach_id = kFRO12M_to_LPI2C3,
Expand Down
19 changes: 16 additions & 3 deletions bsp/nxp/mcx/mcxa/Libraries/drivers/drv_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
#define DBG_LVL DBG_INFO
#include <rtdbg.h>

#if (defined(CPU_MCXA346VLH) || defined(CPU_MCXA346VLL) || defined(CPU_MCXA346VLQ) || defined(CPU_MCXA346VPN) || \
defined(CPU_MCXA366VLH) || defined(CPU_MCXA366VLL) || defined(CPU_MCXA366VLQ) || defined(CPU_MCXA366VPN))
#define MCXA_SPI_USE_FRO_LF_DIV
#endif

enum
{
#ifdef BSP_USING_SPI0
Expand Down Expand Up @@ -46,7 +51,7 @@ static struct lpc_spi lpc_obj[] =
#ifdef BSP_USING_SPI0
{
.LPSPIx = LPSPI0,
#if (defined(CPU_MCXA346VLH) || defined(CPU_MCXA346VLL) || defined(CPU_MCXA346VLQ) || defined(CPU_MCXA346VPN))
#if defined(MCXA_SPI_USE_FRO_LF_DIV)
kFRO_LF_DIV_to_LPSPI0,
#else
.clock_attach_id = kFRO12M_to_LPSPI0,
Expand All @@ -59,7 +64,7 @@ static struct lpc_spi lpc_obj[] =
#ifdef BSP_USING_SPI1
{
.LPSPIx = LPSPI1,
#if (defined(CPU_MCXA346VLH) || defined(CPU_MCXA346VLL) || defined(CPU_MCXA346VLQ) || defined(CPU_MCXA346VPN))
#if defined(MCXA_SPI_USE_FRO_LF_DIV)
kFRO_LF_DIV_to_LPSPI1,
#else
.clock_attach_id = kFRO12M_to_LPSPI1,
Expand All @@ -74,12 +79,20 @@ static struct lpc_spi lpc_obj[] =
rt_err_t rt_hw_spi_device_attach(const char *bus_name, const char *device_name, rt_uint32_t pin)
{
struct rt_spi_device *spi_device = rt_malloc(sizeof(struct rt_spi_device));
rt_err_t ret;

if (!spi_device)
{
return -RT_ENOMEM;
}

return rt_spi_bus_attach_device_cspin(spi_device, device_name, bus_name, pin, NULL);
ret = rt_spi_bus_attach_device_cspin(spi_device, device_name, bus_name, pin, NULL);
if (ret != RT_EOK)
{
rt_free(spi_device);
}

return ret;
}

static rt_err_t spi_configure(struct rt_spi_device *device, struct rt_spi_configuration *cfg)
Expand Down
11 changes: 8 additions & 3 deletions bsp/nxp/mcx/mcxa/Libraries/drivers/drv_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
#define DBG_LVL DBG_INFO
#include <rtdbg.h>

#if (defined(CPU_MCXA346VLH) || defined(CPU_MCXA346VLL) || defined(CPU_MCXA346VLQ) || defined(CPU_MCXA346VPN) || \
defined(CPU_MCXA366VLH) || defined(CPU_MCXA366VLL) || defined(CPU_MCXA366VLQ) || defined(CPU_MCXA366VPN))
#define MCXA_UART_USE_FRO_LF_DIV
#endif

struct mcx_uart
{
struct rt_serial_device *serial;
Expand Down Expand Up @@ -65,7 +70,7 @@ static const struct mcx_uart uarts[] =
LPUART0,
LPUART0_IRQn,
kCLOCK_Fro12M,
#if (defined(CPU_MCXA346VLH) || defined(CPU_MCXA346VLL) || defined(CPU_MCXA346VLQ) || defined(CPU_MCXA346VPN))
#if defined(MCXA_UART_USE_FRO_LF_DIV)
kFRO_LF_DIV_to_LPUART0,
#else
kFRO12M_to_LPUART0,
Expand All @@ -81,7 +86,7 @@ static const struct mcx_uart uarts[] =
LPUART1,
LPUART1_IRQn,
kCLOCK_Fro12M,
#if (defined(CPU_MCXA346VLH) || defined(CPU_MCXA346VLL) || defined(CPU_MCXA346VLQ) || defined(CPU_MCXA346VPN))
#if defined(MCXA_UART_USE_FRO_LF_DIV)
kFRO_LF_DIV_to_LPUART1,
#else
kFRO12M_to_LPUART1,
Expand All @@ -97,7 +102,7 @@ static const struct mcx_uart uarts[] =
LPUART2,
LPUART2_IRQn,
kCLOCK_Fro12M,
#if (defined(CPU_MCXA346VLH) || defined(CPU_MCXA346VLL) || defined(CPU_MCXA346VLQ) || defined(CPU_MCXA346VPN))
#if defined(MCXA_UART_USE_FRO_LF_DIV)
kFRO_LF_DIV_to_LPUART2,
#else
kFRO12M_to_LPUART2,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
scons.args: &scons
scons_arg:
- '--strict'

# ------ component CI ------
component.can:
kconfig:
- CONFIG_BSP_USING_CAN=y
- CONFIG_BSP_USING_CAN0=y

# ------ Peripheral CI ------
Peripheral.arduino:
kconfig:
- CONFIG_BSP_USING_ARDUINO=y

Loading