|
AM263x MCU+ SDK
09.01.00
|
|
Go to the documentation of this file.
56 #include <drivers/hw_include/cslr_icss.h>
74 #define PRUICSS_PRU0 (0U)
75 #define PRUICSS_PRU1 (1U)
82 #define PRUICSS_NUM_CORES (2U)
93 #define PRUICSS_DATARAM(n) (0x00000U + ((n) * 0x02000U))
95 #define PRUICSS_SHARED_RAM (0x10000U)
97 #define PRUICSS_IRAM_PRU(n) (0x34000U + ((n) * 0x04000U))
103 #define PRUICSS_INTC_NUM_HOST_INTERRUPTS (10U)
108 #define PRUICSS_INTC_NUM_CHANNELS (10U)
113 #define PRUICSS_INTC_NUM_SYS_EVTS (64U)
124 #define PRUICSS_CONST_TBL_ENTRY_C24 (0U)
125 #define PRUICSS_CONST_TBL_ENTRY_C25 (1U)
126 #define PRUICSS_CONST_TBL_ENTRY_C26 (2U)
127 #define PRUICSS_CONST_TBL_ENTRY_C27 (3U)
128 #define PRUICSS_CONST_TBL_ENTRY_C28 (4U)
129 #define PRUICSS_CONST_TBL_ENTRY_C29 (5U)
130 #define PRUICSS_CONST_TBL_ENTRY_C30 (6U)
131 #define PRUICSS_CONST_TBL_ENTRY_C31 (7U)
132 #define PRUICSS_NUM_CONST_TBL_ENTRY (8U)
141 #define PRUICSS_GP_MUX_SEL_MODE_GP (0U)
142 #define PRUICSS_GP_MUX_SEL_MODE_ENDAT (1U)
143 #define PRUICSS_GP_MUX_SEL_MODE_MII (2U)
144 #define PRUICSS_GP_MUX_SEL_MODE_SD (3U)
150 #define PRUICSS_NUM_GP_MUX_SEL_MODES (4U)
159 #define PRUICSS_GPI_MODE_DIRECT_R31_STATUS (0U)
162 #define PRUICSS_GPI_MODE_PARALLEL_16_BIT_CAPTURE (1U)
165 #define PRUICSS_GPI_MODE_29_BIT_SHIFT (2U)
167 #define PRUICSS_GPI_MODE_MII_RT (3U)
173 #define PRUICSS_NUM_GPI_MODES (4U)
182 #define PRUICSS_SA_MUX_MODE_DEFAULT (0U)
184 #define PRUICSS_SA_MUX_MODE_SD_ENDAT (1U)
190 #define PRUICSS_NUM_SA_MUX_MODES (2U)
199 #define PRUICSS_ICSS_CFG_MII_MODE_MII (0U)
201 #define PRUICSS_ICSS_CFG_MII_MODE_RGMII (1U)
207 #define PRUICSS_NUM_ICSS_CFG_MII_MODES (2U)
215 #define PRUICSS_TX_L1_FIFO (0U)
216 #define PRUICSS_TX_L2_FIFO (1U)
236 typedef struct PRUICSS_SysevtToChannelMap_s
252 typedef struct PRUICSS_ChannelToHostMap_s
264 typedef struct PRUICSS_IntcInitData_s
286 typedef struct PRUICSS_IrqFunMap_s
306 typedef struct PRUICSS_Object_s
322 typedef struct PRUICSS_HWAttrs
352 typedef struct PRUICSS_Config_s
426 uint32_t pruEvtoutNum,
493 const uint32_t *source_mem,
494 uint32_t bytelength);
513 uint32_t bytelength);
564 uint32_t sendEventNum,
565 uint32_t pruEvtoutNum,
566 uint32_t ackEventNum);
592 int32_t constantTblEntry,
593 uint32_t constantTblVal);
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_in...
#define PRUICSS_INTC_NUM_CHANNELS
Number of Output Interrupt channels supported in PRUICSS Local INTC.
Definition: pruicss/m_v0/pruicss.h:108
uint8_t channel
Definition: pruicss/m_v0/pruicss.h:240
uint8_t sysevt
Definition: pruicss/m_v0/pruicss.h:238
uintptr_t baseAddr
Definition: pruicss/m_v0/pruicss.h:325
int32_t PRUICSS_configureCycleCounter(PRUICSS_Handle handle, uint8_t pruNum, uint8_t enable)
This function enables/disables the PRU Cycle Counter for a core.
uintptr_t sharedDramBase
Definition: pruicss/m_v0/pruicss.h:340
uintptr_t iep0RegBase
Definition: pruicss/m_v0/pruicss.h:331
int32_t PRUICSS_resetCore(PRUICSS_Handle handle, uint8_t pruNum)
This function resets the PRU.
uint8_t type
Definition: pruicss/m_v0/pruicss.h:244
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.
PRUICSS_Object * object
Definition: pruicss/m_v0/pruicss.h:354
uint32_t pru1DramSize
Definition: pruicss/m_v0/pruicss.h:342
int32_t PRUICSS_close(PRUICSS_Handle handle)
This function deletes the handle for a PRUICSS instance.
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.
SemaphoreP_Object semObj
Definition: pruicss/m_v0/pruicss.h:294
uintptr_t ecapRegBase
Definition: pruicss/m_v0/pruicss.h:332
uintptr_t miiMdioRegBase
Definition: pruicss/m_v0/pruicss.h:335
int32_t PRUICSS_setGpiMode(PRUICSS_Handle handle, uint8_t pruNum, uint8_t mode)
This API sets the GPI mode for a specific PRU.
uintptr_t miiRtCfgRegBase
Definition: pruicss/m_v0/pruicss.h:333
int32_t PRUICSS_enableCore(PRUICSS_Handle handle, uint8_t pruNum)
This function enables the PRU.
uint32_t hostEnableBitmask
Definition: pruicss/m_v0/pruicss.h:275
uintptr_t pru1IramBase
Definition: pruicss/m_v0/pruicss.h:339
int32_t PRUICSS_setIcssCfgTxFifo(PRUICSS_Handle handle, uint8_t fifoInstance, uint8_t enable)
This API configures the TX FIFO to be used.
uint8_t waitEnable
Definition: pruicss/m_v0/pruicss.h:292
uint32_t pru0DramSize
Definition: pruicss/m_v0/pruicss.h:341
int32_t PRUICSS_init(void)
This function initializes the PRUICSS module.
int32_t PRUICSS_setIcssCfgMiiMode(PRUICSS_Handle handle, uint8_t miiInstance, uint8_t mode)
This API sets the MII mode in MII_G_RT_ICSS_M_CFG register.
uint32_t sharedDramSize
Definition: pruicss/m_v0/pruicss.h:345
uintptr_t pru1DramBase
Definition: pruicss/m_v0/pruicss.h:337
int32_t PRUICSS_deinit(void)
This function de-initializes the PRUICSS module.
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 compensa...
PRUICSS Hardware Attributes.
Definition: pruicss/m_v0/pruicss.h:323
uint32_t pru1IramSize
Definition: pruicss/m_v0/pruicss.h:344
int32_t PRUICSS_disableCore(PRUICSS_Handle handle, uint8_t pruNum)
This function disables the PRU.
uintptr_t pru0IramBase
Definition: pruicss/m_v0/pruicss.h:338
HwiP_Object hwiObj
Definition: pruicss/m_v0/pruicss.h:290
int32_t PRUICSS_setSaMuxMode(PRUICSS_Handle handle, uint8_t mode)
This API sets the G_MUX_EN mux field in SA_MX_REG register.
uintptr_t pru0DramBase
Definition: pruicss/m_v0/pruicss.h:336
uintptr_t cfgRegBase
Definition: pruicss/m_v0/pruicss.h:329
uintptr_t intcRegBase
Definition: pruicss/m_v0/pruicss.h:328
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.
uint32_t PRUICSS_getVersion(PRUICSS_Handle handle)
Get PRUICSS version number from ICSSCFG_REVID register.
PRUICSS_Handle PRUICSS_open(uint32_t instance)
This function creates the handle for a PRUICSS instance.
PRUICSS_HwAttrs const * hwAttrs
Definition: pruicss/m_v0/pruicss.h:356
const PRUICSS_HwAttrs * PRUICSS_getAttrs(uint32_t instance)
Return PRUICSS attributes.
PRUICSS Global configuration structure.
Definition: pruicss/m_v0/pruicss.h:353
uintptr_t pru0CtrlRegBase
Definition: pruicss/m_v0/pruicss.h:326
uint32_t pruicssVersion
Definition: pruicss/m_v0/pruicss.h:308
PRUICSS_IrqHandler irqHandler
Definition: pruicss/m_v0/pruicss.h:288
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...
uint32_t PRUICSS_initMemory(PRUICSS_Handle handle, uint32_t pruicssMem)
This function initializes the PRU memory to zero.
PRUICSS Interrupt controller initialisation data structure.
Definition: pruicss/m_v0/pruicss.h:265
uint32_t instance
Definition: pruicss/m_v0/pruicss.h:324
uint8_t polarity
Definition: pruicss/m_v0/pruicss.h:242
int16_t channel
Definition: pruicss/m_v0/pruicss.h:254
#define PRUICSS_INTC_NUM_HOST_INTERRUPTS
Number of Host Interrupts supported in PRUICSS Local INTC.
Definition: pruicss/m_v0/pruicss.h:103
Data structure used for channel to host map in PRUICSS.
Definition: pruicss/m_v0/pruicss.h:253
Opaque Hwi object used with the Hwi APIs.
Definition: HwiP.h:93
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.
int32_t PRUICSS_readEfuse(PRUICSS_Handle handle, uint8_t *data)
This API reads the state of efuse bits from HWDIS_REG register.
Opaque semaphore object used with the semaphore APIs.
Definition: SemaphoreP.h:59
int16_t host
Definition: pruicss/m_v0/pruicss.h:256
#define PRUICSS_INTC_NUM_SYS_EVTS
Number of Events that can be captured in PRUICSS Local INTC.
Definition: pruicss/m_v0/pruicss.h:113
PRUICSS Object.
Definition: pruicss/m_v0/pruicss.h:307
uintptr_t miiGRtCfgRegBase
Definition: pruicss/m_v0/pruicss.h:334
PRUICSS IRQ handler mapping structure.
Definition: pruicss/m_v0/pruicss.h:287
void(* PRUICSS_IrqHandler)(void *buf)
Definition: pruicss/m_v0/pruicss.h:220
uint32_t pru0IramSize
Definition: pruicss/m_v0/pruicss.h:343
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 ICSSM CORE CLK.
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...
int32_t PRUICSS_intcInit(PRUICSS_Handle handle, const PRUICSS_IntcInitData *intcInitData)
This function does Interrupt-Channel-host mapping.
Data structure used for system event to channel mapping in PRUICSS.
Definition: pruicss/m_v0/pruicss.h:237
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.
int32_t PRUICSS_controlIepCounter(PRUICSS_Handle handle, uint8_t iepInstance, uint8_t enable)
This API enables/disables the counter in IEP module.
uintptr_t uartRegBase
Definition: pruicss/m_v0/pruicss.h:330
struct PRUICSS_Config_s * PRUICSS_Handle
A handle that is returned from a PRUICSS_open() call. This handle is required for calling other APIs.
Definition: pruicss/m_v0/pruicss.h:226
PRUICSS_Handle pruicssHandle
Definition: pruicss/m_v0/pruicss.h:296
uintptr_t pru1CtrlRegBase
Definition: pruicss/m_v0/pruicss.h:327
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.