AM261x MCU+ SDK: Introduction

| AM261x MCU+ SDK 26.00.00 |

Introduction

# PRU_ICSSM Subsystem

The Programmable Real-Time Unit Subsystem and Industrial Communication Subsystem (PRU_ICSSM0 and PRU_ICSSM1) consists of:

- Two 32-bit load/store RISC CPU cores — Programmable Real-Time Units (PRU0 and PRU1)
- Data RAMs per PRU core
- Instruction RAMs per PRU
- Shared RAM
- Peripheral modules: UART0, ECAP0, MDIO, IEP0 and IEP1
- Interrupt controller (INTC) per ICSS subsystem

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.

PRU-ICSSM Sub-System Block Diagram

# PRU Core

PRU core is optimized for low latency and jitter. It contains:

- Non pipelined CPU which is 100% deterministic – no jitter in real-time execution
- Broadside interface with 1024 bit wide data bus supports lowest latency transfers
- Register mapped IOs and bit-wise addressing provide max interface flexibility
- Programmed in assembly or C language (or mixed C and inline assembly) with full support in CCS for source level debugging

# PRU Instruction Set

- Arithmetic Operations (green)
- Logic Operations (blue)
- IO Operations (black)
- Program Flow Control (red)

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

# PRU Register Addressing

Possible Addressability in Instructions: Bit, Byte (8-bit), Half-word (16-bit), Word (32-bit), Pointer

Sample assembly code instructions:

ldi r0.b0, 0x18 ; Load Immediate - loads 0x18 value into r0.b0
ldi r0.b2, 0x24 ; Load Immediate - loads 0x24 value into r0.b2
mov r0.w1, r1.w0 ; Copy Value - copies r1.w0 into r0.w1
set r1.b1, r1.b0, 5 ; Set Bit - copies value of r1.b0 into r1.b1 after setting it's 5th bit (0 indexing)
lbbo &r3, r1, r2.w0, b0 ; Load Byte Burst - Copy "r0.b0" bytes into r3 from the memory address r1+r2.w0

# PRU Broadside Accelerators

PRU_ICSSM supports a broadside interface, which uses the XFR (XIN, XOUT, or XCHG) instruction to transfer the contents of 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.

Data processing accelerators

- MAC
- CRC16/32

Data movement accelerators

- XFR2VBUS

# PRU I/O Control Modes

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:

- PRU has full input and output control on all interfaces

  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