diff options
author | Jacques Comeaux <jacquesrcomeaux@protonmail.com> | 2023-12-24 23:03:47 -0600 |
---|---|---|
committer | Jacques Comeaux <jacquesrcomeaux@protonmail.com> | 2023-12-24 23:03:47 -0600 |
commit | ad75550260068087c4351a6a197e10c02fe3b399 (patch) | |
tree | b9d6504843caa03b7aa0e0823672104ec57bfd79 /pll.s | |
parent | 8c8569bf9575a4f1077a1b8a61f47d5b4ff55727 (diff) |
Add blinkN subroutine
Diffstat (limited to 'pll.s')
-rw-r--r-- | pll.s | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -56,3 +56,13 @@ vco_lock: movs r0, 0x8 // postdiv (bit 3) str r0, [r1, PWR_OFST] bx lr + +.type delay_1s, %function +.global delay_1s + +delay_1s: + ldr r3, =0x1fca055 // 33.3 * 10^6 (one-third of a second at 100MHz) +1: // 3 clock cycle loop + subs r3, r3, 1 // 1 clock cycle + bne 1b // 2 clock cycles when taken + mov pc, lr |