필터 지우기
필터 지우기

400KHz I2C with Aardvark

조회 수: 3 (최근 30일)
Pedro Gelabert
Pedro Gelabert 2017년 9월 27일
댓글: Pedro Gelabert 2017년 10월 3일
I am able to use Total Phase's Aardvark I2C/SPI to send and read data with I2C. However, the transfers only occur at 100KHz with MatLab 2016b in Windows and macOS. I have setup my device as follows:
%%*** initialize i2c channel and unlock i2c slave access
Vendor = 'Aardvark';
BoardIndex = 0;
i2c_dev = i2c(Vendor,BoardIndex,RemoteAddress);
i2c_dev.BitRate = 400;
i2c_dev.PullupResistors = 'none';
i2c_dev.TargetPower = 'none';
set(i2c_dev,'OutputBufferSize',512)
fopen(i2c_dev);
Matlab reports the BitRate set at 400KHz, but proving the bus, all SCL clocks are 100KHz. How do I get to set the bitrate to 400KHz?
Using Total Phase's Control Center, I am able to send commands at 400KHz. Thus, the Aardvark can generate SCL clocks at 400KHz.
Thanks.

답변 (1개)

Nick Choi
Nick Choi 2017년 10월 3일
This seems to be related to a bug that was fixed in MATLAB R2017a.
There is an external bug report published for this issue that has a workaround:
If you set the 'BitRate' and 'PullupResistors' properties before you open the i2c connection with 'fopen', you will be able to observe the change.
  댓글 수: 1
Pedro Gelabert
Pedro Gelabert 2017년 10월 3일
The workaround does not fix the problem. I had already tried rearranging the setup of the BitRate before and after fopen.
In our company, engineering users do not have admin rights, so IT department needs to deploy the update to all users. The 2017 update has not been deployed yet. Therefore, I am unable to update to it. Is there another workaround?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Software Development Tools에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by