Project

General

Profile

Reading i2c from sensor

Added by Coskun A. about 3 years ago

Hi,

I want to read bldc motor position with magnetic encoder on board stm32f429zi. I am using as5600 as a encoder. While reading position i can see my data on docklight program. But i couldn't see on my matlab scope.


Replies (4)

RE: Reading i2c from sensor - Added by Chandima Jayaneththi (จันทิมา) about 3 years ago

Hello Coskun,

Thank you for using Waijung blockset.

The issue is in the host serial receiving model file (i2c_encoder_rx.slx). I think you have mistakenly used a stm32F4 target specific UART Rx block in the host serial receiving model file.

If you remove that block and use a Host Serial Rx block, you can display the data on the scope.

I hope you can resolve this issue with this solution. If not please let us know.

Thank you.

RE: Reading i2c from sensor - Added by Coskun A. about 3 years ago

Hi,

Thank you for reply. This my mistake using uart rx block but when i change it to host serial rx block matlab give me fatal error. I tried many times but never changed.

RE: Reading i2c from sensor - Added by Chandima Jayaneththi (จันทิมา) about 3 years ago

Hello Coskun,
Could you please replace the Waijung source files with the attached source files in amg_usbconverter_n_patch.zip file. Please refer following instructions.

  1. Close Matlab and Simulink if you've already opened.
  2. Extract amg_usbconverter_n_patch.zip
  3. Copy all the mex files and replace them in the \waijung_17_03a\src\blocks

RE: Reading i2c from sensor - Added by Coskun A. about 3 years ago

Hi,

Thanks for reply i did what you said. First i couldn't succes but now i don't get error for now. Thank you for helping to find answer.

    (1-4/4)