rp2040

RP2040 Programming without SDK
Log | Files | Refs

commit bc1e6dcad3f3dac3acb8453430432ced14f887d6
parent 572d9cc55ca9cce6aa24440c73a72a18d46b9bfe
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Tue, 27 Feb 2024 07:44:50 +0900

find a difference between before and after reboot
rosc settings are not restored

Diffstat:
Mex3/main.s | 38++++++++++++++++++++------------------
1 file changed, 20 insertions(+), 18 deletions(-)

diff --git a/ex3/main.s b/ex3/main.s @@ -4,22 +4,22 @@ .global vectors vectors: .word 0x20040000 // 0 initial SP - .word (reset+1) // 1 entry point - .word (reset+1) // 2 - .word (reset+1) // 3 - .word (reset+1) // 4 - .word (reset+1) // 5 - .word (reset+1) // 6 - .word (reset+1) // 7 - .word (reset+1) // 8 - .word (reset+1) // 9 - .word (reset+1) // 10 - .word (int_svcall+1) // 11 svcall - .word (reset+1) // 12 - .word (reset+1) // 13 - .word (reset+1) // 14 - .word (int_systick+1) // 15 systick - .word (int_alarm+1) // 16 alarm_0 + .word reset+1 // 1 entry point + .word reset+1 // 2 + .word reset+1 // 3 + .word reset+1 // 4 + .word reset+1 // 5 + .word reset+1 // 6 + .word reset+1 // 7 + .word reset+1 // 8 + .word reset+1 // 9 + .word reset+1 // 10 + .word int_svcall+1 // 11 svcall + .word reset+1 // 12 + .word reset+1 // 13 + .word reset+1 // 14 + .word int_systick+1 // 15 systick + .word int_alarm+1 // 16 alarm_0 .section .text reset: @@ -118,8 +118,8 @@ wait_vco: bl set_alarm // debug - ldr r3, clocks_base - ldr r0, [r3, #0x54] // CLOCK: CLK_USB_CTRL + ldr r3, rosc_base + ldr r0, [r3, #0] // ROSC: CTRL bl printh loop: @@ -322,6 +322,8 @@ uart0_base: .word 0x40034000 timer_base: .word 0x40054000 +rosc_base: + .word 0x40060000 sio_base: .word 0xd0000000 ppb_base: