Skip to content

Commit 9d13b7e

Browse files
committed
hal_nxp: Sync 25.06 Kinetis to hal_nxp
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1 parent fbcee65 commit 9d13b7e

File tree

797 files changed

+10461
-10820
lines changed

Some content is hidden

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

797 files changed

+10461
-10820
lines changed

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

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

mcux/mcux-sdk-ng/devices/Kinetis/K/MK02F12810/MK02F12810.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
** MCUXpresso Compiler
1515
**
1616
** Reference manual: K02P64M100SFARM, Rev. 0, February 14, 2014
17-
** Version: rev. 0.5, 2015-02-19
18-
** Build: b240710
17+
** Version: rev. 1.0, 2024-10-29
18+
** Build: b250520
1919
**
2020
** Abstract:
2121
** CMSIS Peripheral Access Layer for MK02F12810
2222
**
2323
** Copyright 1997-2016 Freescale Semiconductor, Inc.
24-
** Copyright 2016-2024 NXP
24+
** Copyright 2016-2025 NXP
2525
** SPDX-License-Identifier: BSD-3-Clause
2626
**
2727
** http: www.nxp.com
@@ -40,14 +40,17 @@
4040
** Interrupt INT_LPTimer renamed to INT_LPTMR0, interrupt INT_Watchdog renamed to INT_WDOG_EWM.
4141
** - rev. 0.5 (2015-02-19)
4242
** Renamed interrupt vector LLW to LLWU.
43+
** - rev. 1.0 (2024-10-29)
44+
** Change the device header file from single flat file to multiple files based on peripherals,
45+
** each peripheral with dedicated header file located in periphN folder.
4346
**
4447
** ###################################################################
4548
*/
4649

4750
/*!
4851
* @file MK02F12810.h
49-
* @version 0.5
50-
* @date 2015-02-19
52+
* @version 1.0
53+
* @date 2024-10-29
5154
* @brief CMSIS Peripheral Access Layer for MK02F12810
5255
*
5356
* CMSIS Peripheral Access Layer for MK02F12810

mcux/mcux-sdk-ng/devices/Kinetis/K/MK02F12810/MK02F12810_COMMON.h

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
** MCUXpresso Compiler
1515
**
1616
** Reference manual: K02P64M100SFARM, Rev. 0, February 14, 2014
17-
** Version: rev. 0.5, 2015-02-19
18-
** Build: b240710
17+
** Version: rev. 1.0, 2024-10-29
18+
** Build: b250520
1919
**
2020
** Abstract:
2121
** CMSIS Peripheral Access Layer for MK02F12810
2222
**
2323
** Copyright 1997-2016 Freescale Semiconductor, Inc.
24-
** Copyright 2016-2024 NXP
24+
** Copyright 2016-2025 NXP
2525
** SPDX-License-Identifier: BSD-3-Clause
2626
**
2727
** http: www.nxp.com
@@ -40,14 +40,17 @@
4040
** Interrupt INT_LPTimer renamed to INT_LPTMR0, interrupt INT_Watchdog renamed to INT_WDOG_EWM.
4141
** - rev. 0.5 (2015-02-19)
4242
** Renamed interrupt vector LLW to LLWU.
43+
** - rev. 1.0 (2024-10-29)
44+
** Change the device header file from single flat file to multiple files based on peripherals,
45+
** each peripheral with dedicated header file located in periphN folder.
4346
**
4447
** ###################################################################
4548
*/
4649

4750
/*!
4851
* @file MK02F12810_COMMON.h
49-
* @version 0.5
50-
* @date 2015-02-19
52+
* @version 1.0
53+
* @date 2024-10-29
5154
* @brief CMSIS Peripheral Access Layer for MK02F12810
5255
*
5356
* CMSIS Peripheral Access Layer for MK02F12810
@@ -58,9 +61,9 @@
5861

5962
/** Memory map major version (memory maps with equal major version number are
6063
* compatible) */
61-
#define MCU_MEM_MAP_VERSION 0x0000U
64+
#define MCU_MEM_MAP_VERSION 0x0100U
6265
/** Memory map minor version */
63-
#define MCU_MEM_MAP_VERSION_MINOR 0x0005U
66+
#define MCU_MEM_MAP_VERSION_MINOR 0x0000U
6467

