I am working on a project using the STM32F407. I am using the CMSIS drivers for most of the peripherals as well as using CMSIS-RTOS-RTX and the MDK-ARM Network Component. I need to use one of the I2C peripherals with a master/slave protocol. The I2C needs to be able to send and receive variable and unknown length messages to other STM32 devices. When sending the device acts as a master and when receiving it acts as a slave. The protocol already exists and cannot be changed to include the message length so I cannot use the CMSIS driver (it needs to know the message length for the slave receive functions). I can achieve what I want by using the STM32F4 Standard Peripheral Library but this doesn't seem to be directly supported by MDK-ARM. How can I use just the I2C part of the standard peripheral library alongside CMSIS? Any help gratefully received!