Skip to content

Commit af8767f

Browse files
committed
Enabled ICC on MAX7800x MCUs
Signed-off-by: Ryan Wiebe <ryan.wiebe@analog.com>
1 parent 6f59cd9 commit af8767f

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

Libraries/zephyr/MAX/Source/MAX78000/max78xxx_system.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,19 @@
2424
*/
2525
void max32xx_system_init(void)
2626
{
27+
#ifndef CONFIG_SOC_MAX78000_RV32
28+
29+
// Enable then disable ICC to clear the cache
30+
MXC_ICC_Enable(MXC_ICC0);
31+
MXC_ICC_Disable(MXC_ICC0);
2732
MXC_ICC_Enable(MXC_ICC0);
33+
34+
#else
35+
36+
// Enable then disable ICC to clear the cache
37+
MXC_ICC_Enable(MXC_ICC1);
38+
MXC_ICC_Disable(MXC_ICC1);
39+
MXC_ICC_Enable(MXC_ICC1);
40+
41+
#endif
2842
}

Libraries/zephyr/MAX/Source/MAX78002/max78xxx_system.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,19 @@
2424
*/
2525
void max32xx_system_init(void)
2626
{
27+
#ifndef CONFIG_SOC_MAX78002_RV32
28+
29+
// Enable then disable ICC to clear the cache
30+
MXC_ICC_Enable(MXC_ICC0);
31+
MXC_ICC_Disable(MXC_ICC0);
2732
MXC_ICC_Enable(MXC_ICC0);
33+
34+
#else
35+
36+
// Enable then disable ICC to clear the cache
37+
MXC_ICC_Enable(MXC_ICC1);
38+
MXC_ICC_Disable(MXC_ICC1);
39+
MXC_ICC_Enable(MXC_ICC1);
40+
41+
#endif
2842
}

0 commit comments

Comments
 (0)