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&EDMA Continuous transfer Problem on EVM6678L

Hi, Everyone!

I have programed a SPI continuous transfer routine via EDMA TPCC2, it works well in LoopBack mode, but in transmit or receive mode, there is no signal coming out from the 80-pin Expansion Header SPI pins (63, 65, 67, 69. So, could anyone give me some help or suggestion?

The phenomenon is:

[1] I test the 80-pin Expansion Header SPI pins (63, 65, 67, 69): NO signal appears on the four pins.(not in LoopBack mode)

[2] Query the IRP (CSL_edma3GetHwStatus(hModule, CSL_EDMA3_QUERY_INTRPEND,  &regionIpr) in EDMA , the relevant bit remains 0, while it changes to 1 when in LoopBack mode after the EDMA transfer completion.

 

Additionally, what is the default SPI module clock for EVM6678L?

  • The SPI module in C6678 is working in Master mode only. Do you have the SPI slave connected to C6678 SPI module in the non-loopback mode please?

    How the EDMA channel is configured for the SPI XEVT and/or REVT please? The IPR status you are polling is for the transmit or receive completion please?

    The default SPI module clock is SYSCLK7 (CPU/6) in C6678. The SPI clock is mentioned in section 2.1 in the SPI user guide which is as follows:

    SPICLK frequency = [SPI module clock] / [SPIFMTn.PRESCALE + 1]  

  • Thank you Steven Ji! 

    [1] My SPI module works in Master mode, there is no SPI slave connected to it, does this lead to the SPI master doesn't transmit data out? I just want to know whether there is signal on the 4 SPI pins in non-loopback mode. 

    [2] My EDMA channels are configured for SPI XEVT and REVT, each of the two channels works in ping-pong mode. the purpose of polling the IPR is to get the completion event of each ping transfer or pong transfer.

    thanks for your help!

    Kaka Huang.

  • Kaka,

    I am guessing the IPR polling is stuck at the REVT channel since there was no data on SPI receive pin. 

    If so, it could be the case that the EDMA only transfered a few data for the very first time on transmit but you missed capturing the activity. And after that there was no activity because the EDMA was stuck at waiting for the receive data from nowhere since there was no other SPI slave devices connected to the device.

    Maybe you can try to extend the transmit period long enough for the capture or connect the SPI slave to the master for real data transfer.