Arduino Mega i2c speed issue

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.
I am using the Sparkfun library to interface with the MPU.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Arduino Hardware에 대해 자세히 알아보기

제품

질문:

Dan
2014년 7월 1일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by