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.

Continuous SPI Communication using EDMA

Hello,

I'm trying to read data from an ADC using SPI communication and transfering and ordering the data received using EDMA on an OMAPL137 EVM card. The ADC transmits data of N different channels and then I have to process this data. I'm using Ping-Pong Buffers and continuous communication in the EDMA. But it's not working. I'm hoping you can help me out, so here is my configuration.

PaRAM Set 28 (GPIO Bank 4 Interrupt): ADC signals data is converted, so I write a word into SPIDAT to initiate the SPI transfer

  • TCC: 28
  • Static: 1
  • ACNT: 2
  • BCNT: 1
  • CCNT: 1
  • SRC: outBuffer (has random data of 2 bytes)
  • DST: SPIDAT1
PaRAM Set 14 (Spi Receive EDMA event)
  • TCC: 60
  • TCCHEN: 1
  • ITCCHEN: 1
  • ACNT: 2
  • BCNT: N
  • CCNT: 1024 (Number of samples I want to analyze at the same time, size of Ping and Pong Buffers)
  • SRC: SPIBUF
  • DST: PingBuffer
  • DSTBIDX: 2*1024
  • SRCBIDX: 0
  • DSTCIDX: 2-(N-1)*2*1024
  • SRCCIDX: 0
  • LINK: PaRAM Set 64 (Pong)
  • BCNTRLD: N
PaRAM Set 64 (Pong Buffer)
  • DST: PongBuffer
  • LINK: PaRAM Set 65 (Ping)
PaRAM Set 65 (Ping Buffer)
  • DST: PingBuffer
  • LINK: PaRAM Set 64 (Pong)
PaRAM Set 60 (Dummy Transfer: It's just supposed to trigger Event 28 N-1 times)
  • TCC: 28 (Write to SPIDAT)
  • TCCHEN: 0
  • ITCCHEN: 1
  • ACNT: 2
  • BCNT: N
  • CCNT: 1
  • LINK: PaRAM Set 61 (Reload Parameters)
PaRAM Set 61 (Exactly the same as PaRAM Set 61, linked to itself)
The problem is it doesn't work. I had a variation in which Event 28 wasn't static and was linked to a Reload PaRAM set, it didn't work either although the problem was different, in that case it read only one word (2 bytes) each time from the ADC. As it is now it doesn't work at all, reads once and stops handling any event afterwards.
I'm having several problems with the EDMA overall, can anyone explain to me this?: Just for testing purposes I configured the PaRAM Set 14 (Spi Receive) to Chain to Event 28, this just makes the clock to be looped forever as a Spi receive event triggers a write to the SPIDAT (endless loop), but if I configure another PaRAM Set, in this case 68, with the same properties as PaRAM Set 28 is configured, the loop does not happen. I don't know if I'm using wrong PaRAM sets or something else, can anyone shed some light on it for me, it would be super appreciated.
Regards,
~ Aquiles Lacruz