Part Number:AM3351
Tool/software: Linux
Looking at the PRU datasheet, the R30 outputs look like they should directly map to the subset of GPIO pins and bypass the OCP interface completely, but all of the example code still enables the OCP interface. Is there a reason for this?
Code from the example is pasted below:
#include <stdint.h> #include <pru_cfg.h> #include "resource_table_empty.h" volatile register uint32_t __R30; volatile register uint32_t __R31; void main(void) { volatile uint32_t gpio; /* Clear SYSCFG[STANDBY_INIT] to enable OCP master port */ CT_CFG.SYSCFG_bit.STANDBY_INIT = 0; /* Toggle GPO pins TODO: Figure out which to use */ gpio = 0x000F; /* TODO: Create stop condition, else it will toggle indefinitely */ while (1) { __R30 ^= gpio; __delay_cycles(100000000); } }