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.

TMS320C6670: SRIO failed after several successful DIO packets transmisions

Part Number: TMS320C6670
Other Parts Discussed in Thread: SYSBIOS,

Hello,

My configuration is:
- SYSBIOS 6.46.4.53,
- MCSDK PDK 1.1.2.6 TMS320C6670,
- TMDXEVM6670_EVM board.

I’m using SRIO with DIO packets and doorbells (Mode 0 - 1x on port 0) to communicate with FPGA. When I send several packets sucessfully, suddenly program hang on Srio_sockSend_DIO function on loop:

   while (1)

   {

       if (CSL_SRIO_IsLSUFull (gSRIODriverMCB.hSrio, ptr_srioSocket->mapIndex) == 0)

           break;

   }

This means that I haven’t got a shadow registers. I must wait. When I change SRIO to Loopback mode with function CSL_SRIO_SetLoopbackMode(hSrio, 0) everything is ok. I have always avaliable shadow registers.

Here is my LSU0 (0x02900D00) configuration from reg0 to reg 5 and RIO_LSU_SETUP_REG0:

RIO_LSU_REG0 = 0x00000000

RIO_LSU_REG1 = destination address on FPGA

RIO_LSU_REG2 = source address on DSP

RIO_LSU_REG3 = 0x00000000

RIO_LSU_REG4 = 0xBEEF0400

RIO_LSU_REG5 = 0x00000054

RIO_LSU_SETUP_REG0 = 0x44444444

For testing case I’m not transmitting doorbell message. Table below shows RIO_LSU0_REG6 and LSU0_STAT_REG(0x02900DE8):

 

DIO packet Tx no

RIO_LSU0_REG6

LSU0_STAT_REG

1

0x00000011

0x00000001

2

0x00000012

0x00000011

3

0x00000013

0x00000111

4

0x00000000

0x00001111

5

0x00000001

0x00001110

6

0x00000002

0x00001110

7

0x00000003

0x00001110

8

0x00000010

0x00001110

9

0x40000011

0x00001110

From packet no 5 LSU0_STAT_REG didn't change its state. Where is the problem that program is hanging after several transmission? What and where should I check? In loopback mode I haven’t got any problems.

I’ve tested also SRIO_LoopbackDioIsrexampleproject.

  1. I’ve changed loopback mode to normal mode.
  2. Incresaed SRIO_DIO_LSU_ISR_NUM_TRANSFERS from 4 to 12,
  3. Increased MAX_MEM_MGR_ENTRIES from 30 to 120,

And…… the same situation like in my program. After several transmission program is hang because there is no shadow register avaliable.

Lukas.

  • I've forwarded your query to the software experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Hi
    Have you tried to run your modified normal mode example project with two TMDXEVM6670_EVM boards and a breakout card?
    There are a few discussions in the forum regarding the shadow register unavailable issue:
    e2e.ti.com/.../444758
    e2e.ti.com/.../411349
    e2e.ti.com/.../158284
    You may try to flush the LSU to see if the workaround helps.

    Regards,
    Garrett
  • Hi,

    I didn’t  try flush the LSU.

    The problem disappear when I will not send doorbell to FPGA. Below is my sending function :

        // Transmit all data to FPGA
        if (Srio_sockSend_DIO(hSrioSock, srcDataBuffer[0], dataLength, (Srio_SockAddrInfo*) &to) < 0)	{
    		return ERROR_SRIO_SEND_DATA_FAILED;
    	}
    
        // Check transfer
        if (Srio_getSockOpt(hSrioSock, Srio_Opt_DIO_READ_SOCK_COMP_CODE, &compCode, sizeof(uint8_t)) < 0)	{
            System_printf ("Error: Unable to read the completion code in socket after packet sent.\n");
        }
    
        // After transmit all data send Doorbell to FPGA
    	if (Srio_sockSend_DIO(hSrioSock, SRIO_SET_DBELL_INFO(0,0), 16, (Srio_SockAddrInfo*) &toDoorbell) < 0)	{
    		return ERROR_SRIO_UNABLE_SEND_DOORBELL;
    	}

    Below are values of toDoorbell structure:

    toDoorbell.dio.rapidIOMSB = 0x0;
    toDoorbell.dio.rapidIOLSB = 0x0;
    toDoorbell.dio.dstID = DEVICE_ID2_16BIT;
    toDoorbell.dio.ttype = Srio_Ttype_Doorbell_DEFAULT;
    toDoorbell.dio.ftype = Srio_Ftype_DOORBELL;

    Sending doorbell takes 1,6 sec.

    In  loopback mode (using function CSL_SRIO_SetLoopbackMode(hSrio,i);) everything working good.
    1. When SRIO is set to normal mode LSU is full. I can't sending data  because LSU is full.
    2. When I will not sending doorbells LSU behave correct. Data are sending to FPGA.
    SRIO is working on core 0 but in future it will be working on core 3.

    Do you now what happens?
    Lukasz.

  • Hi,

    I did some tests. Software loopback is loopback by using CSL_SRIO_SetLoopbackMode function. Cable loopback mode was made by using cables (TX_N connected to RX_N and TX_Pconnected  to RX_P). This cable loopback was made on port 0.

    Below are my tests configuration and results:

    1. Software loopback mode, sending doorbells manually - everything is working good and fast.

    2. Software loopback mode, sending doorbells automatically (bindInfo.dio.doorbellValid = 1;). Of course I've deleted sending doorbell in sending function - everything is working good and fast.

    3. Cable loopback, sending doorbells manually - unfortunately it doesn't work. LSU is full after sent 4 DIO and 4 doorbell packets, and program is hanging.

    4. Cable loopback, sending doorbells automatically (bindInfo.dio.doorbellValid = 1;). Of course I've deleted sending doorbells in sending function - unfortunately it doesn't work. LSU is full after sent 4 DIO and 4 doorbell packets, and program is hanging.

    5. DSP connected with FPGA port 0 on SRIO, sending doorbells manually - everything is working good but very slow. Sending doorbells take 1,6 sec.

    6. DSP connected with FPGA port 0 on SRIO, sending doorbells automatically - everything is working good but very slow. Sending doorbells take 1,6 sec.

    7. DSP connected with FPGA port 0 on SRIO, sending doorbells are switched off - everything is working good and fast. Of course FPGA is sending doorbell packet to DSP after finished transmit. DSP doesn't do this.

    Could you say something, what should I check? In software loopback DSP is working correct and doorbells can be send after finished transmit.
    Thanks.
    Lukas.

  • I did some tests - see posts below.
  • Lukas,

    let me check with team to see if anyone observed the same 'LSU full' issue in your test case #4, or any DIO issue associated with doorbell.

    Regards,
    Garrett