Skip to content

Commit 89270e5

Browse files
committed
hal_nxp: Sync 25.06 LPC to hal_nxp
Signed-off-by: Zhaoxiang Jin <[email protected]>
1 parent 4894b4d commit 89270e5

File tree

811 files changed

+9257
-7301
lines changed

Some content is hidden

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

811 files changed

+9257
-7301
lines changed

mcux/mcux-sdk-ng/devices/LPC/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/LPC/LPC51U68/LPC51U68/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/LPC/LPC51U68/LPC51U68/drivers)
8+
mcux_add_cmakelists(${SdkRootDirPath}/${device_root}/LPC/LPC51U68/LPC51U68/drivers)
99

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

mcux/mcux-sdk-ng/devices/LPC/LPC51U68/LPC51U68/LPC51U68.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
** MCUXpresso Compiler
1010
**
1111
** Reference manual: LPC51U68 User manual User manual Rev. 1.0 13 Dec 2017
12-
** Version: rev. 1.0, 2017-12-15
13-
** Build: b240704
12+
** Version: rev. 2.0, 2024-10-29
13+
** Build: b250521
1414
**
1515
** Abstract:
1616
** CMSIS Peripheral Access Layer for LPC51U68
1717
**
1818
** Copyright 1997-2016 Freescale Semiconductor, Inc.
19-
** Copyright 2016-2024 NXP
19+
** Copyright 2016-2025 NXP
2020
** SPDX-License-Identifier: BSD-3-Clause
2121
**
2222
** http: www.nxp.com
@@ -25,14 +25,17 @@
2525
** Revisions:
2626
** - rev. 1.0 (2017-12-15)
2727
** Initial version.
28+
** - rev. 2.0 (2024-10-29)
29+
** Change the device header file from single flat file to multiple files based on peripherals,
30+
** each peripheral with dedicated header file located in periphN folder.
2831
**
2932
** ###################################################################
3033
*/
3134

3235
/*!
3336
* @file LPC51U68.h
34-
* @version 1.0
35-
* @date 2017-12-15
37+
* @version 2.0
38+
* @date 2024-10-29
3639
* @brief CMSIS Peripheral Access Layer for LPC51U68
3740
*
3841
* CMSIS Peripheral Access Layer for LPC51U68

mcux/mcux-sdk-ng/devices/LPC/LPC51U68/LPC51U68/LPC51U68_COMMON.h

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
** MCUXpresso Compiler
1010
**
1111
** Reference manual: LPC51U68 User manual User manual Rev. 1.0 13 Dec 2017
12-
** Version: rev. 1.0, 2017-12-15
13-
** Build: b240704
12+
** Version: rev. 2.0, 2024-10-29
13+
** Build: b250521
1414
**
1515
** Abstract:
1616
** CMSIS Peripheral Access Layer for LPC51U68
1717
**
1818
** Copyright 1997-2016 Freescale Semiconductor, Inc.
19-
** Copyright 2016-2024 NXP
19+
** Copyright 2016-2025 NXP
2020
** SPDX-License-Identifier: BSD-3-Clause
2121
**
2222
** http: www.nxp.com
@@ -25,14 +25,17 @@
2525
** Revisions:
2626
** - rev. 1.0 (2017-12-15)
2727
** Initial version.
28+
** - rev. 2.0 (2024-10-29)
29+
** Change the device header file from single flat file to multiple files based on peripherals,
30+
** each peripheral with dedicated header file located in periphN folder.
2831
**
2932
** ###################################################################
3033
*/
3134

3235
/*!
3336
* @file LPC51U68_COMMON.h
34-
* @version 1.0
35-
* @date 2017-12-15
37+
* @version 2.0
38+
* @date 2024-10-29
3639
* @brief CMSIS Peripheral Access Layer for LPC51U68
3740
*
3841
* CMSIS Peripheral Access Layer for LPC51U68
@@ -43,7 +46,7 @@
4346

4447
/** Memory map major version (memory maps with equal major version number are
4548
* compatible) */
46-
#define MCU_MEM_MAP_VERSION 0x0100U
49+
#define MCU_MEM_MAP_VERSION 0x0200U
4750
/** Memory map minor version */
4851
#define MCU_MEM_MAP_VERSION_MINOR 0x0000U
4952

