PRU IPC module provides APIs for communicating with the PRU core with low latency. The communication is done in the form of blocks of data transfer in one exchange. Options are available for configuring multiple buffers and multiple blocks per buffer. The PRU sends one block of data for all buffers at a time, and the next block after that.
The block diagram for the PRU IPC communication is given below.
SysConfig is used for configuring all the PRU IPC options mentioned above, through PRU IPC module under PRU IO.
CONFIG_PRU_IPC1
using the name passed in SysConfig. This is used as an input to PRU_IPC_open API.ti_drivers_config.c
PRU IPC
under PRU IO
in the left pane in SysConfigti_drivers_config.c
contains sample linker file code which needs to be placed in project's linker file.
Cached+Sharable
for the CPU.This can be done via SysConfig, by adding additional MPU entries using the MPU
module under TI DRIVER PORTING LAYER (DPL)
in SysConfig. Following is an example:
These APIs are for the R5F side. Please also look into the PRU side macros available for usage in PRU firmware.
The PRU IPC is being used in PRU-ADC interfacing examples in which PRU transfers the samples to R5F (to TCM). There, Number of channels correspond to number of buffers and packet size correspond to sample size.
Initialize PRU IPC Instance
Transfer data
Usage on PRU Firmware Side: