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.

Code working on simulator, but no on device!!

Other Parts Discussed in Thread: TMS320C6670

Hello TI Community,

I'm new to programming DSP's, I've been having some issues while learning but nothing I could'nt find an answer on the forums or by using google. Unfortunately this time I wasn't that lucky.

I'm developing a program to make an infrastructure communication on the DSP, so far I have the Tx part, only transmmiting some data but not recieving it anywhere. When I check the status of the queues after the transmission is done, I see that on the simulator the descriptors go from the Free Tx BD queue to the Tx Completed Queue without any problems; but when i test the exactly same code on the device (TMS320C6670), the descriptors are held by the Tx Queue, which makes me think the Channel is not being notified there are new descriptors to be send, therefore, the descriptors are queued on the Tx Queue.

I really don't know what could be the cause of this problem, so I hope you could give me a hand.

Regards,

Andrés

  • Andres,

    If you have not already done so, I recommend that you take a look at the QMSS infrastructure DMA example project provided with the MCSDK. The MCSDK can be found here: (http://software-dl.ti.com/sdoemb/sdoemb_public_sw/bios_mcsdk/latest/index_FDS.html).

    After installing the MCSDK, you can find the infrastructure DMA example project at:

    INSTALL_DIRECTORY\pdk_C6670_1_0_0_17\packages\ti\drv\exampleProjects\qmInfraExampleProject

    (The default location for INSTALL_DIRECTORY is C:\Program Files\Texas Instruments\)

    This example should work out of the box, so you can use this example code as a starting point, or as a reference to help debug to your code.

    That said, the most common reasons that I can think of that would cause the descriptors to be held in the TX queue are:

    1. The TX Channel that is liked to that queue has not been enabled. You can verify this by checking the registers at location 0x02A6C400 + 32*N, where N=0..31. Those registers should have bit 31 set to indicate that the channel has been enabled.
    2. The descriptor size in not provided when writing register D to push the descriptor into the TX queue. When you push the descriptor onto the TX queue, make sure that you are including the size of the descriptor in register D in the QMSS. If you do not include the size of the descriptor, then the packet may not get transmitted properly. You can see the format for register D in section 4.1.4.4 of the Multicore Navigator User Guide (http://www.ti.com/lit/ug/sprugr9d/sprugr9d.pdf)
  • Hi Derek,

    First of all, thank you for the answer. I missed to clarify I'm basing my code on the one you mention, I wanted to make one from scratch just to get more familiar with any kind of problems one may get while coding, and I must say it's been quite an experience doing it.

    So I followed your recommendations, the first one I did already enable the channel, in fact I'm doing it on its creation (while setting up the Cppi_TxChInitCfg structure), so most likely that's not the problem. The second recommendation, I was only sending the descriptor, not its size, so I changed that and it is now transmmiting descriptors, but not all of them.

    I have 16 descriptors I want to transmit (worth to mention I'm only transmmiting, no Rx channel yet, could be this the cause?), each of size 32, the code starts setting up everything needed for transmision, without any problems it reaches the part where the transmision code takes place. So it starts sending descriptors, but after 3 of them, it stops sending and again the descriptors get held in the TX queue. So to sum it up, the code is only transmmiting 3 descriptors.

    I really don't know what could be the cause, since I'm following the example, I don't see any relevant difference between the example and my code.

    Please help me solve this strange behaviour.

    Regards,

    Andrés

  • Andres,

    This issue could be due to the receive not being configured. Please try enabling the RX channels and the RX flows, and see if the problem is resolved.