var loop = E.asm("void()",`
ldr r2, port_A //Load port_A in r2
movw r3, #57344 //Load mask in r3
loop:
str r3, [r2, #0] //Set is r2
str r3, [r2, #4] //Clear is r2+4
b loop
nop
nop
port_A:
.word 0x40010810
`);
LED1.write(0);
LED2.write(0);
LED3.write(0);
loop()
It takes 223 ns to loop once, but three cpu cycles @72MHz are 3*1e9*1/72e6= 41.6 ns, can I touch some clock setting somewhere to make it toggle faster?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
With this:
loop()
It takes 223 ns to loop once, but three cpu cycles @72MHz are 3*1e9*1/72e6= 41.6 ns, can I touch some clock setting somewhere to make it toggle faster?
Thanks,
1 Attachment