6568
/**
6669
* @brief Macro to calculate address of an aliased word in the peripheral
@@ -226,15 +229,17 @@ typedef enum IRQn {
226229
#include "core_cm4.h" /* Core Peripheral Access Layer */
227230
#include "system_MK02F12810.h" /* Device specific configuration file */
228231

229-
#define MK02F12810_SERIES
230-
/* CPU specific feature definitions */
231-
#include "MK02F12810_features.h"
232-
233232
/*!
234233
* @}
235234
*/ /* end of group Cortex_Core_Configuration */
236235

237236

237+
#ifndef MK02F12810_SERIES
238+
#define MK02F12810_SERIES
239+
#endif
240+
/* CPU specific feature definitions */
241+
#include "MK02F12810_features.h"
242+
238243
/* ADC - Peripheral instance base addresses */
239244
/** Peripheral ADC0 base address */
240245
#define ADC0_BASE (0x4003B000u)

mcux/mcux-sdk-ng/devices/Kinetis/K/MK02F12810/MK02F12810_features.h

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*
22
** ###################################################################
33
** Version: rev. 0.9, 2015-06-08
4-
** Build: b240417
4+
** Build: b250324
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
@@ -632,6 +632,28 @@
632632
#define FSL_FEATURE_FTM_IS_TPM_ONLY_INSTANCEn(x) (0)
633633
/* @brief Has frequency of the reload opportunities, bitfield CONF[LDFQ]. */
634634
#define FSL_FEATURE_FTM_HAS_CONF_LDFQ_BIT (0)
635+
/* @brief Has filter prescaler. */
636+
#define FSL_FEATURE_FTM_HAS_FILTER_PRESCALER (0)
637+
/* @brief Has fault output state configurable. */
638+
#define FSL_FEATURE_FTM_HAS_FAULT_OUTPUT_STATE (0)
639+
/* @brief Has paired deadtime. */
640+
#define FSL_FEATURE_FTM_HAS_PAIRED_DEADTIME (0)
641+
/* @brief Has PWM dithering. */
642+
#define FSL_FEATURE_FTM_HAS_DITHERING (0)
643+
/* @brief FTM instance has PWM dithering. */
644+
#define FSL_FEATURE_FTM_INSTANCE_HAS_DITHERINGn(x) (0)
645+
/* @brief Has trigger mode control. */
646+
#define FSL_FEATURE_FTM_HAS_TRIGGER_MODE (0)
647+
/* @brief Has modified combine mode. */
648+
#define FSL_FEATURE_FTM_HAS_MODIFIED_COMBINE_PWM (0)
649+
/* @brief Has configurable channel input state. */
650+
#define FSL_FEATURE_FTM_HAS_CONF_CHIS_BIT (0)
651+
/* @brief Has configurable channel output value. */
652+
#define FSL_FEATURE_FTM_HAS_CONF_CHOV_BIT (0)
653+
/* @brief FTM instance has Quadrature Decoder with input filter. */
654+
#define FSL_FEATURE_FTM_INSTANCE_HAS_QUAD_DECODEn(x) (1)
655+
/* @brief FTM instance fault input number. */
656+
#define FSL_FEATURE_FTM_INSTANCE_FAULT_INPUT_NUMBERn(x) (4)
635657

636658
/* GPIO module features */
637659

