Hi,
I am working on cc3200's spi module, here spi is configured in slave mode. Here the application is written like a loopback mode.
SPI-dma is enabled for both tx and rx channel.
SPI-Dma-rx handler function is
Disable spi.
1) disable spi-dma-rx interrupt,
2) configure spi-dma-tx channel (with the received packet as source).
3) configure fifo for depth for tx channel and enable it.
4) clear spi-irq-status register
5) enable spi-dma-tx interrupt.
Enable spi.
SPI-Dma-tx handler function:
Disable spi
1) disable spi-dma-tx interrupt,
2) configure spi-dma-rx channel (for receiving new packet).
3) configure fifo for depth for rx channel and enable it.
4) clear irq-status register.
5) enable spi-dma-rx interrupt.
Enable spi.
Everything is working as expected ( receiving a packet from master and re sending it when master issues next dummy packet) without fifo, but when fifo is enabled dma-tx done is triggered immediately after rx-handler completes dma-tx-channel configuration, and clears all other pending interrupts if any.
Can any one help me how to handle this.
Here I attached the code.
Intially spi is configured to receive a packet, where spi-dma-tx interrupt is disabled.
When 1st packet is received spi-dma-rx handler will be called from spi-interrupt-handler
its functionality is explained above (i.e, to send the received packet).
After sending packet dma-tx interrupt will be triggered , and spi-dma-tx handler will be called from spi-interrupt-handler.