Strucutre to store temporary registers for the Pru Ipc Instance
6 bytes
bufferBaseAddr | Stores base address for buffer buffers |
bufferOffset | Stores memory offset for TMP.bufferBaseAddr |
Initialization code when the Pru Ipc is started
PEAK cycles: 11 cycle
None
Pseudo code:
memcpy(offset(dataSize), PRU_IPC_CONFIG_MEM + DATASIZE_OFFSET, 1);
memcpy(offset(CFG.blockSize), PRU_IPC_CONFIG_MEM + BLOCKSIZE_OFFSET, 4);
ITR = 0;
dataSize | Size of the data packets Returns: None |
Sends the ADC data packets to the shared memory for each Buffer Creates interrupt event for r5f core to read data packets. Resets ITR.packet, ITR.block if they oveflow their maximum value
PEAK cycles: (15 + 10*noOfBuffers) cycle
None
Pseudo code:
for (ITR.buffer = 0, TMP.bufferOffset = BUFFERBASE_OFFSET;
ITR.buffer < CFG.noOfBuffers;
ITR.buffer++, TMP.bufferOffset+=4) {
dataReg = *dataRegBaseAddr++;
memcpy(offset(TMP.bufferBaseAddr), PRU_IPC_CONFIG_MEM + TMP.bufferOffset, 4);
if (TMP.bufferBaseAddr == 0) continue;
memcpy(offset(dataReg), TMP.bufferBaseAddr + ITR.packet, dataSize);
}
ITR.packet += dataSize;
ITR.idxInBlock++;