@@ -1493,6 +1515,8 @@
14931515
#define FSL_FEATURE_PIT_HAS_SHARED_IRQ_HANDLER (0)
14941516
/* @brief Has timer enable control. */
14951517
#define FSL_FEATURE_PIT_HAS_MDIS (1)
1518+
/* @brief Has ERRATA 7914. */
1519+
#define FSL_FEATURE_PIT_HAS_ERRATA_7914 (0)
14961520

14971521
/* PMC module features */
14981522

mcux/mcux-sdk-ng/devices/Kinetis/K/MK02F12810/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/Kinetis/K/MK02F12810/system_MK02F12810.c

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
** MCUXpresso Compiler
1515
**
1616
** Reference manual: K02P64M100SFARM, Rev. 0, February 14, 2014
17-
** Version: rev. 0.5, 2015-02-19
18-
** Build: b240710
17+
** Version: rev. 1.0, 2024-10-29
18+
** Build: b250520
1919
**
2020
** Abstract:
2121
** Provides a system configuration function and a global variable that
2222
** contains the system frequency. It configures the device and initializes
2323
** the oscillator (PLL) that is part of the microcontroller device.
2424
**
2525
** Copyright 2016 Freescale Semiconductor, Inc.
26-
** Copyright 2016-2024 NXP
26+
** Copyright 2016-2025 NXP
2727
** SPDX-License-Identifier: BSD-3-Clause
2828
**
2929
** http: www.nxp.com
@@ -42,14 +42,17 @@
4242
** Interrupt INT_LPTimer renamed to INT_LPTMR0, interrupt INT_Watchdog renamed to INT_WDOG_EWM.
4343
** - rev. 0.5 (2015-02-19)
4444
** Renamed interrupt vector LLW to LLWU.
45+
** - rev. 1.0 (2024-10-29)
46+
** Change the device header file from single flat file to multiple files based on peripherals,
47+
** each peripheral with dedicated header file located in periphN folder.
4548
**
4649
** ###################################################################
4750
*/
4851

4952
/*!
5053
* @file MK02F12810
51-
* @version 0.5
52-
* @date 2015-02-19
54+
* @version 1.0
55+
* @date 2024-10-29
5356
* @brief Device specific configuration file for MK02F12810 (implementation file)
5457
*
5558
* Provides a system configuration function and a global variable that contains
@@ -100,7 +103,7 @@ void SystemInit (void) {
100103

101104
void SystemCoreClockUpdate (void) {
102105

103-
uint32_t MCGOUTClock; /* Variable to store output clock frequency of the MCG module */
106+
uint32_t MCGOUTClock; /* Variable to store output clock frequency of the MCG module */
104107
uint16_t Divider;
105108
uint8_t tmpC7 = 0;
106109