@@ -129,15 +132,17 @@ typedef enum IRQn {
129132
#include "core_cm0plus.h" /* Core Peripheral Access Layer */
130133
#include "system_LPC51U68.h" /* Device specific configuration file */
131134

132-
#define LPC51U68_SERIES
133-
/* CPU specific feature definitions */
134-
#include "LPC51U68_features.h"
135-
136135
/*!
137136
* @}
138137
*/ /* end of group Cortex_Core_Configuration */
139138

140139

140+
#ifndef LPC51U68_SERIES
141+
#define LPC51U68_SERIES
142+
#endif
143+
/* CPU specific feature definitions */
144+
#include "LPC51U68_features.h"
145+
141146
/* ADC - Peripheral instance base addresses */
142147
/** Peripheral ADC0 base address */
143148
#define ADC0_BASE (0x400A0000u)

mcux/mcux-sdk-ng/devices/LPC/LPC51U68/LPC51U68/LPC51U68_features.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*
22
** ###################################################################
33
** Version: rev. 1.0, 2017-12-15
4-
** Build: b231026
4+
** Build: b241212
55
**
66
** Abstract:
77
** Chip specific module features.
88
**
99
** Copyright 2016 Freescale Semiconductor, Inc.
10-
** Copyright 2016-2023 NXP
10+
** Copyright 2016-2024 NXP
1111
** SPDX-License-Identifier: BSD-3-Clause
1212
**
1313
** http: www.nxp.com
@@ -176,6 +176,10 @@
176176
/* @brief I2S has DMIC interconnection */
177177
#define FSL_FEATURE_FLEXCOMM_INSTANCE_I2S_HAS_DMIC_INTERCONNECTIONn(x) (0)
178178

179+
/* GINT module features */
180+
181+
/* No feature definitions */
182+
179183
/* I2S module features */
180184

181185
/* @brief I2S support dual channel transfer. */

mcux/mcux-sdk-ng/devices/LPC/LPC51U68/LPC51U68/drivers/fsl_power.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
#define FSL_COMPONENT_ID "platform.drivers.power"
1414
#endif
1515

16-
/*! @name Driver version */
17-
/*@{*/
18-
/*! @brief LPC51U68 power contorl version 2.0.0. */
19-
#define FSL_LPC51U68_POWER_CONTROL_VERSION (MAKE_VERSION(2, 0, 0))
20-
/*@}*/
21-
2216
#define POWER_BASE (0x40020000u)
2317
#define POWER ((POWER_Type *)POWER_BASE)
2418
#define BODYBIAS_BASE (0x40030000u)
@@ -265,7 +259,7 @@ static void DeepSleepReloc(uint32_t peripheral_ctrl)
265259

266260
/* Set PDRUNCFG[1] bits 29, 28 */
267261
pdSet = &(SYSCON->PDRUNCFGSET[0]);
268-
((volatile uint32_t *)pdSet)[1] = (3U << 28U);
262+
*((volatile uint32_t *)pdSet + 1U) = (3U << 28U);
269263

270264
/* Fix KPSDK-17275 */
271265
SYSCON->PRESETCTRLSET[0] = SYSCON_PRESETCTRL_FLASH_RST_MASK;
@@ -282,7 +276,7 @@ static void DeepSleepReloc(uint32_t peripheral_ctrl)
282276

283277
/* When exiting only clear bit 29 of PDRUNCFG[1] */
284278
pdClr = &(SYSCON->PDRUNCFGCLR[0]);
285-
((volatile uint32_t *)pdClr)[1] = (1U << 29U);
279+
*((volatile uint32_t *)pdClr + 1U) = (1U << 29U);
286280

287281
/* Restore original pdruncfg */
288282
SYSCON->PDRUNCFG[0] = pdruncfg_val & ~(1U << 3U);
@@ -496,5 +490,5 @@ void POWER_SetLowPowerVoltageForFreq(uint32_t freq)
496490

497491
uint32_t POWER_GetLibVersion(void)
498492
{
499-
return FSL_LPC51U68_POWER_CONTROL_VERSION;
500-
}
493+
return FSL_POWER_DRIVER_VERSION;
494+
}

