Page 1 of 1
Using all I2CDrivers
Posted: Tue Aug 19, 2014 11:42 pm
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!
Re: Using all I2CDrivers
Posted: Wed Aug 20, 2014 12:10 am
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).
Re: Using all I2CDrivers
Posted: Wed Aug 20, 2014 5:26 am
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