This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625: PRU Fast IO

Part Number: AM625

Tool/software:

Hi 

I am using am625 Eval board and I was trying understand how to use the  (fast) GPI mode of the PRU pins.  I was using PRU Header (J10) pins (18, 19 and 20) for testing.

First, I configured the said pins as GPO so I can verify if I can toggle (high/low) in PRU.  I used the following settings below and I can confirmed the pins were doing high and low correctly.

AM62X_IOPAD(0x0050, PIN_INPUT, 4) /* (P22) GPMC0_AD5.PR0_PRU0_GPO5 */
AM62X_IOPAD(0x0054, PIN_INPUT, 4) /* (P21) GPMC0_AD6.PR0_PRU0_GPO6 */
AM62X_IOPAD(0x0058, PIN_INPUT, 4) /* (R23) GPMC0_AD7.PR0_PRU0_GPO7 */

Then, I changed the said pins as GPI:

AM62X_IOPAD(0x0050, PIN_INPUT, 5) /* (P22) GPMC0_AD5.PR0_PRU0_GPI5 */
AM62X_IOPAD(0x0054, PIN_INPUT, 5) /* (P21) GPMC0_AD6.PR0_PRU0_GPI6 */
AM62X_IOPAD(0x0058, PIN_INPUT, 5) /* (R23) GPMC0_AD7.PR0_PRU0_GPI7 */

I used this simple pru code:

volatile register uint32_t __R30;
volatile register uint32_t __R31;

#define BIT7 (1 << 7)
#define BIT5 (1 << 5)

void main(void)
{
	while (1) {		
		if (__R31 & BIT7)
			Debug_Log("BIT7: High\n\r");
		if (__R31 & BIT5)
			Debug_Log("BIT5: High\n\r");
	}
}

If I assert the pins to high I did not see the change in the input pins. I tried to set 

CT_CFG.gpcfg0_reg_bit.pru0_gpi_mode = 1; and still getting same behavior.
can I have some guidance on how to to use the gpi mode?
Regards,
John