Skip to content

Commit 23a60e4

Browse files
authored
feat(PeriphDrivers): Add new ICC APIs (#1555)
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
1 parent 6d5ef04 commit 23a60e4

32 files changed

Lines changed: 687 additions & 30 deletions

File tree

Libraries/PeriphDrivers/Include/MAX32520/icc.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -67,11 +67,27 @@ void MXC_ICC_Enable(void);
6767
*/
6868
void MXC_ICC_Disable(void);
6969

70+
/**
71+
* @brief Check if the instruction cache controller is enabled.
72+
* @retval Returns 1 if enabled, 0 if disabled.
73+
*/
74+
int MXC_ICC_IsEnabled(void);
75+
7076
/**
7177
* @brief Flush the instruction cache controller.
7278
*/
7379
void MXC_ICC_Flush(void);
7480

81+
/**
82+
* @brief Invalidate the instruction cache controller.
83+
*/
84+
void MXC_ICC_Invalidate(void);
85+
86+
/**
87+
* @brief Wait until the instruction cache controller is ready.
88+
*/
89+
void MXC_ICC_WaitForReady(void);
90+
7591
/**@} end of group icc */
7692

7793
#ifdef __cplusplus

Libraries/PeriphDrivers/Include/MAX32570/icc.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -67,11 +67,27 @@ void MXC_ICC_Enable(void);
6767
*/
6868
void MXC_ICC_Disable(void);
6969

70+
/**
71+
* @brief Checks if the instruction cache controller is enabled.
72+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
73+
*/
74+
int MXC_ICC_IsEnabled(void);
75+
7076
/**
7177
* @brief Flush the instruction cache controller.
7278
*/
7379
void MXC_ICC_Flush(void);
7480

81+
/**
82+
* @brief Invalidate the instruction cache controller.
83+
*/
84+
void MXC_ICC_Invalidate(void);
85+
86+
/**
87+
* @brief Wait until the instruction cache controller is ready.
88+
*/
89+
void MXC_ICC_WaitForReady(void);
90+
7591
/**@} end of group icc */
7692

7793
#ifdef __cplusplus

Libraries/PeriphDrivers/Include/MAX32650/icc.h

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -73,6 +73,11 @@ void MXC_ICC_Disable(void);
7373
*/
7474
void MXC_ICC_Flush(void);
7575

76+
/**
77+
* @brief Wait until both of the instruction cache controllers are ready.
78+
*/
79+
void MXC_ICC_WaitForReady(void);
80+
7681
/**
7782
* @brief Reads ID information from one of the ICC's Cache ID Register.
7883
* @param icc Pointer ICC instance to get ID information from.
@@ -93,12 +98,31 @@ void MXC_ICC_EnableInst(mxc_icc_regs_t *icc);
9398
*/
9499
void MXC_ICC_DisableInst(mxc_icc_regs_t *icc);
95100

101+
/**
102+
* @brief Checks if one of the ICC's is enabled.
103+
* @param icc Pointer to ICC instance to check.
104+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
105+
*/
106+
int MXC_ICC_IsEnabledInst(mxc_icc_regs_t *icc);
107+
96108
/**
97109
* @brief Flushes data from one of the ICC's.
98110
* @param icc Pointer to ICC instance to flush.
99111
*/
100112
void MXC_ICC_FlushInst(mxc_icc_regs_t *icc);
101113

114+
/**
115+
* @brief Invalidates one of the ICC's.
116+
* @param icc Pointer to ICC instance to invalidate.
117+
*/
118+
void MXC_ICC_InvalidateInst(mxc_icc_regs_t *icc);
119+
120+
/**
121+
* @brief Wait until one of the instruction cache controller instances is ready.
122+
* @param icc Pointer ICC instance to wait on.
123+
*/
124+
void MXC_ICC_WaitForReadyInst(mxc_icc_regs_t *icc);
125+
102126
/**@} end of group icc */
103127

104128
#ifdef __cplusplus

Libraries/PeriphDrivers/Include/MAX32655/icc.h

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -67,11 +67,29 @@ void MXC_ICC_Enable(mxc_icc_regs_t *icc);
6767
*/
6868
void MXC_ICC_Disable(mxc_icc_regs_t *icc);
6969

70+
/**
71+
* @brief Checks if the instruction cache controller is enabled.
72+
* @param icc Pointer to ICC instance to check.
73+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
74+
*/
75+
int MXC_ICC_IsEnabled(mxc_icc_regs_t *icc);
76+
7077
/**
7178
* @brief Flush the instruction cache controller.
7279
*/
7380
void MXC_ICC_Flush(mxc_icc_regs_t *icc);
7481

82+
/**
83+
* @brief Invalidate the instruction cache controller.
84+
*/
85+
void MXC_ICC_Invalidate(mxc_icc_regs_t *icc);
86+
87+
/**
88+
* @brief Wait until the instruction cache controller is ready.
89+
* @param icc Pointer to the Instruction Cache Controller registers.
90+
*/
91+
void MXC_ICC_WaitForReady(mxc_icc_regs_t *icc);
92+
7593
/**@} end of group icc */
7694

7795
#ifdef __cplusplus

Libraries/PeriphDrivers/Include/MAX32657/icc.h

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

66
/******************************************************************************
77
*
8-
* Copyright (C) 2024 Analog Devices, Inc.
8+
* Copyright (C) 2024-2026 Analog Devices, Inc.
99
*
1010
* Licensed under the Apache License, Version 2.0 (the "License");
1111
* you may not use this file except in compliance with the License.
@@ -65,11 +65,27 @@ void MXC_ICC_Enable(void);
6565
*/
6666
void MXC_ICC_Disable(void);
6767

68+
/**
69+
* @brief Checks if the instruction cache controller is enabled.
70+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
71+
*/
72+
int MXC_ICC_IsEnabled(void);
73+
6874
/**
6975
* @brief Flush the instruction cache controller.
7076
*/
7177
void MXC_ICC_Flush(void);
7278

79+
/**
80+
* @brief Invalidate the instruction cache controller.
81+
*/
82+
void MXC_ICC_Invalidate(void);
83+
84+
/**
85+
* @brief Wait until the instruction cache controller is ready.
86+
*/
87+
void MXC_ICC_WaitForReady(void);
88+
7389
/**@} end of group icc */
7490

7591
#ifdef __cplusplus

Libraries/PeriphDrivers/Include/MAX32660/icc.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -67,11 +67,27 @@ void MXC_ICC_Enable(void);
6767
*/
6868
void MXC_ICC_Disable(void);
6969

70+
/**
71+
* @brief Checks if the instruction cache controller is enabled.
72+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
73+
*/
74+
int MXC_ICC_IsEnabled(void);
75+
7076
/**
7177
* @brief Flush the instruction cache controller.
7278
*/
7379
void MXC_ICC_Flush(void);
7480

81+
/**
82+
* @brief Invalidate the instruction cache controller.
83+
*/
84+
void MXC_ICC_Invalidate(void);
85+
86+
/**
87+
* @brief Wait until the instruction cache controller is ready.
88+
*/
89+
void MXC_ICC_WaitForReady(void);
90+
7591
/**@} end of group icc */
7692

7793
#ifdef __cplusplus

Libraries/PeriphDrivers/Include/MAX32662/icc.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -67,11 +67,27 @@ void MXC_ICC_Enable(void);
6767
*/
6868
void MXC_ICC_Disable(void);
6969

70+
/**
71+
* @brief Checks if the instruction cache controller is enabled.
72+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
73+
*/
74+
int MXC_ICC_IsEnabled(void);
75+
7076
/**
7177
* @brief Flush the instruction cache controller.
7278
*/
7379
void MXC_ICC_Flush(void);
7480

81+
/**
82+
* @brief Invalidate the instruction cache controller.
83+
*/
84+
void MXC_ICC_Invalidate(void);
85+
86+
/**
87+
* @brief Wait until the instruction cache controller is ready.
88+
*/
89+
void MXC_ICC_WaitForReady(void);
90+
7591
/**@} end of group icc */
7692

7793
#ifdef __cplusplus

Libraries/PeriphDrivers/Include/MAX32665/icc.h

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -92,12 +92,36 @@ void MXC_ICC_EnableInst(mxc_icc_regs_t *icc);
9292
*/
9393
void MXC_ICC_DisableInst(mxc_icc_regs_t *icc);
9494

95+
/**
96+
* @brief Checks if one of the ICC's is enabled.
97+
* @param icc Pointer to ICC instance to check.
98+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
99+
*/
100+
int MXC_ICC_IsEnabledInst(mxc_icc_regs_t *icc);
101+
95102
/**
96103
* @brief Flushes data from one of the ICC's.
97104
* @param icc Pointer to ICC instance to flush.
98105
*/
99106
void MXC_ICC_FlushInst(mxc_icc_regs_t *icc);
100107

108+
/**
109+
* @brief Invalidates one of the ICC's.
110+
* @param icc Pointer to ICC instance to invalidate.
111+
*/
112+
void MXC_ICC_InvalidateInst(mxc_icc_regs_t *icc);
113+
114+
/**
115+
* @brief Wait until both the instruction cache controller and/or instance are ready.
116+
*/
117+
void MXC_ICC_WaitForReady(void);
118+
119+
/**
120+
* @brief Wait until the instruction cache controller instance is ready.
121+
* @param icc Pointer to ICC instance to wait on.
122+
*/
123+
void MXC_ICC_WaitForReadyInst(mxc_icc_regs_t *icc);
124+
101125
/**@} end of group icc */
102126

103127
#ifdef __cplusplus

Libraries/PeriphDrivers/Include/MAX32670/icc.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -67,11 +67,27 @@ void MXC_ICC_Enable(void);
6767
*/
6868
void MXC_ICC_Disable(void);
6969

70+
/**
71+
* @brief Checks if the instruction cache controller is enabled.
72+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
73+
*/
74+
int MXC_ICC_IsEnabled(void);
75+
7076
/**
7177
* @brief Flush the instruction cache controller.
7278
*/
7379
void MXC_ICC_Flush(void);
7480

81+
/**
82+
* @brief Invalidate the instruction cache controller.
83+
*/
84+
void MXC_ICC_Invalidate(void);
85+
86+
/**
87+
* @brief Wait until the instruction cache controller is ready.
88+
*/
89+
void MXC_ICC_WaitForReady(void);
90+
7591
/**@} end of group icc */
7692

7793
#ifdef __cplusplus

Libraries/PeriphDrivers/Include/MAX32672/icc.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -67,11 +67,27 @@ void MXC_ICC_Enable(void);
6767
*/
6868
void MXC_ICC_Disable(void);
6969

70+
/**
71+
* @brief Checks if the instruction cache controller is enabled.
72+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
73+
*/
74+
int MXC_ICC_IsEnabled(void);
75+
7076
/**
7177
* @brief Flush the instruction cache controller.
7278
*/
7379
void MXC_ICC_Flush(void);
7480

81+
/**
82+
* @brief Invalidate the instruction cache controller.
83+
*/
84+
void MXC_ICC_Invalidate(void);
85+
86+
/**
87+
* @brief Wait until the instruction cache controller is ready.
88+
*/
89+
void MXC_ICC_WaitForReady(void);
90+
7591
/**@} end of group icc */
7692

7793
#ifdef __cplusplus

0 commit comments

Comments
 (0)