Skip to content

Commit 74c1de4

Browse files
committed
hal_nxp: Sync 25.06 MCX to hal_nxp
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1 parent 750eba2 commit 74c1de4

File tree

1,456 files changed

+619033
-13585
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,456 files changed

+619033
-13585
lines changed

mcux/mcux-sdk-ng/devices/MCX/LICENSE

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright 1997-2016 Freescale Semiconductor, Inc
2+
Copyright 2016-2024 NXP
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
7+
1. Redistributions of source code must retain the above copyright notice, this
8+
list of conditions and the following disclaimer.
9+
10+
2. Redistributions in binary form must reproduce the above copyright notice,
11+
this list of conditions and the following disclaimer in the documentation
12+
and/or other materials provided with the distribution.
13+
14+
3. Neither the name of the copyright holder nor the names of its contributors
15+
may be used to endorse or promote products derived from this software without
16+
specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

mcux/mcux-sdk-ng/devices/MCX/MCXA/MCXA132/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#### device spepcific drivers
77
include(${SdkRootDirPath}/devices/arm/device_header.cmake)
8-
mcux_add_cmakelists(${SdkRootDirPath}/devices/MCX/MCXA/MCXA153/drivers)
8+
mcux_add_cmakelists(${SdkRootDirPath}/${device_root}/MCX/MCXA/MCXA153/drivers)
99

1010
#### MCX shared drivers/components/middlewares, project segments
1111
include(${SdkRootDirPath}/devices/MCX/shared.cmake)

mcux/mcux-sdk-ng/devices/MCX/MCXA/MCXA132/MCXA132.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
** MCUXpresso Compiler
1111
**
1212
** Reference manual: MCXA1 User manual
13-
** Version: rev. 1.0, 2022-03-29
14-
** Build: b241017
13+
** Version: rev. 2.0, 2024-10-29
14+
** Build: b250521
1515
**
1616
** Abstract:
1717
** CMSIS Peripheral Access Layer for MCXA132
1818
**
1919
** Copyright 1997-2016 Freescale Semiconductor, Inc.
20-
** Copyright 2016-2024 NXP
20+
** Copyright 2016-2025 NXP
2121
** SPDX-License-Identifier: BSD-3-Clause
2222
**
2323
** http: www.nxp.com
@@ -26,14 +26,17 @@
2626
** Revisions:
2727
** - rev. 1.0 (2022-03-29)
2828
** Initial version based on v0.1UM
29+
** - rev. 2.0 (2024-10-29)
30+
** Change the device header file from single flat file to multiple files based on peripherals,
31+
** each peripheral with dedicated header file located in periphN folder.
2932
**
3033
** ###################################################################
3134
*/
3235

3336
/*!
3437
* @file MCXA132.h
35-
* @version 1.0
36-
* @date 2022-03-29
38+
* @version 2.0
39+
* @date 2024-10-29
3740
* @brief CMSIS Peripheral Access Layer for MCXA132
3841
*
3942
* CMSIS Peripheral Access Layer for MCXA132

mcux/mcux-sdk-ng/devices/MCX/MCXA/MCXA132/MCXA132_COMMON.h

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
** MCUXpresso Compiler
1111
**
1212
** Reference manual: MCXA1 User manual
13-
** Version: rev. 1.0, 2022-03-29
14-
** Build: b241017
13+
** Version: rev. 2.0, 2024-10-29
14+
** Build: b250521
1515
**
1616
** Abstract:
1717
** CMSIS Peripheral Access Layer for MCXA132
1818
**
1919
** Copyright 1997-2016 Freescale Semiconductor, Inc.
20-
** Copyright 2016-2024 NXP
20+
** Copyright 2016-2025 NXP
2121
** SPDX-License-Identifier: BSD-3-Clause
2222
**
2323
** http: www.nxp.com
@@ -26,14 +26,17 @@
2626
** Revisions:
2727
** - rev. 1.0 (2022-03-29)
2828
** Initial version based on v0.1UM
29+
** - rev. 2.0 (2024-10-29)
30+
** Change the device header file from single flat file to multiple files based on peripherals,
31+
** each peripheral with dedicated header file located in periphN folder.
2932
**
3033
** ###################################################################
3134
*/
3235

