rp2040

RP2040 Programming without SDK
Log | Files | Refs

commit 20518aaf5e90b6511d8ae7cf8be84f89c5254c0c
parent f240214eb07a70a1828e94011c90ef4112e13877
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Thu, 27 Apr 2023 11:00:24 +0900

use xosc

Diffstat:
Mex2/main.s | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/ex2/main.s b/ex2/main.s @@ -45,6 +45,11 @@ wait_xosc: lsr r0, r0, #31 // STABLE bit beq wait_xosc + // set system clock xosc + ldr r3, clocks_base + ldr r0, =(0x3 << 5 | 0x1) + str r0, [r3, #0x3c] // CLOCKS: CLK_SYS_CTRL + // blink led on gpio25 loop: bl bled0 @@ -110,8 +115,8 @@ delay_loop: pop {r0} bx lr -// literals .align 2 +literals: atomic_clr: .word 0x00003000 resets_base: @@ -120,5 +125,8 @@ io_bank0_base: .word 0x40014000 xosc_base: .word 0x40024000 +clocks_base: + .word 0x40008000 sio_base: .word 0xd0000000 + .ltorg