mcux/mcux-sdk-ng/devices/LPC/LPC51U68/LPC51U68/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/LPC/LPC51U68/LPC51U68/system_LPC51U68.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
** MCUXpresso Compiler
1010
**
1111
** Reference manual: LPC51U68 User manual User manual Rev. 1.0 13 Dec 2017
12-
** Version: rev. 1.0, 2017-12-15
13-
** Build: b240704
12+
** Version: rev. 2.0, 2024-10-29
13+
** Build: b250521
1414
**
1515
** Abstract:
1616
** Provides a system configuration function and a global variable that
1717
** contains the system frequency. It configures the device and initializes
1818
** the oscillator (PLL) that is part of the microcontroller device.
1919
**
2020
** Copyright 2016 Freescale Semiconductor, Inc.
21-
** Copyright 2016-2024 NXP
21+
** Copyright 2016-2025 NXP
2222
** SPDX-License-Identifier: BSD-3-Clause
2323
**
2424
** http: www.nxp.com
@@ -27,14 +27,17 @@
2727
** Revisions:
2828
** - rev. 1.0 (2017-12-15)
2929
** Initial version.
30+
** - rev. 2.0 (2024-10-29)
31+
** Change the device header file from single flat file to multiple files based on peripherals,
32+
** each peripheral with dedicated header file located in periphN folder.
3033
**
3134
** ###################################################################
3235
*/
3336

3437
/*!
3538
* @file LPC51U68
36-
* @version 1.0
37-
* @date 2017-12-15
39+
* @version 2.0
40+
* @date 2024-10-29
3841
* @brief Device specific configuration file for LPC51U68 (implementation file)
3942
*
4043
* Provides a system configuration function and a global variable that contains

mcux/mcux-sdk-ng/devices/LPC/LPC51U68/LPC51U68/system_LPC51U68.h

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
** MCUXpresso Compiler
1010
**
1111
** Reference manual: LPC51U68 User manual User manual Rev. 1.0 13 Dec 2017
12-
** Version: rev. 1.0, 2017-12-15
13-
** Build: b240704
12+
** Version: rev. 2.0, 2024-10-29
13+
** Build: b250521
1414
**
1515
** Abstract:
1616
** Provides a system configuration function and a global variable that
1717
** contains the system frequency. It configures the device and initializes
1818
** the oscillator (PLL) that is part of the microcontroller device.
1919
**
2020
** Copyright 2016 Freescale Semiconductor, Inc.
21-
** Copyright 2016-2024 NXP
21+
** Copyright 2016-2025 NXP
2222
** SPDX-License-Identifier: BSD-3-Clause
2323
**
2424
** http: www.nxp.com
@@ -27,14 +27,17 @@
2727
** Revisions:
2828
** - rev. 1.0 (2017-12-15)
2929
** Initial version.
30+
** - rev. 2.0 (2024-10-29)
31+
** Change the device header file from single flat file to multiple files based on peripherals,
32+
** each peripheral with dedicated header file located in periphN folder.
3033
**
3134
** ###################################################################
3235
*/
3336

3437
/*!
3538
* @file LPC51U68
36-
* @version 1.0
37-
* @date 2017-12-15
39+
* @version 2.0
40+
* @date 2024-10-29
3841
* @brief Device specific configuration file for LPC51U68 (header file)
3942
*
4043
* Provides a system configuration function and a global variable that contains
@@ -57,7 +60,10 @@ extern "C" {
5760
#define CLK_FRO_12MHZ 12000000u /* FRO 12 MHz (fro_12m) */
5861
#define CLK_FRO_48MHZ 48000000u /* FRO 48 MHz (fro_48m) */
5962
#define CLK_FRO_96MHZ 96000000u /* FRO 96 MHz (fro_96m) */
63+
64+
#ifndef CLK_CLK_IN
6065
#define CLK_CLK_IN 0u /* Default CLK_IN pin clock */
66+
#endif /* CLK_CLK_IN */
6167

6268

6369
/**

mcux/mcux-sdk-ng/devices/LPC/LPC51U68/LPC51U68/variable.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#### chip related
77
include(${SdkRootDirPath}/devices/LPC/variable.cmake)
88
mcux_set_variable(device LPC51U68)
9+
mcux_set_variable(device_root devices)
910
mcux_set_variable(soc_series LPC51U68)
1011
mcux_set_variable(soc_periph periph)
1112
mcux_set_variable(core_id_suffix_name "")

0 commit comments

Comments
 (0)