I'm using both PRU0 and PRU1 for data acquition. The PRUs write data to their respective memory blocks and I read the data from the host arm core via mmaps. I.E.,
pru0mem = (int32_t *) mmap(0, MAP_SIZE, PROT_READ, MAP_SHARED, fd, PRU0_RAM & ~MAP_MASK);
pru1mem = (int32_t *) mmap(0, MAP_SIZE, PROT_READ, MAP_SHARED, fd, PRU1_RAM & ~MAP_MASK);
pru0point = (int32_t *) mmap(0, MAP_SIZE, PROT_READ, MAP_SHARED, fd, PRU_SHARED & ~MAP_MASK);
bigbuf[k] = prumem0[k];
...
where bigbuf is a big array on the arm side.
It seems to work, however, when it runs continuously it seems like there is some type of random glitch where occasionally I am getting bad data. Any idea how this could happen? Could it be something with the pru_rproc driver? Is there a better way to do this?
Thanks.
Chris