I2C sensor on USART 2 Serial communication
Hello,
I am using the embedded coder support package in simulink to interface with my onboard MEMS acceleration sensor (LSM303AGR) on my STM32F411VET discovery board. I could successfully connect and run simple LED program through USART2 on simulink block and it returns button state values as well on display, while running in external mode.
I am moving on to more complicated communication, where i am accessing the I2C sensor via USART2 but I am not able to establish a communication. I have I2C read and I2C write blocks inside the embedded coder package which i am using along with correct read and write addresses for the sensor.
However, My I2C sensor will not respond over USART2, is there a step which I am missing?
How does one transmit and receive I2C sensor data over USART2 serial communication?
Your help would be appreciated.