diff options
author | deadprogram <[email protected]> | 2023-02-27 15:28:18 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2023-02-27 20:40:41 +0100 |
commit | 74160c0e324a9926566ab76962fd0924c617bc38 (patch) | |
tree | 08858f27821149af146c9c83f072e6a650c9617a | |
parent | 6e1b8a54aaa4e181e814c7c3925220a26753751e (diff) | |
download | tinygo-74160c0e324a9926566ab76962fd0924c617bc38.tar.gz tinygo-74160c0e324a9926566ab76962fd0924c617bc38.zip |
runtime/atsamd51: enable CMCC cache for greatly improved performance on SAMD51
Signed-off-by: deadprogram <[email protected]>
-rw-r--r-- | src/runtime/runtime_atsamd51.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/runtime_atsamd51.go b/src/runtime/runtime_atsamd51.go index f58e097ee..3dbebadc0 100644 --- a/src/runtime/runtime_atsamd51.go +++ b/src/runtime/runtime_atsamd51.go @@ -27,6 +27,7 @@ func init() { initSERCOMClocks() initUSBClock() initADCClock() + enableCache() cdc.EnableUSBCDC() machine.USBDev.Configure(machine.UARTConfig{}) @@ -367,6 +368,10 @@ func initADCClock() { sam.GCLK_PCHCTRL_CHEN) } +func enableCache() { + sam.CMCC.CTRL.SetBits(sam.CMCC_CTRL_CEN) +} + func waitForEvents() { arm.Asm("wfe") } |