Haixiao,
I am using MIBSPI mode. Both MIBSPI1 (Master) and MIBSPI3 (Slave) are configured to use TG0, and try to use DMA transfer their TG0 RX data to RAM.
See the attachment for the DMA and MIBSPI1 and MIBSPI3 initialization. (I am using IAR embedded workbench IDE)
(Please visit the site to view this file)
I already tried below 3 tests for your information -
(1) Instead of MibSPI1 TG0 RX trigger (request to DMA channel-0), I tried using Software Trigger DMA channel-0. The DMA channel 0 works.
(2) use DMA "chain", after DMA channel-1 (SPI3), chained with DMA channel-0 (SPI1), the DMA channel 0 also works.
(3) Instead of MibSPI TG0 RX trigger, tried using its TX to trigger DMA channel-0, because TG0 transmit and receiving operation complete at same time.
It turned out both MibSPI1 and MibSPI3 DMA channels do not work.
Thank you,
Yanzhong
Sounds like the SPI DMA source is not setting correctly.
Can you publish the code for setting the SPI1 hardware trigger? Please make sure what you use is SPI compatible mode or MIBSPI, their dma conguration channel are different.
BTW, I am going to seperate your post to a seperate one.
Regards,
Haixiao
TMS570LS3137 MCU Experts,
Sorry, I am using this old thread because I do not find how to start a new thread.
My questions are about TMS570LS3137 DMA application. It's urgent for us, hope to get your quick reply.
1. Background:
I have Dual high speed ADC chip with SPI port. Its dual SPI outputs are connected to MCU MibSPI-1 and MibSPI-3.
SPI-1 is in Master Mode and SPI-3 in Slave Mode. SPI-1 generates the SPI_/CS and SPI_CLK to drive the ADC SPI port and SPI-3 port simultaneously.
In order to minimize the CPU operation latency, I used SPI multi-buffer (using external trigger) and DMA to read data so that the entire process is handled by "hardware".
2. My question
SPI-1 multi-buffer TG-0 was defined to have only Buffer-0. i.e. every external trigger, SPI-1 will transmit ONE dummy data, and receive ONE data to Buffer-0 RX. SPI-3 also uses its TG0 with Buffer-0 only. SPI-3 will receive ONE data to Buffer-0 RX at same time.
Both SPI-1 and SPI-3 multi-buffer work well (can see data received in TG0 RX). Then I assigned DMA channel-0 and channel-1 for SPI-1 TG0 RX and SPI-3 TG0 RX respectively. The settings are pretty similar for both channels.
I can see SPI-3 has transferred the data from TG0 RX to the destination in RAM. However, the DMA channel for SPI-1 did not work.
Why? any comments are welcome.
(I tried using different DMA channels, even swapped the channels of SPI-1 and SPI-3, it's the same results - the DMA for SPI-3 TG0 RX worked, but not work for SPI-1)
One more update -
I tried the Software trigger the DMA channel for SPI-1. It works.
This tells me the DMA channel configuration is correct. It's the SPI-1 TG0 RX did not trigger (hardware) / not send request / or not response the request.
But I need the Hardware trigger.
Thanks,
Yanzhong