Using all I2CDrivers

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

Moderator: RoccoMarco

Post Reply
hkerner
Posts: 24
Joined: Tue Jul 22, 2014 12:05 am

Using all I2CDrivers

Post by hkerner »

Is there any reason why one wouldn't be able to use all the I2C Drivers in the application? Before starting any threads I start all three I2C Drivers in main(), but it crashes when I use I2CD3 simultaneously with the either or both I2CD1 and I2CD2 (I2CD1 and 2 work fine together). I read that you cannot use I2CD3 and SPID2 at the same time, but I am not using SPI anywhere.

Thanks in advance!
hkerner
Posts: 24
Joined: Tue Jul 22, 2014 12:05 am

Re: Using all I2CDrivers

Post by hkerner »

Note that I am also using USART 1, 3, and 6. I have configured the application to start/run/stop when using i2c, but cannot do this with the USARTS (because of the nature of the application).
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Using all I2CDrivers

Post by Giovanni »

Probably conflicting DMAs, not all the STM32 peripherals are usable at the same time. See the DMA section on the reference manual. F4 devices allow for a limited remapping, see the settings in mcuconf.h.

ChibiOS tries to workaround the limitation by allowing to use the conflicting peripherals at different times: don't start 2 conflicting drivers at the same time, you can start/stop them.

Giovanni
Post Reply