The Programmable Real-Time Unit Subsystem and Industrial Communication Subsystem (PRU_ICSSG) consists of:
The programmable nature of the PRU cores, along with their access to pins, events and all device resources, provides flexibility in implementing fast real-time responses, specialized data handling operations, custom peripheral interfaces, and in offloading tasks from the other processor cores of the device. The PRU cores are programmed with a small, deterministic instruction set. Each PRU can operate independently or in coordination with each other and can also work in coordination with the device-level host CPU. This interaction between processors is determined by the nature of the firmware loaded into the PRU’s instruction memory.
Refer to latest AM64x TRM (Technical Reference Manual) for complete details. (Can be found here: https://www.ti.com/product/AM6442)
PRU core is optimized for low latency and jitter. It contains:
ADD | ADC | SUB | SUC | RSB | RSC | |||||||||
LSL | LSR | AND | OR | XOR | NOT | MIN | MAX | CLR | SET | LMBD | ||||
MOV | LDI | LDI32 | LBBO | SBBO | LBCO | SBCO | MVIB | MVIW | MVID | ZERO | XIN | XOUT | TSEN | |
JAL | JMP | QBGT | QBGE | QBLT | QBLE | QBEQ | QBNE | QBA | QBBS | QBBC | WBS | WBC | HALT | SLP |
Refer for usage details: PRU Assembly Instruction User Guide
Possible Addressability in Instructions: Bit, Byte (8-bit), Half-word (16-bit), Word (32-bit), Pointer
Sample assembly code instructions:
PRU_ICSSG supports a broadside interface, which uses the XFR (XIN, XOUT, or XCHG) instruction to transfer the contents of PRUn, RTU_PRUn or TX_PRUn (where n = 0 or 1) registers to or from accelerators. This interface enables up to 30 registers (R0-R29, or 120 bytes) to be transferred in a single instruction.
Each slice is directly connected to 20 GPIO pins which can be controlled by the PRUs using R30 register and pin values can be read using R31 register. By default PRU0 and PRU1 cores are able to control the respective GPIO pins (after they have been correctly pinmuxed). Overall:
Direct Output | 20 GPOs R30[19-0] |
---|---|
Direct Input | 20 GPIs R31[19-0] |
16 bit parallel capture | 16 GPIs R31[15-0], CLK R31[16] |
Serial shift out mode | DATAOUT GPO0, CLKOUT GPO1, two 16 bit shadow register, core_clock based |
Serial shift in mode | DATAIN GPO0, 28 bit shift register, CNT_16 flag, core_clock with two fractional divider 1, 1.5, 2 … |
9 x Sigma Delta | sinc1/2/3 accumulators, OSR4..256, fast detect |
3 x Peripheral Interface | encoder (RS-485) interface |
The PRU_ICSSG system integrates 6 Task Managers used for efficient switching between tasks. There is one dedicated task manager for each PRU, RTU and TX_PRU core (PRU0/ PRU1, RTU_PRU0/ RTU_PRU1 and TX_PRU0/ TX_PRU1 cores), which are described in the subsequent sections. Each task manager works independently from the others.