Hi all,
Recently I have some trouble with SRIO Direct I/O Operation which annoying me very much.
When I transfer data from dsp1 to dsp2 using SRIO, dsp2 cannot receive the data. But when I transfer doorbell from dsp1 to dsp2 using SRIO, dsp2 can receive the doorbell. My code is as follows:
void Srio_SendData(Uint32* srcAddr, Uint32* dstAddr, Uint32 len, Uint16 dstDevId)
{
CSL_SrioHandle srio_handle_;
SRIO_LSU_TRANSFER lsuTransfer;
// Open the CSL SRIO Module 0
srio_handle_= CSL_SRIO_Open (0);
uint8_t lsu_number_ = 0;
// Populate the Transfer Information.
lsuTransfer.rapidIOMSB = 0x0;
lsuTransfer.rapidIOLSB = (Uint32)srcAddr;
lsuTransfer.dspAddress = (Uint32)dstAddr;
lsuTransfer.bytecount = len;
lsuTransfer.doorbellValid = 0;
lsuTransfer.intrRequest = 0;
lsuTransfer.supInt = 0;
lsuTransfer.xambs = 0;
lsuTransfer.priority = 2;
lsuTransfer.outPortID = 0;
lsuTransfer.idSize = 0;
lsuTransfer.srcIDMap = 0;
lsuTransfer.dstID = dstDevId;
lsuTransfer.ttype = 4;
lsuTransfer.ftype = 5;
lsuTransfer.hopCount = 0;
lsuTransfer.doorbellInfo = 0;
// wait for lsu to become available
while (CSL_SRIO_IsLSUFull(srio_handle_, lsu_number_)
&& CSL_SRIO_IsLSUBusy(srio_handle_, lsu_number_)) {
}
// get transaction context
uint8_t transaction_context = 0;
uint8_t transaction_id = 0;
CSL_SRIO_GetLSUContextTransaction(srio_handle_, lsu_number_,
&transaction_context, &transaction_id);
// send request
CSL_SRIO_SetLSUTransfer(srio_handle_, lsu_number_, &lsuTransfer);
// wait around till the transfer is completed.
while (CSL_SRIO_IsLSUBusy(srio_handle_, lsu_number_)) {
}
// wait till right transfer completed
uint8_t completion_code = 0;
uint8_t context_bit = 0;
do {
CSL_SRIO_GetLSUCompletionCode(srio_handle_, lsu_number_, transaction_id,
&completion_code, &context_bit);
} while (transaction_context != context_bit);
}
After Srio_SendData() completed, I found that there is an error on dsp2 :rio_err_det = 0x00000040. Then I referred to the user guide, and found that the problem is "DMA access to MAU was blocked". But I don't know how to solve it.
Thanks in advance.