SPI2 and I2C3 not working simultaneously

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
nikhil
Posts: 40
Joined: Thu Jan 03, 2013 8:46 pm

SPI2 and I2C3 not working simultaneously

Post 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
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: SPI2 and I2C3 not working simultaneously

Post 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
nikhil
Posts: 40
Joined: Thu Jan 03, 2013 8:46 pm

Re: SPI2 and I2C3 not working simultaneously

Post 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
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: SPI2 and I2C3 not working simultaneously

Post 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
Post Reply