mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-23 13:59:02 +00:00
runtime/atsamd51: enable CMCC cache for greatly improved performance on SAMD51
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -27,6 +27,7 @@ func init() {
|
|||||||
initSERCOMClocks()
|
initSERCOMClocks()
|
||||||
initUSBClock()
|
initUSBClock()
|
||||||
initADCClock()
|
initADCClock()
|
||||||
|
enableCache()
|
||||||
|
|
||||||
cdc.EnableUSBCDC()
|
cdc.EnableUSBCDC()
|
||||||
machine.USBDev.Configure(machine.UARTConfig{})
|
machine.USBDev.Configure(machine.UARTConfig{})
|
||||||
@@ -367,6 +368,10 @@ func initADCClock() {
|
|||||||
sam.GCLK_PCHCTRL_CHEN)
|
sam.GCLK_PCHCTRL_CHEN)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func enableCache() {
|
||||||
|
sam.CMCC.CTRL.SetBits(sam.CMCC_CTRL_CEN)
|
||||||
|
}
|
||||||
|
|
||||||
func waitForEvents() {
|
func waitForEvents() {
|
||||||
arm.Asm("wfe")
|
arm.Asm("wfe")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user