@@ -110,11 +113,11 @@ void SystemCoreClockUpdate (void) {
110113
/* External reference clock is selected */
111114
switch (MCG->C7 & MCG_C7_OSCSEL_MASK) {
112115
case 0x00U:
113-
MCGOUTClock = CPU_XTAL_CLK_HZ; /* System oscillator drives MCG clock */
116+
MCGOUTClock = CPU_XTAL_CLK_HZ; /* System oscillator drives MCG clock */
114117
break;
115118
case 0x02U:
116119
default:
117-
MCGOUTClock = CPU_INT_IRC_CLK_HZ; /* IRC 48MHz oscillator drives MCG clock */
120+
MCGOUTClock = CPU_INT_IRC_CLK_HZ; /* IRC 48MHz oscillator drives MCG clock */
118121
break;
119122
}
120123
tmpC7 = MCG->C7;
@@ -130,14 +133,14 @@ void SystemCoreClockUpdate (void) {
130133
Divider = (uint16_t)(32LU << ((MCG->C1 & MCG_C1_FRDIV_MASK) >> MCG_C1_FRDIV_SHIFT));
131134
break;
132135
}
133-
} else {/* ((MCG->C2 & MCG_C2_RANGE_MASK) != 0x00U) */
136+
} else {
134137
Divider = (uint16_t)(1LU << ((MCG->C1 & MCG_C1_FRDIV_MASK) >> MCG_C1_FRDIV_SHIFT));
135138
}
136-
MCGOUTClock = (MCGOUTClock / Divider); /* Calculate the divided FLL reference clock */
137-
} else { /* (!((MCG->C1 & MCG_C1_IREFS_MASK) == 0x00U)) */
138-
MCGOUTClock = CPU_INT_SLOW_CLK_HZ; /* The slow internal reference clock is selected */
139-
} /* (!((MCG->C1 & MCG_C1_IREFS_MASK) == 0x00U)) */
140-
/* Select correct multiplier to calculate the MCG output clock */
139+
MCGOUTClock = (MCGOUTClock / Divider); /* Calculate the divided FLL reference clock */
140+
} else {
141+
MCGOUTClock = CPU_INT_SLOW_CLK_HZ; /* The slow internal reference clock is selected */
142+
}
143+
/* Select correct multiplier to calculate the MCG output clock */
141144
switch (MCG->C4 & (MCG_C4_DMX32_MASK | MCG_C4_DRST_DRS_MASK)) {
142145
case 0x00U:
143146
MCGOUTClock *= 640U;
@@ -170,26 +173,26 @@ void SystemCoreClockUpdate (void) {
170173
} else if ((MCG->C1 & MCG_C1_CLKS_MASK) == 0x40U) {
171174
/* Internal reference clock is selected */
172175
if ((MCG->C2 & MCG_C2_IRCS_MASK) == 0x00U) {
173-
MCGOUTClock = CPU_INT_SLOW_CLK_HZ; /* Slow internal reference clock selected */
174-
} else { /* (!((MCG->C2 & MCG_C2_IRCS_MASK) == 0x00U)) */
176+
MCGOUTClock = CPU_INT_SLOW_CLK_HZ; /* Slow internal reference clock selected */
177+
} else { /* Fast internal reference clock selected */
175178
Divider = (uint16_t)(0x01LU << ((MCG->SC & MCG_SC_FCRDIV_MASK) >> MCG_SC_FCRDIV_SHIFT));
176-
MCGOUTClock = (uint32_t) (CPU_INT_FAST_CLK_HZ / Divider); /* Fast internal reference clock selected */
177-
} /* (!((MCG->C2 & MCG_C2_IRCS_MASK) == 0x00U)) */
179+
MCGOUTClock = (uint32_t) (CPU_INT_FAST_CLK_HZ / Divider);
180+
}
178181
} else if ((MCG->C1 & MCG_C1_CLKS_MASK) == 0x80U) {
179182
/* External reference clock is selected */
180183
switch (MCG->C7 & MCG_C7_OSCSEL_MASK) {
181184
case 0x00U:
182-
MCGOUTClock = CPU_XTAL_CLK_HZ; /* System oscillator drives MCG clock */
185+
MCGOUTClock = CPU_XTAL_CLK_HZ; /* System oscillator drives MCG clock */
183186
break;
184187
case 0x02U:
185188
default:
186-
MCGOUTClock = CPU_INT_IRC_CLK_HZ; /* IRC 48MHz oscillator drives MCG clock */
189+
MCGOUTClock = CPU_INT_IRC_CLK_HZ; /* IRC 48MHz oscillator drives MCG clock */
187190
break;
188191
}
189-
} else { /* (!((MCG->C1 & MCG_C1_CLKS_MASK) == 0x80U)) */
192+
} else {
190193
/* Reserved value */
191194
return;
192-
} /* (!((MCG->C1 & MCG_C1_CLKS_MASK) == 0x80U)) */
195+
}
193196
SystemCoreClock = (MCGOUTClock / (0x01U + ((SIM->CLKDIV1 & SIM_CLKDIV1_OUTDIV1_MASK) >> SIM_CLKDIV1_OUTDIV1_SHIFT)));
194197
}
195198

