This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SRIO problem: rio_err_det = 0x00000040

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.

  • This error means that you are trying to write to a memory protected address (destination buffer) or some reserved address and the SRIO peripheral is getting a DMA transfer error from the internal bus architecture.  Check your memory protection setup, also make sure you are using global addresses and not local addresses.  The packet is being sent and received correctly, but dropped in DSP 2 due to this error.

    The reason the doorbell is working is because when it is received, it simply sets the INTDST interrupt bit internal to the peripheral.  Nothing is going through the DMA in this case.

    Regards,

    Travis

  • Hi Travis,

    I am very happy to get your answer. Thanks a lot!

    Here is my settings in LSU:    lsuTransfer.dspAddress = (Uint32)10860000;  lsuTransfer.bytecount = 200;

    I am not familiar with memory protection, and I think L2 SRAM can be written at any time. No matter how many times I sent data from DSP1 to DSP2, the data in destination buffer never changed. What's more, when I used the example project provided by the demoboard sales company to send data, DSP2 could receive the data. So I thought the problem lied in the transmitter.

    Besides, I also have another problem. If I use CSL APIs to configure interrupts, there will be some errors when I use semaphore_post() in ISR functions. I know that if I try to use both of the SYS/BIOS interrupt APIs and CSL APIs there will be conflicts in configuring ISTP. This is very inconvenient, especially when I have to use semaphore_post () and CSL interrupts(which maybe provided by other engineers) at the same time. Is there any way to solve this problem? 

    Hoping for your answer.

    Best wishes.

    Daisy