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.

SPI and DMA with TI RTOS (F28377D)

Other Parts Discussed in Thread: CONTROLSUITE, TMS320F28377D

Hello,

I am working on a project that need to capture data via SPI interface with F28377D and TI/RTOS. I have tested my SPI/DMA code alone without RTOS and everything works fine. I can have messages send out. However, when I was trying to merge the code into my program, SPI does not send out anything. I created a blank TI RTOS project and still could not make it to work properly. Is there a example for using SPI/DMA with RTOS for F28377D?

I have put my standalone program in attachment. Please check if I made any mistake if possible. I am trying to start sending information in SWI or HWI in my real program, is there anything special if I am trying to do that? Thanks.

Han

5516.bios_spi_dma.zip

  • Hi Han,

    Can you share what version of TI-RTOS are you using ?

    Han Zhang2 said:

    Is there a example for using SPI/DMA with RTOS for F28377D?

    We unfortunately do not ship any SPI/DMA TI-RTOS examples for F28377D.

    Han Zhang2 said:

    I have put my standalone program in attachment. Please check if I made any mistake if possible. I am trying to start sending information in SWI or HWI in my real program, is there anything special if I am trying to do that? Thanks.

    I am unable to import your project in CCS. Can you share the CCS and compiler version you are using ? I see 2 linker cmd files in your project. Which one is being used ? One of them looks correct but the other one is missing a lot of section placements.

    While I study your project, can you try narrowing down the point of failure ? You can maybe add breakpoints to your code and check if SPI and DMA init succeeds but DMA transfer fails.

    Best,

    Ashish

  • Hi Han,

    Is this still a problem ?

    Best,
    Ashish
  • Hi Ashish,

    Sorry for the delay. I was busy on another project lase month and did not have time to work on this issue.

    I implemented the SPI communication using HWI temperately and it did work in this way. However, it will take a lot of CPU time and I still want to make the SPI DMA work. For the CCS project I posted, I was using compiler V15.12.0 LTS, TI-RTOS 2.12.1.33, XDCTools 3.32.0.06_core, CCS 6.1.2.00015. For the linker command files, TMS320F28377D.cmd contains memory fields of the processor and F2837xD_Headers_BIOS_cpu1.cmd contains memory fields for ControlSUITE header files.

    I have test all my code without TI-RTOS and it works fine. The problem only happens when I move it into my BIOS project. My observation is that it could be a trigger issue, i.e. DMA module could not receive the trigger signal from SPI.

    In addition, I wonder if there could be a example project for SPI DMA under TI-RTOS. Thanks a lot for your help.

    Han
  • Hi Han,

    I tried installing all the same tool versions but am still unable to import your project.

    Han Zhang2 said:
    Hi Ashish,

    I have test all my code without TI-RTOS and it works fine. The problem only happens when I move it into my BIOS project. My observation is that it could be a trigger issue, i.e. DMA module could not receive the trigger signal from SPI.

    Can you provide more details on the exact problem you are seeing when you integrate your project with BIOS ?

    Han Zhang2 said:


    In addition, I wonder if there could be a example project for SPI DMA under TI-RTOS. Thanks a lot for your help.

    Like I said before, unfortunately, we dont ship driver examples for F28377 devices.

    Best,

    Ashish