MBDT I2C Example Model

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MBDT I2C Example Model

226 Views
avinashstarkenn
Contributor III

Hello, I recently trying an example of I2C communication in Simulink using library example given in NXP Library toolbox. But its now working i connected the hardware as instructed in the example. 

for dubbing i am using S32 Design Studio.

i am using S32K344 Q257 and example s32k3xx_i2c_async_s32ct

following is the model and code

PFA 

0 Kudos
Reply
3 Replies

164 Views
CristinaB
NXP Employee
NXP Employee

Hello, @avinashstarkenn,

Thank you for your interest in Model-Based Design Toolbox for S32K3.

I downloaded the TRY1.elf from your attachment to the S32K344-Q257 hardware board and validated that the variables are incrementing in the FreeMASTER project s32k3xx_i2c_async_s32ct.pmpx.

A suggestion would be to first try the example inside the toolbox without renaming it and validate it using the FreeMASTER project s32k3xx_i2c_async_s32ct.pmpx, which can be found in the example folder.

Could you provide us with more details about the problem you are experiencing so we can investigate the issue further?

Best regards,

Cristina

0 Kudos
Reply

103 Views
avinashstarkenn
Contributor III
Hello, @CristinaB, in this example can we debug the variable increment in S32 design studio. without using FreeMASTER.
So we generated the code and using design studio we are trying to debug it. According to me Freemaster is a debugging tool, the I2C should not be depend on freeMaster.
0 Kudos
Reply

71 Views
CristinaB
NXP Employee
NXP Employee

Hello, @avinashstarkenn,

FreeMASTER is a very useful tool for real-time data visualization and MCU real-time control. A FreeMASTER project, s32k3xx_i2c_async_s32ct.pmpx, was attached to the model to inspect the values of the variables in the scope and it can be opened from the FreeMASTER link in the Explore all options list, as you can see in the image below. Instructions can be found in the HW and SW setup link in the Explore all options list, that opens the s32k3xx_i2c_async_s32ct_example_readme.html next to the model.

Explore all options list in the modelExplore all options list in the model

If you want to use S32 Design Studio for debugging this model, you can follow these steps:

  • Build the model and deploy the application on target.
  • Open the Hardware Settings (Configuration Parameters), go to Hardware Implementation/Target hardware resources/
    S32 Design Studio Project and press the Open button.

This should open the generated project corresponding to the model in S32 Design Studio IDE, where it can be be built, flashed, debugged, modified, integrated with other existing code, etc.

Hardware Settings button from the Hardware tabHardware Settings button from the Hardware tab

Configuration ParametersConfiguration Parameters

Imported model in S32 Design Studio IDEImported model in S32 Design Studio IDE

Hope this helps,
Cristina

0 Kudos
Reply