This module contains APIs to program and use the PRUICSS module. Programmable Real-Time Unit and Industrial Communication Subsystem(PRUICSS) allows implementation of various high-performance industrial control algorithms and industrial interface standards.
Data Structures | |
struct | PRUICSS_SysevtToChannelMap |
Data structure used for system event to channel mapping in PRUICSS. More... | |
struct | PRUICSS_ChannelToHostMap |
Data structure used for channel to host map in PRUICSS. More... | |
struct | PRUICSS_IntcInitData |
PRUICSS Interrupt controller initialisation data structure. More... | |
struct | PRUICSS_IrqFunMap |
PRUICSS IRQ handler mapping structure. More... | |
struct | PRUICSS_Object |
PRUICSS Object. More... | |
struct | PRUICSS_HwAttrs |
PRUICSS Hardware Attributes. More... | |
struct | PRUICSS_Config |
PRUICSS Global configuration structure. More... | |
Functions | |
int32_t | PRUICSS_init (void) |
This function initializes the PRUICSS module. More... | |
int32_t | PRUICSS_deinit (void) |
This function de-initializes the PRUICSS module. More... | |
PRUICSS_Handle | PRUICSS_open (uint32_t index) |
This function creates the handle for a PRUICSS instance. More... | |
int32_t | PRUICSS_close (PRUICSS_Handle handle) |
This function deletes the handle for a PRUICSS instance. More... | |
int32_t | PRUICSS_intcInit (PRUICSS_Handle handle, const PRUICSS_IntcInitData *intcInitData) |
This function does Interrupt-Channel-host mapping. More... | |
int32_t | PRUICSS_registerIrqHandler (PRUICSS_Handle handle, uint32_t pruEvtoutNum, int32_t intrNum, int32_t eventNum, uint8_t waitEnable, PRUICSS_IrqHandler irqHandler) |
This function registers an Interrupt Handler for an event. More... | |
int32_t | PRUICSS_resetCore (PRUICSS_Handle handle, uint8_t pruNum) |
This function resets the PRU. More... | |
int32_t | PRUICSS_disableCore (PRUICSS_Handle handle, uint8_t pruNum) |
This function disables the PRU. More... | |
int32_t | PRUICSS_enableCore (PRUICSS_Handle handle, uint8_t pruNum) |
This function enables the PRU. More... | |
uint32_t | PRUICSS_initMemory (PRUICSS_Handle handle, uint32_t pruicssMem) |
This function initializes the PRU memory to zero. More... | |
uint32_t | PRUICSS_writeMemory (PRUICSS_Handle handle, uint32_t pruicssMem, uint32_t wordoffset, const uint32_t *source_mem, uint32_t bytelength) |
This function writes the given data to PRU memory. More... | |
uint32_t | PRUICSS_readMemory (PRUICSS_Handle handle, uint32_t pruicssMem, uint32_t wordoffset, uint32_t *dest_mem, uint32_t bytelength) |
This function reads from PRU memory and stores in block of memory. More... | |
int32_t | PRUICSS_sendEvent (PRUICSS_Handle handle, uint32_t eventnum) |
This function generates an INTC event. It should be called only after successful execution of PRUICSS_intcInit(). More... | |
int32_t | PRUICSS_waitEvent (PRUICSS_Handle handle, uint32_t pruEvtoutNum) |
This function waits for a system event to happen. It should be called only after successful execution of PRUICSS_intcInit(). More... | |
int32_t | PRUICSS_clearEvent (PRUICSS_Handle handle, uint32_t eventnum) |
This function clears an INTC event. It should be called only after successful execution of PRUICSS_intcInit(). More... | |
int32_t | PRUICSS_sendWaitClearEvent (PRUICSS_Handle handle, uint32_t sendEventNum, uint32_t pruEvtoutNum, uint32_t ackEventNum) |
This function generates an INTC event, waits for AINTC event and clears an INTC event. More... | |
uint32_t | PRUICSS_getVersion (PRUICSS_Handle handle) |
Get PRUICSS version number from ICSSCFG_REVID register. More... | |
int32_t | PRUICSS_setConstantTblEntry (PRUICSS_Handle handle, uint8_t pruNum, int32_t constantTblEntry, uint32_t constantTblVal) |
This API updates the constant table for specified constant table entry which have write permissions. More... | |
int32_t | PRUICSS_setIepClkSrc (PRUICSS_Handle handle, uint32_t source) |
This API configures the source of the IEP clock to be either IEP CLK as the source or ICSSGn_CORE_CLK. More... | |
int32_t | PRUICSS_setGpMuxSelect (PRUICSS_Handle handle, uint8_t pruNum, uint8_t mode) |
This API sets the GP Mux Select mode for a specific PRU. More... | |
int32_t | PRUICSS_setGpiMode (PRUICSS_Handle handle, uint8_t pruNum, uint8_t mode) |
This API sets the GPI mode for a specific PRU. More... | |
int32_t | PRUICSS_setSaMuxMode (PRUICSS_Handle handle, uint8_t mode) |
This API sets the G_MUX_EN mux field in ICSSG_SA_MX_REG register. More... | |
int32_t | PRUICSS_configureCycleCounter (PRUICSS_Handle handle, uint8_t pruNum, uint8_t enable) |
This function enables/disables the PRU Cycle Counter for a core. More... | |
int32_t | PRUICSS_controlIepCounter (PRUICSS_Handle handle, uint8_t iepInstance, uint8_t enable) |
This API enables/disables the counter in IEP module. More... | |
int32_t | PRUICSS_setIepCounterIncrementValue (PRUICSS_Handle handle, uint8_t iepInstance, uint8_t value) |
This API sets the default increment value for counter in IEP module. This value is used when compensation is not active. More... | |
int32_t | PRUICSS_readEfuse (PRUICSS_Handle handle, uint8_t *data) |
This API reads the state of efuse bits from ICSSG_HWDIS_REG register. More... | |
int32_t | PRUICSS_setIcssCfgMiiMode (PRUICSS_Handle handle, uint8_t miiInstance, uint8_t mode) |
This API sets the MII mode in MII_G_RT_ICSS_G_CFG register. More... | |
int32_t | PRUICSS_setIcssCfgTxFifo (PRUICSS_Handle handle, uint8_t fifoInstance, uint8_t enable) |
This API configures the TX FIFO to be used. More... | |
const PRUICSS_HwAttrs * | PRUICSS_getAttrs (uint32_t instance) |
Return PRUICSS attributes. More... | |
int32_t | PRUICSS_loadFirmware (PRUICSS_Handle handle, uint8_t pruIcssCore, const uint32_t pruFirmware[], uint32_t byteLength) |
This API disables pruIcssCore, loads IMEM, resets pruIcssCore, enables pruIcssCore. More... | |
Typedefs | |
typedef void(* | PRUICSS_IrqHandler) (void *buf) |
typedef struct PRUICSS_Config_s * | PRUICSS_Handle |
A handle that is returned from a PRUICSS_open() call. This handle is required for calling other APIs. More... | |
Macros | |
#define | PRUICSS_NUM_CORES (6U) |
Number of different cores present in PRUICSS. More... | |
#define | PRUICSS_INTC_NUM_HOST_INTERRUPTS (20U) |
Number of Host Interrupts supported in PRUICSS Local INTC. More... | |
#define | PRUICSS_INTC_NUM_CHANNELS (20U) |
Number of Output Interrupt channels supported in PRUICSS Local INTC. More... | |
#define | PRUICSS_INTC_NUM_SYS_EVTS (160U) |
Number of Events that can be captured in PRUICSS Local INTC. More... | |
#define | PRUICSS_NUM_GP_MUX_SEL_MODES (4U) |
Number of different GP MUX Selections modes. More... | |
#define | PRUICSS_NUM_GPI_MODES (4U) |
Number of different GPI modes. More... | |
#define | PRUICSS_NUM_SA_MUX_MODES (2U) |
Number of different PRUICSS SA MUX Modes. More... | |
#define | PRUICSS_NUM_ICSS_CFG_MII_MODES (3U) |
Number of different ICSS_G_CFG MII Modes. More... | |
PRUICSS Cores | |
Different cores present in PRUICSS | |
#define | PRUICSS_PRU0 (0U) |
#define | PRUICSS_PRU1 (1U) |
#define | PRUICSS_RTU_PRU0 (2U) |
#define | PRUICSS_RTU_PRU1 (3U) |
#define | PRUICSS_TX_PRU0 (4U) |
#define | PRUICSS_TX_PRU1 (5U) |
PRUICSS Memory Offsets | |
Offsets for different memory inside each PRUICSS instance. | |
#define | PRUICSS_DATARAM(n) (0x00000U + ((n) * 0x02000U)) |
Data RAM0/RAM1. n = 0 for RAM0, n = 1 for RAM1. More... | |
#define | PRUICSS_IRAM_RTU_PRU(n) (0x04000U + ((n) * 0x02000U)) |
IRAM for RTU_PRU0/RTU_PRU1. n = 0 for RTU_PRU0,n = 1 for RTU_PRU1. More... | |
#define | PRUICSS_IRAM_TX_PRU(n) (0x0A000U + ((n) * 0x02000U)) |
IRAM for TX_PRU0/TX_PRU1. n = 0 for TX_PRU0,n = 1 for TX_PRU1. More... | |
#define | PRUICSS_SHARED_RAM (0x10000U) |
Data RAM2 (shared) More... | |
#define | PRUICSS_IRAM_PRU(n) (0x34000U + ((n) * 0x04000U)) |
IRAM for PRU0/PRU1. n = 0 for PRU0,n = 1 for PRU1. More... | |
Index for PRU Constant Table Entries | |
Index to be used while making calls to PRUICSS_setConstantTblEntry() | |
#define | PRUICSS_CONST_TBL_ENTRY_C24 (0U) |
#define | PRUICSS_CONST_TBL_ENTRY_C25 (1U) |
#define | PRUICSS_CONST_TBL_ENTRY_C26 (2U) |
#define | PRUICSS_CONST_TBL_ENTRY_C27 (3U) |
#define | PRUICSS_CONST_TBL_ENTRY_C28 (4U) |
#define | PRUICSS_CONST_TBL_ENTRY_C29 (5U) |
#define | PRUICSS_CONST_TBL_ENTRY_C30 (6U) |
#define | PRUICSS_CONST_TBL_ENTRY_C31 (7U) |
#define | PRUICSS_NUM_CONST_TBL_ENTRY (8U) |
GP MUX Select Modes | |
#define | PRUICSS_GP_MUX_SEL_MODE_GP (0U) |
#define | PRUICSS_GP_MUX_SEL_MODE_ENDAT (1U) |
#define | PRUICSS_GP_MUX_SEL_MODE_MII (2U) |
#define | PRUICSS_GP_MUX_SEL_MODE_SD (3U) |
GPI Modes | |
#define | PRUICSS_GPI_MODE_DIRECT_R31_STATUS (0U) |
Direct connect of PRU[0/1]_r31_status[29:0]. More... | |
#define | PRUICSS_GPI_MODE_PARALLEL_16_BIT_CAPTURE (1U) |
Parallel 16-bit capture mode. PRU[0/1]_r31_status [15:0] is captured using PRU[0/1]_r31_status [16]. More... | |
#define | PRUICSS_GPI_MODE_29_BIT_SHIFT (2U) |
29-bit shift. PRU[0/1]_r31_status[0] -> r31_status[0] -> r31_status[1] -> r_status[28] -> bit bucket More... | |
#define | PRUICSS_GPI_MODE_MII_RT (3U) |
mii_rt mode. Selects mii_rt PRU[0/1] bus More... | |
PRUICSS SA MUX Modes | |
#define | PRUICSS_SA_MUX_MODE_DEFAULT (0U) |
Default/Legacy Mode. More... | |
#define | PRUICSS_SA_MUX_MODE_SD_ENDAT (1U) |
Few SD and EnDAT pins get remapped to enable different usecase. More... | |
ICSS_G_CFG MII Modes | |
#define | PRUICSS_ICSS_CFG_MII_MODE_MII (0U) |
MII Mode. More... | |
#define | PRUICSS_ICSS_CFG_MII_MODE_RGMII (1U) |
RGMII Mode. More... | |
#define | PRUICSS_ICSS_CFG_MII_MODE_SGMII (2U) |
SGMII mode. It is supported only for PRU_ICSSG instance. More... | |
PRUICSS TX FIFO Modes | |
#define | PRUICSS_TX_L1_FIFO (0U) |
#define | PRUICSS_TX_L2_FIFO (1U) |
#define PRUICSS_PRU0 (0U) |
#define PRUICSS_PRU1 (1U) |
#define PRUICSS_RTU_PRU0 (2U) |
#define PRUICSS_RTU_PRU1 (3U) |
#define PRUICSS_TX_PRU0 (4U) |
#define PRUICSS_TX_PRU1 (5U) |
#define PRUICSS_NUM_CORES (6U) |
Number of different cores present in PRUICSS.
#define PRUICSS_DATARAM | ( | n | ) | (0x00000U + ((n) * 0x02000U)) |
Data RAM0/RAM1. n = 0 for RAM0, n = 1 for RAM1.
#define PRUICSS_IRAM_RTU_PRU | ( | n | ) | (0x04000U + ((n) * 0x02000U)) |
IRAM for RTU_PRU0/RTU_PRU1. n = 0 for RTU_PRU0,n = 1 for RTU_PRU1.
#define PRUICSS_IRAM_TX_PRU | ( | n | ) | (0x0A000U + ((n) * 0x02000U)) |
IRAM for TX_PRU0/TX_PRU1. n = 0 for TX_PRU0,n = 1 for TX_PRU1.
#define PRUICSS_SHARED_RAM (0x10000U) |
Data RAM2 (shared)
#define PRUICSS_IRAM_PRU | ( | n | ) | (0x34000U + ((n) * 0x04000U)) |
IRAM for PRU0/PRU1. n = 0 for PRU0,n = 1 for PRU1.
#define PRUICSS_INTC_NUM_HOST_INTERRUPTS (20U) |
Number of Host Interrupts supported in PRUICSS Local INTC.
#define PRUICSS_INTC_NUM_CHANNELS (20U) |
Number of Output Interrupt channels supported in PRUICSS Local INTC.
#define PRUICSS_INTC_NUM_SYS_EVTS (160U) |
Number of Events that can be captured in PRUICSS Local INTC.
#define PRUICSS_CONST_TBL_ENTRY_C24 (0U) |
#define PRUICSS_CONST_TBL_ENTRY_C25 (1U) |
#define PRUICSS_CONST_TBL_ENTRY_C26 (2U) |
#define PRUICSS_CONST_TBL_ENTRY_C27 (3U) |
#define PRUICSS_CONST_TBL_ENTRY_C28 (4U) |
#define PRUICSS_CONST_TBL_ENTRY_C29 (5U) |
#define PRUICSS_CONST_TBL_ENTRY_C30 (6U) |
#define PRUICSS_CONST_TBL_ENTRY_C31 (7U) |
#define PRUICSS_NUM_CONST_TBL_ENTRY (8U) |
#define PRUICSS_GP_MUX_SEL_MODE_GP (0U) |
#define PRUICSS_GP_MUX_SEL_MODE_ENDAT (1U) |
#define PRUICSS_GP_MUX_SEL_MODE_MII (2U) |
#define PRUICSS_GP_MUX_SEL_MODE_SD (3U) |
#define PRUICSS_NUM_GP_MUX_SEL_MODES (4U) |
Number of different GP MUX Selections modes.
#define PRUICSS_GPI_MODE_DIRECT_R31_STATUS (0U) |
Direct connect of PRU[0/1]_r31_status[29:0].
#define PRUICSS_GPI_MODE_PARALLEL_16_BIT_CAPTURE (1U) |
Parallel 16-bit capture mode. PRU[0/1]_r31_status [15:0] is captured using PRU[0/1]_r31_status [16].
#define PRUICSS_GPI_MODE_29_BIT_SHIFT (2U) |
29-bit shift. PRU[0/1]_r31_status[0] -> r31_status[0] -> r31_status[1] -> r_status[28] -> bit bucket
#define PRUICSS_GPI_MODE_MII_RT (3U) |
mii_rt mode. Selects mii_rt PRU[0/1] bus
#define PRUICSS_NUM_GPI_MODES (4U) |
Number of different GPI modes.
#define PRUICSS_SA_MUX_MODE_DEFAULT (0U) |
Default/Legacy Mode.
#define PRUICSS_SA_MUX_MODE_SD_ENDAT (1U) |
Few SD and EnDAT pins get remapped to enable different usecase.
#define PRUICSS_NUM_SA_MUX_MODES (2U) |
Number of different PRUICSS SA MUX Modes.
#define PRUICSS_ICSS_CFG_MII_MODE_MII (0U) |
MII Mode.
#define PRUICSS_ICSS_CFG_MII_MODE_RGMII (1U) |
RGMII Mode.
#define PRUICSS_ICSS_CFG_MII_MODE_SGMII (2U) |
SGMII mode. It is supported only for PRU_ICSSG instance.
#define PRUICSS_NUM_ICSS_CFG_MII_MODES (3U) |
Number of different ICSS_G_CFG MII Modes.
#define PRUICSS_TX_L1_FIFO (0U) |
#define PRUICSS_TX_L2_FIFO (1U) |
typedef void(* PRUICSS_IrqHandler) (void *buf) |
typedef struct PRUICSS_Config_s* PRUICSS_Handle |
A handle that is returned from a PRUICSS_open() call. This handle is required for calling other APIs.
int32_t PRUICSS_init | ( | void | ) |
This function initializes the PRUICSS module.
int32_t PRUICSS_deinit | ( | void | ) |
This function de-initializes the PRUICSS module.
PRUICSS_Handle PRUICSS_open | ( | uint32_t | index | ) |
This function creates the handle for a PRUICSS instance.
index | Index of config to use in the gPruIcssConfig array |
int32_t PRUICSS_close | ( | PRUICSS_Handle | handle | ) |
This function deletes the handle for a PRUICSS instance.
handle | PRUICSS_Handle returned from PRUICSS_open() |
int32_t PRUICSS_intcInit | ( | PRUICSS_Handle | handle, |
const PRUICSS_IntcInitData * | intcInitData | ||
) |
This function does Interrupt-Channel-host mapping.
handle | PRUICSS_Handle returned from PRUICSS_open() |
intcInitData | Pointer to structure of type PRUICSS_IntcInitData containing mapping information |
int32_t PRUICSS_registerIrqHandler | ( | PRUICSS_Handle | handle, |
uint32_t | pruEvtoutNum, | ||
int32_t | intrNum, | ||
int32_t | eventNum, | ||
uint8_t | waitEnable, | ||
PRUICSS_IrqHandler | irqHandler | ||
) |
This function registers an Interrupt Handler for an event.
handle | PRUICSS_Handle returned from PRUICSS_open() |
pruEvtoutNum | The ARM side event number |
intrNum | Interrupt number of R5F |
eventNum | Event number of PRUICSS |
waitEnable | Flag specifying whether application can wait on this interrupt using PRUICSS_waitEvent() function. 1 for enable, 0 for disable |
irqHandler | Pointer to a function which will be called on interrupt |
int32_t PRUICSS_resetCore | ( | PRUICSS_Handle | handle, |
uint8_t | pruNum | ||
) |
This function resets the PRU.
handle | PRUICSS_Handle returned from PRUICSS_open() |
pruNum | PRU core number from PRUICSS_Cores |
int32_t PRUICSS_disableCore | ( | PRUICSS_Handle | handle, |
uint8_t | pruNum | ||
) |
This function disables the PRU.
handle | PRUICSS_Handle returned from PRUICSS_open() |
pruNum | PRU core number from PRUICSS_Cores |
int32_t PRUICSS_enableCore | ( | PRUICSS_Handle | handle, |
uint8_t | pruNum | ||
) |
This function enables the PRU.
handle | PRUICSS_Handle returned from PRUICSS_open() |
pruNum | PRU core number from PRUICSS_Cores |
uint32_t PRUICSS_initMemory | ( | PRUICSS_Handle | handle, |
uint32_t | pruicssMem | ||
) |
This function initializes the PRU memory to zero.
handle | PRUICSS_Handle returned from PRUICSS_open() |
pruicssMem | PRUICSS Memory macro from PRUICSS_MemoryOffsets |
uint32_t PRUICSS_writeMemory | ( | PRUICSS_Handle | handle, |
uint32_t | pruicssMem, | ||
uint32_t | wordoffset, | ||
const uint32_t * | source_mem, | ||
uint32_t | bytelength | ||
) |
This function writes the given data to PRU memory.
handle | PRUICSS_Handle returned from PRUICSS_open() |
pruicssMem | PRUICSS Memory macro from PRUICSS_MemoryOffsets |
wordoffset | Offset at which the write will happen |
source_mem | Source memory[ Array of uint32_t integers ] |
bytelength | Total number of bytes to be writen |
uint32_t PRUICSS_readMemory | ( | PRUICSS_Handle | handle, |
uint32_t | pruicssMem, | ||
uint32_t | wordoffset, | ||
uint32_t * | dest_mem, | ||
uint32_t | bytelength | ||
) |
This function reads from PRU memory and stores in block of memory.
handle | PRUICSS_Handle returned from PRUICSS_open() |
pruicssMem | PRUICSS Memory macro from PRUICSS_MemoryOffsets |
wordoffset | Offset at which the read will happen |
dest_mem | Destination memory[ Array of uint32_t integers ] |
bytelength | Total number of bytes to be read |
int32_t PRUICSS_sendEvent | ( | PRUICSS_Handle | handle, |
uint32_t | eventnum | ||
) |
This function generates an INTC event. It should be called only after successful execution of PRUICSS_intcInit().
handle | PRUICSS_Handle returned from PRUICSS_open() |
eventnum | The INTC Event number |
int32_t PRUICSS_waitEvent | ( | PRUICSS_Handle | handle, |
uint32_t | pruEvtoutNum | ||
) |
This function waits for a system event to happen. It should be called only after successful execution of PRUICSS_intcInit().
handle | PRUICSS_Handle returned from PRUICSS_open() |
pruEvtoutNum | The AINTC Event number |
int32_t PRUICSS_clearEvent | ( | PRUICSS_Handle | handle, |
uint32_t | eventnum | ||
) |
This function clears an INTC event. It should be called only after successful execution of PRUICSS_intcInit().
handle | PRUICSS_Handle returned from PRUICSS_open() |
eventnum | The INTC Event number |
int32_t PRUICSS_sendWaitClearEvent | ( | PRUICSS_Handle | handle, |
uint32_t | sendEventNum, | ||
uint32_t | pruEvtoutNum, | ||
uint32_t | ackEventNum | ||
) |
This function generates an INTC event, waits for AINTC event and clears an INTC event.
handle | PRUICSS_Handle returned from PRUICSS_open() |
sendEventNum | Event number |
pruEvtoutNum | PRU Event number |
ackEventNum | Acknowledgement event number |
uint32_t PRUICSS_getVersion | ( | PRUICSS_Handle | handle | ) |
Get PRUICSS version number from ICSSCFG_REVID register.
handle | PRUICSS_Handle returned from PRUICSS_open() |
int32_t PRUICSS_setConstantTblEntry | ( | PRUICSS_Handle | handle, |
uint8_t | pruNum, | ||
int32_t | constantTblEntry, | ||
uint32_t | constantTblVal | ||
) |
This API updates the constant table for specified constant table entry which have write permissions.
handle | PRUICSS_Handle returned from PRUICSS_open() |
pruNum | PRU core number from PRUICSS_Cores |
constantTblEntry | contant table entry being updated |
constantTblVal | contant table value to be written |
int32_t PRUICSS_setIepClkSrc | ( | PRUICSS_Handle | handle, |
uint32_t | source | ||
) |
This API configures the source of the IEP clock to be either IEP CLK as the source or ICSSGn_CORE_CLK.
handle | PRUICSS_Handle returned from PRUICSS_open() |
source | source of the IEP clock (0 for IEP CLK, 1 for ICSSGn_CORE_CLK) |
int32_t PRUICSS_setGpMuxSelect | ( | PRUICSS_Handle | handle, |
uint8_t | pruNum, | ||
uint8_t | mode | ||
) |
This API sets the GP Mux Select mode for a specific PRU.
handle | PRUICSS_Handle returned from PRUICSS_open() |
pruNum | PRUICSS_PRU0 or PRUICSS_PRU1 |
mode | Mode from PRUICSS_GpMuxSelectModes |
int32_t PRUICSS_setGpiMode | ( | PRUICSS_Handle | handle, |
uint8_t | pruNum, | ||
uint8_t | mode | ||
) |
This API sets the GPI mode for a specific PRU.
handle | PRUICSS_Handle returned from PRUICSS_open() |
pruNum | PRUICSS_PRU0 or PRUICSS_PRU1 |
mode | Mode from PRUICSS_GpiModes |
int32_t PRUICSS_setSaMuxMode | ( | PRUICSS_Handle | handle, |
uint8_t | mode | ||
) |
This API sets the G_MUX_EN mux field in ICSSG_SA_MX_REG register.
handle | PRUICSS_Handle returned from PRUICSS_open() |
mode | Mode from PRUICSS_SaMuxModes |
int32_t PRUICSS_configureCycleCounter | ( | PRUICSS_Handle | handle, |
uint8_t | pruNum, | ||
uint8_t | enable | ||
) |
This function enables/disables the PRU Cycle Counter for a core.
handle | PRUICSS_Handle returned from PRUICSS_open() |
pruNum | PRU core number from PRUICSS_Cores |
enable | 0 for disable, 1 for enable |
int32_t PRUICSS_controlIepCounter | ( | PRUICSS_Handle | handle, |
uint8_t | iepInstance, | ||
uint8_t | enable | ||
) |
This API enables/disables the counter in IEP module.
handle | PRUICSS_Handle returned from PRUICSS_open() |
iepInstance | 0 for IEP0, 1 for IEP1 |
enable | 0 for disabling the counter, 1 for enabling the counter |
int32_t PRUICSS_setIepCounterIncrementValue | ( | PRUICSS_Handle | handle, |
uint8_t | iepInstance, | ||
uint8_t | value | ||
) |
This API sets the default increment value for counter in IEP module. This value is used when compensation is not active.
handle | PRUICSS_Handle returned from PRUICSS_open() |
iepInstance | 0 for IEP0, 1 for IEP1 |
value | Increment value. Maximum value allowed is 15 |
int32_t PRUICSS_readEfuse | ( | PRUICSS_Handle | handle, |
uint8_t * | data | ||
) |
This API reads the state of efuse bits from ICSSG_HWDIS_REG register.
handle | PRUICSS_Handle returned from PRUICSS_open() |
data | data read from the register |
int32_t PRUICSS_setIcssCfgMiiMode | ( | PRUICSS_Handle | handle, |
uint8_t | miiInstance, | ||
uint8_t | mode | ||
) |
This API sets the MII mode in MII_G_RT_ICSS_G_CFG register.
handle | PRUICSS_Handle returned from PRUICSS_open() |
miiInstance | 0 for MII0_MODE, 1 for MII1_MODE |
mode | Mode from PRUICSS_IcssCfgMiiModes |
int32_t PRUICSS_setIcssCfgTxFifo | ( | PRUICSS_Handle | handle, |
uint8_t | fifoInstance, | ||
uint8_t | enable | ||
) |
This API configures the TX FIFO to be used.
handle | PRUICSS_Handle returned from PRUICSS_open() |
fifoInstance | FIFO from PRUICSS_TxFifos |
enable | 0 for disable, 1 for enable |
const PRUICSS_HwAttrs* PRUICSS_getAttrs | ( | uint32_t | instance | ) |
Return PRUICSS attributes.
instance | PRUICSS instance |
int32_t PRUICSS_loadFirmware | ( | PRUICSS_Handle | handle, |
uint8_t | pruIcssCore, | ||
const uint32_t | pruFirmware[], | ||
uint32_t | byteLength | ||
) |
This API disables pruIcssCore, loads IMEM, resets pruIcssCore, enables pruIcssCore.
handle | PRUICSS_Handle returned from PRUICSS_open() |
pruIcssCore | pruIcssCore from PRUICSS_Cores |
pruFirmware | firmware array |
byteLength | size of firmware array |