04-30-2021, 10:31 AM
Hello!
I made some progress in figuring out where the address of the LED light is in RAM. Based off some of the other posts, I know that the light next to the reset switch is Blue. The Blue LED listed at the bottom of page 12 on the schematic
https://files.pine64.org/doc/SOPINE-A64/...180130.pdf
is connected to PL7. According to the User Manual
https://files.pine64.org/doc/datasheet/p...l_V1.0.pdf
PL7 is a GPIO pin, to write to it you have to enable output at PL Configure Register 0. In section 3.22.1 of the above manual, it says that PIO has a base address of
0x01F02C00
and PL configure Register 0 has offset
0*0x24 + 0x00
There are 32 bits at Register 0, and the one at PL7 is bits 30:28. I would need to set these 3 bits to Output which is the bit sequence 001. At the PL Data register is where I would need to set the value of the pin. Now the PL_DAT location's offset from the PIO Base Address
0*0x24+ 0x10
From there the state of the Pin 7, which is bit 7 should be set to 0 ( I think low states correspond to the pin being on for the LED light based off of other posts here on writing to the GPIO using shell commands on linux).
Hope that helps anybody else who happened to be curious. Also pardon for any errors, I haven't tested everything just yet.
I made some progress in figuring out where the address of the LED light is in RAM. Based off some of the other posts, I know that the light next to the reset switch is Blue. The Blue LED listed at the bottom of page 12 on the schematic
https://files.pine64.org/doc/SOPINE-A64/...180130.pdf
is connected to PL7. According to the User Manual
https://files.pine64.org/doc/datasheet/p...l_V1.0.pdf
PL7 is a GPIO pin, to write to it you have to enable output at PL Configure Register 0. In section 3.22.1 of the above manual, it says that PIO has a base address of
0x01F02C00
and PL configure Register 0 has offset
0*0x24 + 0x00
There are 32 bits at Register 0, and the one at PL7 is bits 30:28. I would need to set these 3 bits to Output which is the bit sequence 001. At the PL Data register is where I would need to set the value of the pin. Now the PL_DAT location's offset from the PIO Base Address
0*0x24+ 0x10
From there the state of the Pin 7, which is bit 7 should be set to 0 ( I think low states correspond to the pin being on for the LED light based off of other posts here on writing to the GPIO using shell commands on linux).
Hope that helps anybody else who happened to be curious. Also pardon for any errors, I haven't tested everything just yet.