I have been reading the Peripherals manual and I have one question plus I would like to ensure I've understood correctly. So far it's going better than I expected
https://www.raspberrypi.org/app/uploads ... herals.pdf
Now, GPFSEL4 is a 32 bit address starting @ 0x20200010 with the bits between 23-21 representing the 47th GPIO pin. The 21'st bit should be set to 1 and the others to zero to make the pin behave as an outputs pin (vs input or alternate function like SA1 from the Alternate Functions table in the manual).
GPSET 0 and 1 together are 64 bits that represent setting the actual pin to either 0 or 1. So left shifting the number 15 by one produces a 32 bit number where the 16th bit is 1 and all others are 0. Setting the address of GPSET1 to this makes the 47th pin 1 because it's the second set of pins, meaning 31 + 16 = 47.
Have I understood all that correctly?
Where does it say that the 47'th pin is for the ACT LED?
Finally in the below paragraph:
I understand the difference between the address bus vs the data bus. But I can't find a good reference on the difference between a physical address and a bus address. The only one I've found is here https://unix.stackexchange.com/a/71422Physical addresses range from 0x20000000 to 0x20FFFFFF for peripherals. The bus
addresses for peripherals are set up to map onto the peripheral bus address range starting at
0x7E000000. Thus a peripheral advertised here at bus address 0x7Ennnnnn is available at
physical address 0x20nnnnnn.
Nevertheless, the address translation is simple enough. So when I see 0x7E200000 for GPFSEL0 it really means 0x20000000 for bare metal purposes. Fair enough...