Skip to content

Commit 8e07c77

Browse files
cyliangtwjhedberg
authored andcommitted
soc: nuvoton: numicro: Disable m48x SPIM cache
By disabling m48x SPIM cache by default, the SRAM size increases by 32 KB to a total of 160 KB. Signed-off-by: cyliang tw <[email protected]>
1 parent 4021dd3 commit 8e07c77

File tree

1 file changed

+5
-0
lines changed
  • soc/nuvoton/numicro/m48x

1 file changed

+5
-0
lines changed

soc/nuvoton/numicro/m48x/soc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ void soc_reset_hook(void)
1212
{
1313
SYS_UnlockReg();
1414

15+
/* Disable SPIM cache to relocate 32 KB to SRAM */
16+
CLK->AHBCLK |= CLK_AHBCLK_SPIMCKEN_Msk;
17+
SPIM->CTL1 |= SPIM_CTL1_CACHEOFF_Msk;
18+
SPIM->CTL1 |= SPIM_CTL1_CCMEN_Msk;
19+
1520
/* system clock init */
1621
SystemInit();
1722

0 commit comments

Comments
 (0)