3336
/*!
3437
* @file MCXA132_COMMON.h
35-
* @version 1.0
36-
* @date 2022-03-29
38+
* @version 2.0
39+
* @date 2024-10-29
3740
* @brief CMSIS Peripheral Access Layer for MCXA132
3841
*
3942
* CMSIS Peripheral Access Layer for MCXA132
@@ -44,7 +47,7 @@
4447

4548
/** Memory map major version (memory maps with equal major version number are
4649
* compatible) */
47-
#define MCU_MEM_MAP_VERSION 0x0100U
50+
#define MCU_MEM_MAP_VERSION 0x0200U
4851
/** Memory map minor version */
4952
#define MCU_MEM_MAP_VERSION_MINOR 0x0000U
5053

@@ -189,7 +192,9 @@ typedef enum IRQn {
189192
*/ /* end of group Cortex_Core_Configuration */
190193

191194

195+
#ifndef MCXA132_SERIES
192196
#define MCXA132_SERIES
197+
#endif
193198
/* CPU specific feature definitions */
194199
#include "MCXA132_features.h"
195200

mcux/mcux-sdk-ng/devices/MCX/MCXA/MCXA132/MCXA132_features.h

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*
22
** ###################################################################
33
** Version: rev. 1.0, 2022-03-29
4-
** Build: b241031
4+
** Build: b250512
55
**
66
** Abstract:
77
** Chip specific module features.
88
**
99
** Copyright 2016 Freescale Semiconductor, Inc.
10-
** Copyright 2016-2024 NXP
10+
** Copyright 2016-2025 NXP
1111
** SPDX-License-Identifier: BSD-3-Clause
1212
**
1313
** http: www.nxp.com
@@ -88,6 +88,8 @@
8888

8989
/* @brief FIFO availability on the SoC. */
9090
#define FSL_FEATURE_LPADC_FIFO_COUNT (1)
91+
/* @brief Does not support two simultanious single ended conversions (bitfield TCTRL[FIFO_SEL_B]). */
92+
#define FSL_FEATURE_LPADC_HAS_NO_TCTRL_FIFO_SEL_B (1)
9193
/* @brief Has subsequent trigger priority (bitfield CFG[TPRICTRL]). */
9294
#define FSL_FEATURE_LPADC_HAS_CFG_SUBSEQUENT_PRIORITY (1)
9395
/* @brief Has differential mode (bitfield CMDLn[DIFF]). */
@@ -98,8 +100,6 @@
98100
#define FSL_FEATURE_LPADC_HAS_CMDL_CTYPE (1)
99101
/* @brief Has conversion resolution select (bitfield CMDLn[MODE]). */
100102
#define FSL_FEATURE_LPADC_HAS_CMDL_MODE (1)
101-
/* @brief Has compare function enable (bitfield CMDHn[CMPEN]). */
102-
#define FSL_FEATURE_LPADC_HAS_CMDH_CMPEN (1)
103103
/* @brief Has Wait for trigger assertion before execution (bitfield CMDHn[WAIT_TRIG]). */
104104
#define FSL_FEATURE_LPADC_HAS_CMDH_WAIT_TRIG (1)
105105
/* @brief Has offset calibration (bitfield CTRL[CALOFS]). */
@@ -108,8 +108,6 @@
108108
#define FSL_FEATURE_LPADC_HAS_CTRL_CAL_REQ (1)
109109
/* @brief Has calibration average (bitfield CTRL[CAL_AVGS]). */
110110
#define FSL_FEATURE_LPADC_HAS_CTRL_CAL_AVGS (1)
111-
/* @brief Has High Speed Mode Trim Request (bitfield CTRL[CALHS]). */
112-
#define FSL_FEATURE_LPADC_HAS_CTRL_CALHS (1)
113111
/* @brief Has internal clock (bitfield CFG[ADCKEN]). */
114112
#define FSL_FEATURE_LPADC_HAS_CFG_ADCKEN (0)
115113
/* @brief Enable support for low voltage reference on option 1 reference (bitfield CFG[VREF1RNG]). */
@@ -118,10 +116,6 @@
118116
#define FSL_FEATURE_LPADC_HAS_CFG_CALOFS (0)
119117
/* @brief Has offset trim (register OFSTRIM). */
120118
#define FSL_FEATURE_LPADC_HAS_OFSTRIM (1)
121-
/* @brief OFSTRIM availability on the SoC. */
122-
#define FSL_FEATURE_LPADC_OFSTRIM_COUNT (1)
123-
/* @brief Has Trigger status register. */
124-
#define FSL_FEATURE_LPADC_HAS_TSTAT (1)
125119
/* @brief Has power select (bitfield CFG[PWRSEL]). */
126120
#define FSL_FEATURE_LPADC_HAS_CFG_PWRSEL (1)
127121
/* @brief Has alternate channel B scale (bitfield CMDLn[ALTB_CSCALE]). */
@@ -134,6 +128,12 @@
134128
#define FSL_FEATURE_LPADC_HAS_CTRL_CALOFSMODE (0)
135129
/* @brief Conversion averaged bitfiled width. */
136130
#define FSL_FEATURE_LPADC_CONVERSIONS_AVERAGED_BITFIELD_WIDTH (4)
131+
/* @brief Enable hardware trigger command selection */
132+
#define FSL_FEATURE_LPADC_HAS_TCTRL_CMD_SEL (0)
133+
/* @brief OFSTRIM availability on the SoC. */
134+
#define FSL_FEATURE_LPADC_OFSTRIM_COUNT (1)
135+
/* @brief Has Trigger status register. */
136+
#define FSL_FEATURE_LPADC_HAS_TSTAT (1)
137137
/* @brief Has B side channels. */
138138
#define FSL_FEATURE_LPADC_HAS_B_SIDE_CHANNELS (0)
139139
/* @brief Indicate whether the LPADC STAT register has trigger exception interrupt function (bitfield STAT[TEXC_INT]). */
@@ -156,6 +156,10 @@
156156
#define FSL_FEATURE_LPADC_HAS_CFG_HPT_EXDI (1)
157157
/* @brief Indicate LPADC CFG register TPRICTRL bitfield width. */
158158
#define FSL_FEATURE_LPADC_CFG_TPRICTRL_BITFIELD_WIDTH (2)
159+
/* @brief Has compare function enable (bitfield CMDHn[CMPEN]). */
160+
#define FSL_FEATURE_LPADC_HAS_CMDH_CMPEN (1)
161+
/* @brief Has High Speed Mode Trim Request (bitfield CTRL[CALHS]). */
162+
#define FSL_FEATURE_LPADC_HAS_CTRL_CALHS (1)
159163

160164
/* AOI module features */
161165

@@ -166,8 +170,10 @@
166170

167171
/* CDOG module features */
168172

169-
/* @brief CDOG Has No Reset */
173+
/* @brief SOC has no reset driver. */
170174
#define FSL_FEATURE_CDOG_HAS_NO_RESET (1)
175+
/* @brief CDOG Load default configurations during init function */
176+
#define FSL_FEATURE_CDOG_NEED_LOAD_DEFAULT_CONF (0)
171177

172178
/* CMC module features */
173179

@@ -352,6 +358,12 @@
352358
#define FSL_FEATURE_I3C_HAS_HDROK (1)
353359
/* @brief SOC doesn't support slave IBI/MR/HJ. */
354360
#define FSL_FEATURE_I3C_HAS_NO_SLAVE_IBI_MR_HJ (0)
361+
/* @brief Has ERRATA_051617. */
362+
#define FSL_FEATURE_I3C_HAS_ERRATA_051617 (0)
363+
/* @brief Has ERRATA_052123. */
364+
#define FSL_FEATURE_I3C_HAS_ERRATA_052123 (0)
365+
/* @brief Has ERRATA_052086. */
366+
#define FSL_FEATURE_I3C_HAS_ERRATA_052086 (0)
355367
/* @brief Has IBI bytes. */
356368
#define FSL_FEATURE_I3C_HAS_IBI_PAYLOAD_SIZE_OPTIONAL_BYTE (1)
357369
/* @brief Has SCL delay after START. */
@@ -365,18 +377,20 @@
365377
#define FSL_FEATURE_LPI2C_HAS_SEPARATE_DMA_RX_TX_REQn(x) (1)
366378
/* @brief Capacity (number of entries) of the transmit/receive FIFO (or zero if no FIFO is available). */
367379
#define FSL_FEATURE_LPI2C_FIFO_SIZEn(x) (4)
380+
/* @brief Has dedicated interrupt for master and slave. */
381+
#define FSL_FEATURE_LPI2C_HAS_ROLE_SPLIT_IRQ (0)
368382

369383
/* LPSPI module features */
370384

371-
/* @brief Capacity (number of entries) of the transmit/receive FIFO (or zero if no FIFO is available). */
385+
/* @brief Capacity (number of entries) of the transmit/receive FIFO. */
372386
#define FSL_FEATURE_LPSPI_FIFO_SIZEn(x) (4)
373387
/* @brief Has separate DMA RX and TX requests. */
374388
#define FSL_FEATURE_LPSPI_HAS_SEPARATE_DMA_RX_TX_REQn(x) (1)
375389
/* @brief Has CCR1 (related to existence of registers CCR1). */
376390
#define FSL_FEATURE_LPSPI_HAS_CCR1 (1)
377-
/* @brief Has no PCSCFG bit in CFGR1 register */
391+
/* @brief Has no PCSCFG bit in CFGR1 register. */
378392
#define FSL_FEATURE_LPSPI_HAS_NO_PCSCFG (0)
379-
/* @brief Has no WIDTH bits in TCR register */
393+
/* @brief Has no WIDTH bits in TCR register. */
380394
#define FSL_FEATURE_LPSPI_HAS_NO_MULTI_WIDTH (0)
381395

382396
/* LPTMR module features */
@@ -462,12 +476,16 @@
462476
#define FSL_FEATURE_LPUART_HAS_GLOBAL (1)
463477
/* @brief Has LPUART_PINCFG. */
464478
#define FSL_FEATURE_LPUART_HAS_PINCFG (1)
479+
/* @brief Belong to LPFLEXCOMM */
480+
#define FSL_FEATURE_LPUART_IS_LPFLEXCOMM (0)
465481
/* @brief Has register MODEM Control. */
466482
#define FSL_FEATURE_LPUART_HAS_MCR (0)
467483
/* @brief Has register Half Duplex Control. */
468484
#define FSL_FEATURE_LPUART_HAS_HDCR (0)
469485
/* @brief Has register Timeout. */
470486
#define FSL_FEATURE_LPUART_HAS_TIMEOUT (0)
487+
/* @brief UART support swap TX and RX (has bit CTRL[SWAP]). */
488+
#define FSL_FEATURE_LPUART_HAS_CTRL_SWAP (0)
471489

472490
/* TRDC module features */
473491

@@ -593,6 +611,17 @@
593611
#define FSL_FEATURE_PMC_HAS_NO_OSTIMER_REG (1)
594612
/* @brief Starter register discontinuous. */
595613
#define FSL_FEATURE_SYSCON_STARTER_DISCONTINUOUS (1)
614+
/* @brief Has parity miss (bitfield LPCAC_CTRL[PARITY_MISS_EN]). */
615+
#define FSL_FEATURE_SYSCON_HAS_LPCAC_CTRL_PARITY_MISS_EN_BIT (0)
616+
/* @brief Has parity error report (bitfield LPCAC_CTRL[PARITY_FAULT_EN]). */
617+
#define FSL_FEATURE_SYSCON_HAS_LPCAC_CTRL_PARITY_FAULT_EN_BIT (0)
618+
619+
/* SysTick module features */
620+
621+
/* @brief Systick has external reference clock. */
622+
#define FSL_FEATURE_SYSTICK_HAS_EXT_REF (0)
623+
/* @brief Systick external reference clock is core clock divided by this value. */
624+
#define FSL_FEATURE_SYSTICK_EXT_REF_CORE_DIV (0)
596625

597626
/* UTICK module features */
598627

mcux/mcux-sdk-ng/devices/MCX/MCXA/MCXA132/fsl_device_registers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright 2014-2016 Freescale Semiconductor, Inc.
3-
* Copyright 2016-2024 NXP
3+
* Copyright 2016-2025 NXP
44
* SPDX-License-Identifier: BSD-3-Clause
55
*
66
*/

mcux/mcux-sdk-ng/devices/MCX/MCXA/MCXA132/system_MCXA132.c

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
** MCUXpresso Compiler
1111
**
1212
** Reference manual: MCXA1 User manual
13-
** Version: rev. 1.0, 2022-03-29
14-
** Build: b241118
13+
** Version: rev. 2.0, 2024-10-29
14+
** Build: b250521
1515
**
1616
** Abstract:
1717
** Provides a system configuration function and a global variable that
1818
** contains the system frequency. It configures the device and initializes
1919
** the oscillator (PLL) that is part of the microcontroller device.
2020
**
2121
** Copyright 2016 Freescale Semiconductor, Inc.
22-
** Copyright 2016-2024 NXP
22+
** Copyright 2016-2025 NXP
2323
** SPDX-License-Identifier: BSD-3-Clause
2424
**
2525
** http: www.nxp.com
@@ -28,14 +28,17 @@
2828
** Revisions:
2929
** - rev. 1.0 (2022-03-29)
3030
** Initial version based on v0.1UM
31+
** - rev. 2.0 (2024-10-29)
32+
** Change the device header file from single flat file to multiple files based on peripherals,
33+
** each peripheral with dedicated header file located in periphN folder.
3134
**
3235
** ###################################################################
3336
*/
3437

3538
/*!
3639
* @file MCXA132
37-
* @version 1.0
38-
* @date 2022-03-29
40+
* @version 2.0
41+
* @date 2024-10-29
3942
* @brief Device specific configuration file for MCXA132 (implementation file)
4043
*
4144
* Provides a system configuration function and a global variable that contains
@@ -46,8 +49,9 @@
4649
#include <stdint.h>
4750
#include "fsl_device_registers.h"
4851

49-
50-
52+
#if __has_include("fsl_clock.h")
53+
#include "fsl_clock.h"
54+
#endif
5155

5256

5357
/* ----------------------------------------------------------------------------
@@ -78,6 +82,7 @@ __attribute__ ((weak)) void SystemInit (void) {
7882
SCB->VTOR = (uint32_t) &__Vectors;
7983
#endif
8084
#endif
85+
8186
/* Enable the LPCAC */
8287
SYSCON->LPCAC_CTRL |= SYSCON_LPCAC_CTRL_LPCAC_MEM_REQ_MASK;
8388
SYSCON->LPCAC_CTRL &= ~SYSCON_LPCAC_CTRL_DIS_LPCAC_MASK;
@@ -112,6 +117,10 @@ __attribute__ ((weak)) void SystemInit (void) {
112117

113118
/* Route the PMC bandgap buffer signal to the ADC */
114119
SPC0->CORELDO_CFG |= (1U << 24U);
120+
121+
/* Enables flash speculation */
122+
SYSCON->NVM_CTRL &= ~(SYSCON_NVM_CTRL_DIS_MBECC_ERR_DATA_MASK | SYSCON_NVM_CTRL_DIS_MBECC_ERR_INST_MASK);
123+
SYSCON->NVM_CTRL &= ~SYSCON_NVM_CTRL_DIS_FLASH_SPEC_MASK;
115124
SystemInitHook();
116125
}
117126

@@ -120,7 +129,10 @@ __attribute__ ((weak)) void SystemInit (void) {
120129
---------------------------------------------------------------------------- */
121130

122131
void SystemCoreClockUpdate (void) {
123-
132+
#if __has_include("fsl_clock.h")
133+
/* Get frequency of Core System */
134+
SystemCoreClock = CLOCK_GetCoreSysClkFreq();
135+
#endif
124136
}
125137

126138
/* ----------------------------------------------------------------------------

0 commit comments

Comments
 (0)