Page 1 of 1

SPI2 and I2C3 not working simultaneously

Posted: Tue Jul 01, 2014 6:58 pm
by nikhil
Hello,

I am using MMC_SPI using SPI2 and I2C device on I2C3 on STM32F4 board. I am not able run both things simultaneously however individuals are working fine.
Am I missing something or simply I cannot get to run both drivers simultaneously?

--
nikhil

Re: SPI2 and I2C3 not working simultaneously

Posted: Tue Jul 01, 2014 7:04 pm
by Giovanni
Hi,

Probably it is a DMA conflict, there are way more peripherals than DMA channels.

On the F4 some peripherals can relocate DMA channels on alternate channels, this is done in mcuconf.h, refer to the Reference Manual to find possible alternate channels.

Giovanni

Re: SPI2 and I2C3 not working simultaneously

Posted: Tue Jul 01, 2014 8:17 pm
by nikhil
I referred to mcuconf and found that STM32_DMA_STREAM_ID(1, 4) is set at both SPI2 TX and I2C3 TX. I followed reference manual( RM0090 Table 43, 44) for DMA table and it suggest no alternate channels for any of these drivers.
Is there any alternate way to fix this issue?

--
nikhil

Re: SPI2 and I2C3 not working simultaneously

Posted: Tue Jul 01, 2014 8:20 pm
by Giovanni
The only way is to not use the drivers at the same time, start and stop one driver before attempting to use the other, the drivers must not be started at the same time.

Giovanni