Kernel 5.10 device-tree overlay for using DMA from BBB PRU

perhaps your overlay is fine… why do you suspect it?

I’ve progressed from complete ignorance of the ‘HUB75’ protocol to mere incompetence since yesterday. I haven’t found any timing specifications for the IO manipulation, do you have a reference?

// toggleClock raises and lowers the HUB75 clock signal.
void toggleClock() {
  clock(HI);
  clock(LO);
}

above from pru.c … my ‘C’ skills are meh, but with my projects, it has been necessary to have timing code that controls how much time to leave the clock HI for it to register the data (into the shift register) correctly. The way that you are doing it seems too simple, and I’d suspect this, before debugging the overlay.

knowing this timing info is fundamental to calculating how fast, thus how many led’s that the PRU can manipulate to make the 100 to 200 hz requirement.

I didn’t spend enough time on your code to determine whether I’d suspect the timing for the LATCH, nor do I understand well enough how ‘C’ PRU code manipulates the GPIO through the OCP.

I’d look into the more deterministic ‘fast’ IO available to the PRU. If you’d like to study a practical example, see Turnkey PRU deskclock application for BBB … the IO manipulation is in PRU ASM not ‘C’, and the DMA is limited to a simple transfer of 32bit words from a (linux) ‘C’ program into PRU data space.

any detailed documentation on these devices would be welcome.

gomer