Showing results for 
Search instead for 
Did you mean: 

Simulink model I2C-Based Sensor on STM32F4 Discovery Board ?


Hello everyone,

i'm actually trying to read data from an accelerometer (external) with the stm32f4 discovery board.

So far, I was able to do it trough an IDE and let the data be shown on a display.

Now I would like to do it with simulink. Is there a Simulink model I2C-Based Sensor for STM32F4 Discovery Board?

I went trough the modelling block for stm32f4 discovery and I could find anything.

Does anyone know how could I proceed? If yes, then please tell me.

Thank you for your help.


Associate III


Were you able to do this? I am currently stuck on this, I am not sure how to interface the sensor in simulink. The coder support package has no IMU block for STM32F4xx Discovery board hence I am not sure how to interface. All other examples have coder support package IMU block for direct implementation.

Could anyone confirm?

ST Employee

Hello @YSand.3 , 

I recommend you to check this link.


To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

@Foued_KH Hello, thank you for your response, I have already used the same example which you suggested in the earlier post, however, My simulink blocks are not returning and value even after giving it the right addresses, could you please take a look at my question I posted earlier and suggest what I am doing wrong?


Thank you.