Other Parts Discussed in Thread: PRU-CGT
I am playing around with the some PRU code on the AM3358. I am using the PRU Software Support Package as a starting point. According to the system memory map, TRM Section 2.1, McASP0 is exposed at two different memory addresses. Additionally the PRU dedicates a constant table entry for MCASP0 in TRM Section 4.4.1.1 which points to the L3 data port. I can define the following in code:
volatile far uint8_t CT_MCASP0 __attribute__((cregister("MCASP0_DMA", near), peripheral));
#define MCASP0_CT (*((volatile uint32_t *) &CT_MCASP0))
#define MCASP0_DAT (*((volatile uint32_t *) 0x46000000))
#define MCASP0_CFG (*((volatile uint32_t *) 0x48038000))
The McASP Rev register is at offset zero, so reading from any of the above defines should return the same known value. However I am seeing MCASP0_CT and MCASP0_DAT always return zero. Only MCASP0_CFG returns the correct result. I do have the OCP master port enabled.
CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;
Is there a reason why accessing McASP0 through the data port and the constant table would fail? Does the PRU not actually have access to the McASP through the constants table?