Arduino Mega i2c speed issue
1 view (last 30 days)
Show older comments
I am trying to use a S-Function Builder block to get data from an MPU9150 over i2c, which does work and gets back valid data, however it is triggering the task overrun LED no matter how simple the rest of the model is or how high I set the sample time (even as high as 1 second it still overruns).
The simplest model that has had this issue was a single S-Function block which outputs to three 3 axis scopes, initially I thought it may be because of the overhead in transferring data over serial but even when deploying to the board without external simulation the problem persists.
I have tested the Arduino and MPU without using Simulink and found no issue with either, it takes around 23ms to get data from all 3 sensors for each of the three axis.
0 Comments
Answers (0)
See Also
Categories
Find more on Modeling in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!