Hello all,
I’m trying to control my particle photon by interacting directly with the control registers. I’ve been trying to control the on board LED pin D7 as it is the most convenient feedback available.
I did some research into the microprocessor and the GPIO pins/ports.
The LED pin (D7) is assigned to pin PA13 on the actual STM32 microprocessor. PA13 belongs to Port A. In the STM datasheet, they refer to the ports/registers as GPIOx_function where x=A-I (A in our case) and function is the name of the different register (different registers that set pin mode/read/write)
For starters I’m trying to set the D7 pin to be an output, As far as I know, this is done using the MODER register (GPIOA_MODER). The register is 32 bits long, saving two bits per pin (01 refers to the pin being set to output).
After setting it to an output, I’m trying to write a digital high on the pin using the IDR register (GPIOA_ODR) (ODR standing for output data register).
I’m having issues with actually implementing this using the particle build. If anyone has done something similar or can point me in a direction, I would be forever grateful.
I know I can use pinMode and then use digitalWrite or even digitalWriteFast. I am only interested in controlling the pins through their respective control registers.
Many thanks in advance!
Gio