2012-04-17 07:16 AM
Hi,
I've a complicated application with 3 STM32F1xx microcontrollers. Each of the microcontrollers communicate to each other via SPI. DMA is used for SPI communications. The micros (STM32F103) have 2 SPI ports each. One micro is SPI slave on SPI1 (to another micro) and also master on SPI2 (to another micro). Thus, it is using both SPI ports with DMA. I have noticed that, independently, SPI communications (using DMA) on SPI1 and SPI2 works OK (no corruption). However, when SPI1 and SPI2 are in use at the same time (which happens occasionally in my application), I have noticed that some of the messages get corrupted (looks like DMA problems). It appears as if the DMA cannot cope with both SPI ports in use at the same time. Maybe the DMA arbiter is overloaded? Is it a question of DMA priorities? Does anyone know whether there is an issue with DMA, using both channels at the same time with DMA? Any answers would be most appreciated. Stuart #stm32-spi-dma2012-04-17 10:32 AM
Perhaps you've exceed your bus bandwidth? At what rate are you clocking the data, does the problem persist if you half that rate? Using 16-bit instead of 8-bit will half the bus loading.
Also check the errata.2012-04-18 04:25 AM