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.

RTOS/PROCESSOR-SDK-AM437X: Questions about SPI DMA code

Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: TMDSIDK437X

Tool/software: TI-RTOS

Hi everyone,

I am reading and trying understand the code in SPI_dma.c. We are currently using DMA with SPI quite successfully but we need to make some custom modifications to the SPI driver in the PDK.

In particular, I am puzzled why the driver allocates a "dummy paRAM set", because it does not appear to actually be used, in the code at http://git.ti.com/keystone-rtos/spi-lld/blobs/master/soc/dma/v1/SPI_dma.c#line336, EDMA3_DRV_linkChannel() returns an error because the channel parameter, EDMA3_DRV_LINK_CHANNEL, is out of range. At least this is true when I tested on TMDSIDK437X development board.

Although the linked channel does not get used, it does not appear to affect the SPI transfer. The TX and RX channels raise an interrupt on completion as expected.

I am wondering if the dummy param set is redundant, or is there some reason for it being there that I have missed?

Regards

 

  • Bob,

    I am checking with the driver developer on the requirement to add a dummy param set but please expect some delays as he seems to be out of office until 21st . I have reached out to other folks and will post a response if I get any inputs from them.

    Regards,
    Rahul
  • Hi,

    Now I have got my head around how the DMA transfers work, I have determined to my satisfaction that the "dummy parameter set" is not required. There are also another 4 DMA channels allocated by the driver, which are never used and not required either.

    So please consider this low priority and no longer an issue, but the driver could be tidied up at some point.

    For our custom SPI application I have added a chained DMA transfer to the existing DMA transfers which works quite nicely.

    Regards