rp2040

RP2040 Programming without SDK
Log | Files | Refs

commit a9b5055936aeb68b5a41cf14fa8e55dd39b56cc1
parent 8309cf345f36a7477b85cc773e212744fec53955
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Fri, 10 Mar 2023 15:02:51 +0900

enable clk_peri and reset uart

Diffstat:
Mmain.s | 16++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/main.s b/main.s @@ -1,10 +1,19 @@ .section .text .global main main: + // enable clk_peri + ldr r0, clocks_base + add r0, r0, #0x48 + mov r1, #0x1 + lsl r1, r1, #11 + str r1, [r0, #0] + // reset gpio ldr r0, reset_base - mov r1, #0x1 - lsl r1, r1, #5 + mov r2, #0x1 + lsl r1, r2, #5 + lsl r2, r2, #17 + add r1, r1, r2 str r1, [r0, #0] // check if reset is done @@ -47,6 +56,9 @@ del_loop: .align 2 +clocks_base: + .word 0x40008000 + reset_base: .word 0x4000f000