Simulink Library Browser Error: Issue While Creating a New Project for S32K3XX

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

Simulink Library Browser Error: Issue While Creating a New Project for S32K3XX

Jump to solution
3,061 Views
Ajay_R
Contributor II

Hello,

I have installed the MBD toolbox for S32K3XX 1.2.0 version as per the installation guide. Now, I'm trying to create a new project for S32K344. But for me in Simulink Library Browser, IO Blocks, ISR Blocks and MCAL Blocks are showing Empty. But, in CDD Blocks and Communication Blocks are showing some Parameters. For your reference, I attached the image.

And one more thing I'm using MATLAB 2022a Version (See Matlab_Version.png image) 

So, please let me know the solution to resolve the issues as soon as possible.

0 Kudos
1 Solution
3,024 Views
SorinIBancila
NXP Employee
NXP Employee

Hello,

Possible solutions to your problem might be:

  • Remove the toolbox from the path by using the following command in Matlab CLI mbd_s32k3_path('remove') then add again the toolbox to path by running this mbd_s32k3_path. Make sure that all Simulink instances are close. Restarting the Matlab after you removed the toolbox from path might help.
  • Recreate the codertarget by executing the following script 'mbd_s32k3.target.create_codertarget'. (Toolbox must be in path)
  • Refresh the Simulink Library Browser (by pressing the F5 or Right Click -> Refresh inside the Simulink Library Browser)

 

Let me know if any of these suggestions helped you. 

 

Best regards,

Bancila Sorin

View solution in original post

0 Kudos
4 Replies
2,981 Views
Ajay_R
Contributor II

Hello,

I have installed the MBD toolbox for S32K3XX 1.2.0 version. For me in Simulink Library Browser, In Communication Block CAN & SPI Blocks are there (See attachment). But I need I2C Block for my project. So, could you please tell me where I can find the Block?

And one more thing, I want to know about what are the communications blocks are available in NXP MBDT for S32K3XX MCUs.

Please Let me, if you need any other information.

0 Kudos
2,972 Views
Irina_Costachescu
NXP Employee
NXP Employee

Hello @Ajay_R 

The MBDT for S32K3 1.2.0 does not include support for I2C. The communication components supported by the MBDT (blocks, examples, peripheral configuration in the external tools projects we deliver) are CAN, SPI and UART (which can be found under the CDD Blocks category).

However, since the MBDT Simulink blocks generate code on top of RTD (Real Time Drivers), if you would like to use I2C communication in your project, you could try the following approach:

  • Configure the I2C peripheral inside the external configuration tool project associated to your model. For this, you could press the Configure button of any MBDT block in your model - this will open the hardware configuration of the application in the selected external configuration tool. There, you can configure the I2C peripheral, pins and clocks and save this updated configuration.
  • In Simulink, you could use the custom code functionality to insert I2C RTD APIs in the model. Please find attached a link describing the custom code insertion functionalities. Please note that the drivers on top of which MBDT blocks generate code are delivered with the toolbox and can be found inside the S32K3_RTD folder.

Hope this helps,

Irina

 

 

3,025 Views
SorinIBancila
NXP Employee
NXP Employee

Hello,

Possible solutions to your problem might be:

  • Remove the toolbox from the path by using the following command in Matlab CLI mbd_s32k3_path('remove') then add again the toolbox to path by running this mbd_s32k3_path. Make sure that all Simulink instances are close. Restarting the Matlab after you removed the toolbox from path might help.
  • Recreate the codertarget by executing the following script 'mbd_s32k3.target.create_codertarget'. (Toolbox must be in path)
  • Refresh the Simulink Library Browser (by pressing the F5 or Right Click -> Refresh inside the Simulink Library Browser)

 

Let me know if any of these suggestions helped you. 

 

Best regards,

Bancila Sorin

0 Kudos
3,006 Views
Ajay_R
Contributor II

Hi.

Thanks for your reply.  As you said, I tried that method. But still for me, it is not showing anything.  So finally, in Add-On Explorer I uninstalled the Simulink (See Browser_2.png Image) and once again I installed it. Now it is showing. For your reference I attached images.

Note: After Uninstall Simulink I Restart my PC and then I installed it.

0 Kudos