mcux/mcux-sdk-ng/devices/Kinetis/K/MK02F12810/system_MK02F12810.h

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
** MCUXpresso Compiler
1515
**
1616
** Reference manual: K02P64M100SFARM, Rev. 0, February 14, 2014
17-
** Version: rev. 0.5, 2015-02-19
18-
** Build: b240710
17+
** Version: rev. 1.0, 2024-10-29
18+
** Build: b250520
1919
**
2020
** Abstract:
2121
** Provides a system configuration function and a global variable that
2222
** contains the system frequency. It configures the device and initializes
2323
** the oscillator (PLL) that is part of the microcontroller device.
2424
**
2525
** Copyright 2016 Freescale Semiconductor, Inc.
26-
** Copyright 2016-2024 NXP
26+
** Copyright 2016-2025 NXP
2727
** SPDX-License-Identifier: BSD-3-Clause
2828
**
2929
** http: www.nxp.com
@@ -42,14 +42,17 @@
4242
** Interrupt INT_LPTimer renamed to INT_LPTMR0, interrupt INT_Watchdog renamed to INT_WDOG_EWM.
4343
** - rev. 0.5 (2015-02-19)
4444
** Renamed interrupt vector LLW to LLWU.
45+
** - rev. 1.0 (2024-10-29)
46+
** Change the device header file from single flat file to multiple files based on peripherals,
47+
** each peripheral with dedicated header file located in periphN folder.
4548
**
4649
** ###################################################################
4750
*/
4851

4952
/*!
5053
* @file MK02F12810
51-
* @version 0.5
52-
* @date 2015-02-19
54+
* @version 1.0
55+
* @date 2024-10-29
5356
* @brief Device specific configuration file for MK02F12810 (header file)
5457
*
5558
* Provides a system configuration function and a global variable that contains
@@ -68,24 +71,24 @@ extern "C" {
6871

6972

7073
#ifndef DISABLE_WDOG
71-
#define DISABLE_WDOG 1
74+
#define DISABLE_WDOG 1
7275
#endif
7376

7477
/* Define clock source values */
75-
76-
#define CPU_XTAL_CLK_HZ 8000000u /* Value of the external crystal or oscillator clock frequency in Hz */
77-
#define CPU_XTAL32k_CLK_HZ 0u /* No RTC clock available */
78-
#define CPU_INT_SLOW_CLK_HZ 32768u /* Value of the slow internal oscillator clock frequency in Hz */
79-
#define CPU_INT_FAST_CLK_HZ 4000000u /* Value of the fast internal oscillator clock frequency in Hz */
80-
#define CPU_INT_IRC_CLK_HZ 48000000u /* Value of the 48M internal oscillator clock frequency in Hz */
78+
#define CPU_XTAL_CLK_HZ 8000000U /* Value of the external crystal or oscillator clock frequency in Hz */
79+
#define CPU_XTAL32k_CLK_HZ 0U /* No RTC clock available */
80+
#define CPU_INT_SLOW_CLK_HZ 32768U /* Value of the slow internal oscillator clock frequency in Hz */
81+
#define CPU_INT_FAST_CLK_HZ 4000000U /* Value of the fast internal oscillator clock frequency in Hz */
82+
#define CPU_INT_IRC_CLK_HZ 48000000U /* Value of the 48M internal oscillator clock frequency in Hz */
8183

8284
/* RTC oscillator setting */
8385

8486
/* Low power mode enable */
8587
/* SMC_PMPROT: AHSRUN=1,AVLP=1,ALLS=1,AVLLS=1 */
8688
#define SYSTEM_SMC_PMPROT_VALUE 0xAAU /* SMC_PMPROT */
8789

88-
#define DEFAULT_SYSTEM_CLOCK 20971520u /* Default System clock value */
90+
#define DEFAULT_SYSTEM_CLOCK 20971520U /* Default System clock value */
91+
8992

9093

9194
/**

0 commit comments

Comments
 (0)