Chris: The code you give is running on the ARM side. It's copying data from the PRUs by mmap(). What's running on the PRU side? If it c code, did you take into account the PRU c compiler stores it's stack and heap at the beginning of the shared ram?
--Mark On Saturday, July 18, 2020 at 3:47:28 PM UTC-4 [email protected] wrote: > 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 > > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/6c68d818-fabc-45a7-ab01-6f521b8111fcn%40googlegroups.com.
