Skip to content

Commit 053373c

Browse files
authored
adapter frdm-mcxn236 iar project (RT-Thread#9083)
* adapter frdm-mcxn236 iar project * formate MCXN236 bsp
1 parent 189f5ed commit 053373c

File tree

195 files changed

+203579
-0
lines changed

Some content is hidden

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

195 files changed

+203579
-0
lines changed

bsp/nxp/mcx/mcxn/Libraries/MCXN236/MCXN236/MCXN236.h

+70,367
Large diffs are not rendered by default.

bsp/nxp/mcx/mcxn/Libraries/MCXN236/MCXN236/MCXN236_features.h

+900
Large diffs are not rendered by default.

bsp/nxp/mcx/mcxn/Libraries/MCXN236/MCXN236/arm/startup_MCXN236.S

+1,858
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright 2021-2022 NXP
3+
* All rights reserved.
4+
*
5+
* SPDX-License-Identifier: BSD-3-Clause
6+
*/
7+
8+
#include "fsl_cache_lpcac.h"
9+
/*******************************************************************************
10+
* Definitions
11+
******************************************************************************/
12+
13+
/* Component ID definition, used by tools. */
14+
#ifndef FSL_COMPONENT_ID
15+
#define FSL_COMPONENT_ID "platform.drivers.cache_lpcac"
16+
#endif
17+
18+
/*******************************************************************************
19+
* Code
20+
******************************************************************************/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
/*
2+
* Copyright 2021-2023 NXP
3+
* All rights reserved.
4+
*
5+
* SPDX-License-Identifier: BSD-3-Clause
6+
*/
7+
#ifndef FSL_CACHE_LPCAC_H_
8+
#define FSL_CACHE_LPCAC_H_
9+
10+
#include "fsl_common.h"
11+
12+
/*!
13+
* @addtogroup cache_lpcac
14+
* @{
15+
*/
16+
17+
/*******************************************************************************
18+
* Definitions
19+
******************************************************************************/
20+
21+
/*! @name Driver version */
22+
/*@{*/
23+
/*! @brief cache driver version */
24+
#define FSL_CACHE_LPCAC_DRIVER_VERSION (MAKE_VERSION(2, 1, 1))
25+
/*@}*/
26+
/*******************************************************************************
27+
* API
28+
******************************************************************************/
29+
30+
#if defined(__cplusplus)
31+
extern "C" {
32+
#endif
33+
34+
/*!
35+
* @name cache control for the L1 low power cache controller
36+
*@{
37+
*/
38+
39+
/*!
40+
* @brief Enables the processor code bus cache.
41+
*
42+
*/
43+
static inline void L1CACHE_EnableCodeCache(void)
44+
{
45+
SYSCON->LPCAC_CTRL &= ~SYSCON_LPCAC_CTRL_DIS_LPCAC_MASK;
46+
}
47+
48+
/*!
49+
* @brief Disables the processor code bus cache.
50+
*
51+
*/
52+
static inline void L1CACHE_DisableCodeCache(void)
53+
{
54+
SYSCON->LPCAC_CTRL |= SYSCON_LPCAC_CTRL_DIS_LPCAC_MASK;
55+
}
56+
57+
/*!
58+
* @brief Clears cache.
59+
*
60+
*/
61+
static inline void L1CACHE_InvalidateCodeCache(void)
62+
{
63+
SYSCON->LPCAC_CTRL |= SYSCON_LPCAC_CTRL_CLR_LPCAC_MASK;
64+
}
65+
66+
/*!
67+
* @brief Enables allocation.
68+
*
69+
*/
70+
static inline void L1CACHE_EnableAllocation(void)
71+
{
72+
SYSCON->LPCAC_CTRL &= ~SYSCON_LPCAC_CTRL_FRC_NO_ALLOC_MASK;
73+
}
74+
75+
/*!
76+
* @brief Disables allocation.
77+
*
78+
*/
79+
static inline void L1CACHE_DisableAllocation(void)
80+
{
81+
SYSCON->LPCAC_CTRL |= SYSCON_LPCAC_CTRL_FRC_NO_ALLOC_MASK;
82+
}
83+
84+
/*!
85+
* @brief Enables parity.
86+
*
87+
*/
88+
static inline void L1CACHE_EnableParity(void)
89+
{
90+
SYSCON->LPCAC_CTRL |= SYSCON_LPCAC_CTRL_PARITY_MISS_EN_MASK;
91+
}
92+
93+
/*!
94+
* @brief Disable parity.
95+
*
96+
*/
97+
static inline void L1CACHE_DisableParity(void)
98+
{
99+
SYSCON->LPCAC_CTRL &= ~SYSCON_LPCAC_CTRL_PARITY_MISS_EN_MASK;
100+
}
101+
102+
#if defined(FSL_FEATURE_LPCAC_SUPPORT_WRITE_BUFFER_CONTROL) && FSL_FEATURE_LPCAC_SUPPORT_WRITE_BUFFER_CONTROL
103+
/*!
104+
* @brief Enables write through buffer.
105+
*
106+
*/
107+
static inline void L1CACHE_EnableWriteBuffer(void)
108+
{
109+
SYSCON->LPCAC_CTRL &= ~SYSCON_LPCAC_CTRL_DIS_LPCAC_WTBF_MASK;
110+
}
111+
112+
/*!
113+
* @brief Disables write through buffer.
114+
*
115+
*/
116+
static inline void L1CACHE_DisableWriteBuffer(void)
117+
{
118+
SYSCON->LPCAC_CTRL |= SYSCON_LPCAC_CTRL_DIS_LPCAC_WTBF_MASK;
119+
}
120+
121+
/*!
122+
* @brief Limits write through buffer.
123+
*
124+
*/
125+
static inline void L1CACHE_LimitWriteBuffer(void)
126+
{
127+
SYSCON->LPCAC_CTRL &= ~SYSCON_LPCAC_CTRL_LIM_LPCAC_WTBF_MASK;
128+
}
129+
130+
/*!
131+
* @brief Unlimits write through buffer.
132+
*
133+
*/
134+
static inline void L1CACHE_UnlimitParity(void)
135+
{
136+
SYSCON->LPCAC_CTRL |= SYSCON_LPCAC_CTRL_LIM_LPCAC_WTBF_MASK;
137+
}
138+
139+
/*!
140+
* @brief Enables parity error report.
141+
*
142+
*/
143+
static inline void L1CACHE_EnableParityErrorReport(void)
144+
{
145+
SYSCON->LPCAC_CTRL |= SYSCON_LPCAC_CTRL_PARITY_FAULT_EN_MASK;
146+
}
147+
148+
/*!
149+
* @brief Disables parity error report.
150+
*
151+
*/
152+
static inline void L1CACHE_DisableParityErrorReport(void)
153+
{
154+
SYSCON->LPCAC_CTRL &= ~SYSCON_LPCAC_CTRL_PARITY_FAULT_EN_MASK;
155+
}
156+
157+
/*!
158+
* @brief Enables XOM(eXecute-Only-Memory) control.
159+
*
160+
*/
161+
static inline void L1CACHE_EnableXOMControl(void)
162+
{
163+
SYSCON->LPCAC_CTRL |= SYSCON_LPCAC_CTRL_LPCAC_XOM_MASK;
164+
}
165+
166+
/*!
167+
* @brief Disables XOM(eXecute-Only-Memory) control.
168+
*
169+
*/
170+
static inline void L1CACHE_DisableXOMControl(void)
171+
{
172+
SYSCON->LPCAC_CTRL &= ~SYSCON_LPCAC_CTRL_LPCAC_XOM_MASK;
173+
}
174+
#endif
175+
176+
/*@}*/
177+
178+
#if defined(__cplusplus)
179+
}
180+
#endif
181+
182+
/*! @}*/
183+
184+
#endif /* FSL_CACHE_LPCAC_H_*/

0 commit comments

Comments
 (0)