Part Number: AM263P4
Other Parts Discussed in Thread: SYSCONFIG
Hi,
We are implementing a software-controlled serial bus master on the PRU, where the GPIO direction needs to change dynamically during a transaction (for example, switching from driving the data line to sampling it, similar to Quad SPI or other bidirectional protocols).
While looking through the documentation, I found the following register:
MSS_CTRL_PRU_ICSS_PRU0_GPIO_OUT_CTRL
The description appears to match exactly what we need:
"GPO output disable for ICSSM Port 0 IO. Disable output for using the pin as input."
I would like to clarify a few points:
- Is this the correct register for dynamically switching a PRU GPIO between output and input during runtime?
- Since this register resides in the MSS_CTRL/IOMUX block, does every runtime modification require unlocking and re-locking the MSS_CTRL KICK protection, or is there another recommended mechanism for frequent direction changes?
- Is this use case (changing GPIO direction during an active PRU communication) an intended use of this register, or is it primarily intended for one-time configuration generated by SysConfig?
- Is there any documented timing for this operation? In particular:
- when does the output-enable change become effective relative to the register write?
- is the change synchronized to the PRU clock?
- is there any required delay before the firmware can safely switch from writing
R30to samplingR31?
Our goal is to implement a deterministic software bus controller entirely on the PRU, so understanding the timing and synchronization of GPIO direction changes is important.
Thank you.