Skip to main content
YSand.3
Visitor II
September 6, 2022
Question

Simulink model I2C-Based Sensor on STM32F4 Discovery Board ?

  • September 6, 2022
  • 2 replies
  • 2335 views

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.

Yannick

This topic has been closed for replies.

2 replies

Associate III
August 29, 2023

Hello,

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?

Foued_KH
ST Employee
August 29, 2023

Hello @YSand.3 , 

I recommend you to check this link.

Foued

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.
Associate III
September 17, 2023

@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?


https://community.st.com/t5/mems-sensors/lsm303agr-initialization-in-simulink/td-p/591053

 

Thank you.