AM64x MCU+ SDK  08.02.00
APIs for PRU IPC: R5F-PRU communication

Introduction

This module contains APIs which are used by the R5F cores to transfer data to and from PRU cores.

Data Structures

struct  PRU_IPC_Attrs
 
struct  PRU_IPC_Params
 
struct  PRU_IPC_Object
 
struct  PRU_IPC_Config
 This struct is used to store configurables for PRU_IPC. More...
 

Functions

void PRU_IPC_init (void)
 This function initializes the PRU_IPC module. More...
 
void PRU_IPC_deinit (void)
 This function deinitializes the PRU_IPC module. More...
 
void PRU_IPC_Params_init (PRU_IPC_Params *params)
 Function to set default values of PRU_IPC_Params in params. More...
 
PRU_IPC_Handle PRU_IPC_open (uint32_t idx, PRU_IPC_Params *params)
 To initialize and configure PRU_IPC instance. More...
 
void PRU_IPC_close (PRU_IPC_Handle handle)
 To stop/end PRU_IPC instance. More...
 
uint16_t PRU_IPC_getBlockId (PRU_IPC_Handle handle)
 Reads the id of last written block by PRU from the PRU-Config memory. More...
 
int32_t PRU_IPC_getData (PRU_IPC_Handle handle, void *container)
 Reads the data from the configured shared memory. More...
 
int32_t PRU_IPC_sendData (PRU_IPC_Handle handle, void *container)
 Send/Write data to the configured shared memory (generates interrupt to PRU if it is enabled) More...
 

Typedefs

typedef struct PRU_IPC_Config_s * PRU_IPC_Handle
 A handle that is returned from a PRU_IPC_open() call. This handle is required for calling other PRU_IPC APIs. More...
 
typedef void(* PRU_IPC_CallbackFxn) (void *args)
 A Callback function required to register callback on data receive if receive interrupt is enabled. More...
 

Typedef Documentation

◆ PRU_IPC_Handle

typedef struct PRU_IPC_Config_s* PRU_IPC_Handle

A handle that is returned from a PRU_IPC_open() call. This handle is required for calling other PRU_IPC APIs.

◆ PRU_IPC_CallbackFxn

typedef void(* PRU_IPC_CallbackFxn) (void *args)

A Callback function required to register callback on data receive if receive interrupt is enabled.

Function Documentation

◆ PRU_IPC_init()

void PRU_IPC_init ( void  )

This function initializes the PRU_IPC module.

◆ PRU_IPC_deinit()

void PRU_IPC_deinit ( void  )

This function deinitializes the PRU_IPC module.

◆ PRU_IPC_Params_init()

void PRU_IPC_Params_init ( PRU_IPC_Params params)

Function to set default values of PRU_IPC_Params in params.

Parameters
[in]paramspointer to the structure to be initialized

◆ PRU_IPC_open()

PRU_IPC_Handle PRU_IPC_open ( uint32_t  idx,
PRU_IPC_Params params 
)

To initialize and configure PRU_IPC instance.

Parameters
[in]idxIdentifier for instance to use (generated by sysconfig)
[in]paramspointer to the PRU_IPC_Params structure
Returns
PRU_IPC_Handle in case of success, NULL otherwise

◆ PRU_IPC_close()

void PRU_IPC_close ( PRU_IPC_Handle  handle)

To stop/end PRU_IPC instance.

Parameters
[in]handlePRU_IPC_Handle returned from PRU_IPC_open()

◆ PRU_IPC_getBlockId()

uint16_t PRU_IPC_getBlockId ( PRU_IPC_Handle  handle)

Reads the id of last written block by PRU from the PRU-Config memory.

Parameters
[in]handlePRU_IPC_Handle returned from PRU_IPC_open()
Returns
Returns the id of last written block by PRU

◆ PRU_IPC_getData()

int32_t PRU_IPC_getData ( PRU_IPC_Handle  handle,
void *  container 
)

Reads the data from the configured shared memory.

Parameters
[in]handlePRU_IPC_Handle returned from PRU_IPC_open()
[in,out]containerTo store the data read from the configured shared memory, type: 2D Array - int(size)_t container[BUFFERS][BLOCKSIZE]
Returns
SystemP_SUCCESS in case of success, SystemP_FAILURE otherwise

◆ PRU_IPC_sendData()

int32_t PRU_IPC_sendData ( PRU_IPC_Handle  handle,
void *  container 
)

Send/Write data to the configured shared memory (generates interrupt to PRU if it is enabled)

Parameters
[in]handlePRU_IPC_Handle returned from PRU_IPC_open()
[in]containerTo write the data to the configured shared memory type: 2D Array - int(size)_t container[BUFFERS][BLOCKSIZE]
Returns
SystemP_SUCCESS in case of success, SystemP_FAILURE otherwise