Other Parts Discussed in Thread: HALCOGEN
hi,
We have configured SPI1 as a salve and configured DMA mode to receive data. Things work fine if used only SPI in DMA mode, but when we enable Emac driver for Ethernet and do a ping or send ethernet packets, we see that data received over SPI is swapped/Out of order.
For example, If we were expecting data over SPI as 0xAAAA and 0x5555. we always get the expected data when ethernet is not enabled. But when we start using Ethernet (by integrating the EMAC driver) and do a ping, we see that data received on SPI1 is swapped/Out of order ie., we receive 0x5555 and 0xAAAA. And sometimes data swaps multiple times.
Does configuring SPI in DMA mode causing the issue when Ethernet is enabled as EMAC also uses DMA?
From the Reference manual it says, EMAC acts as a DMA master, so not sure what configuration we have to do in the EMAC or SPI to resolve this issue.
Also, we do saw errata DEVICE#54 Writes and reads to EMAC CPPI memory are byte-swapped on the big-endian device (TMS570) and ensured used 'EMACSwizzleData' function from halogen to fix this errata.
But we are not able to find what is causing the SPI data to be swapped/out of order as mentioned above.