I am newbie to the raspberry pi world and I am trying to learn how can I build some bare metal programs on a raspberry pi.
I have a raspberry pi 4 model b and I am trying to change the output register value for a specific GPIO. I tried finding the address of the GPIO but not able to find the right address.
Would anyone have any resources like the BCM2835 PDF which defines those register views? Or any other information like how can I find those addresses manually?
My sample code:
Code: Select all
mov r0, #0xF0000000 orr r0, r0, #0x02000000 orr r0, r0, #0x00020000 orr r0, r0, #0x00000008 mov r1, #1 str r1, [r0] mov r0, #0xF0000000 orr r0, r0, #0x00200000 orr r0, r0, #0x0000001c mov r1, #1 lsl r1, r1, #20 str r1, [r0] loop: b loop