I am using the PRU1 to control I/O pin pr1_pru1_pru_r30[8] as an output. I have configured the device tree to set this pin as output, pulldown, mode 5 in both running and sleep modes.
i.e 0x0e0 (PIN_OUTPUT_PULLDOWN | MUX_MODE5)
What I observe is that while the am3359 boots the output pin goes high for about 5 seconds. This wreaks havoc on the external equipment that I am trying to control during this time.
If I configure the pin as MUX_MODE7 (making it a GPIO pin) then this doesn't happen and the pin stays low during boot. But then the PRU does not have control of the pin.
I thought that I read somewhere that there is a way for the ARM to hand off control of a GPIO to the PRU at run time. Maybe I am just imagining that I read that because I can't find any reference to it now.
My question:
- is there a way to leave the pin as MUX_MODE5 but not have it go high during boot? My hardware already has an external weak pulldown resistor.
- If not, is there a way to switch control of the pin from the ARM to the PRU in application code running in the ARM?