Hi all,
I followed the PRU Getting Started Guide and the PRU Training Labs, With following code I'm able to toggle some GPO pins without problems. I'm wondering if I can access to other gpios that are not in GPO register, for example access to AM335x gpio1_16. Is that possible ? And if it's possible how can I toggle this pin ?
void main() { uint32_t gpio; /* Clear SYSCFG[STANDBY_INIT] to enable OCP master port */ CT_CFG.SYSCFG_bit.STANDBY_INIT = 0; /* GPI Mode 0, GPO Mode 0 */ CT_CFG.GPCFG0 = 0; gpio = 0xFFFFFFFF; __R30 = 0x0; /* Toggle the LEDs */ /* TODO: Create stop condition, else it will toggle indefinitely */ while(1) { __R30 ^= gpio; __delay_cycles(10000); } }
Thanks in advance,
Enric