No description
.idea | ||
.gitignore | ||
AM335x_PRU.cmd | ||
ll_led_drv.c | ||
Makefile | ||
README.md | ||
resource_table_empty.h |
Looping Louie PRU firmware
This contains the PRU firmware for the leds and light barriers.
Shared memory is used for communication between the PRUs and the Host CPU.
The LED driver runs on PRU0, PRU1 runs the light barrier code.
Memory layout
The shared memory starts at address 0x10000 (PRU) and 0x4A310000 (Host) and has a size of 12KiB.
The first 16 bytes are used as a "management block". Those 16 bytes are split into two 8 byte blocks. The first one is used for PRU0, and the second one for PRU1.
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|
ready | waitFrame | frameReady | reserved | reserved | reserved | reserved | reserved |
ready | EventFlag | lbStatus | switchState | reserved | reserved | reserved | reserved |
Description:
Flag | Set by | Description |
---|---|---|
ready | PRU | PRU is up and running |
waitFrame | PRU | PRU waits for a frame ONLY when this flag is set, the Host is allowed to write to the framebuffer |
frameReady | Host / PRU | Host wrote a frame and wants the PRU to push it Cleared by PRU |
eventFlag | PRU | The PRU found a event on one of the light barriers |
lbStatus | PRU | The status of the light barriers as a bitfield (MSB: Player 7, LSB: Player 0) |
switchState | PRU | The state of the on/off switch (0 = Off, 1 = On) |
Resources
AM335x Technical Referecne Manual:
https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf