PIL simulation error for NXP S32K3x4EVB-Q172

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

PIL simulation error for NXP S32K3x4EVB-Q172

674 Views
Saurabh9
Contributor I

Hello, 

I am trying out a simple PIL simulation using the MBDT for S32K3 series version 1.1.0 on Matlab 2021b. The board I am working on is NXP S32K3x4EVB-Q172. Using SImulink SIL/PIL I was able to run a SIL successfully before going to PIL. During PIL I get the following error in Simulink. Sometimes, it also gives me an error about sending the data to board instead of receiving it as shown in the image.

I also tried deploying model examples for UART provided with the MBDT such as 'S32K344_uart_async_s32ct'. The model gets deployed but on putty terminal again, no communication happens. 

Please provide guidance on how I can resolve this.

Thank you

Simple_PIL_project_issue_cc.png

0 Kudos
1 Reply

652 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @Saurabh9,

For every Simulink model created for S32K3 MCU, our toolbox associates an S32 CT or EB tresos configuration project, which holds the board's settings and generates the configuration C code, used by the Simulink model later on, during the compile process. By default, the S32K3 toolbox associates an S32CT/EBT project, configured for the S32K344_Q257, the other evaluation board.
The main difference between the S32K3x4-Q257 EVB and the S32K3x4-Q172 EVB is that the first one uses the LPUART13 while the second one, uses the LPUART6.
You have two options here:
1. You can open the external configuration tools, change the package from Q257 to Q172 and configure the LPUART6, with all its dependencies( pins, interrupts)
2. You can replace the S32CT configuration file, with the s32k344_q172.mex, attached to this thread (the .mex extension here has nothing to do with the one from MATLAB, it's an S32CT format).
To do so, you have to go to Hardware Implementation, Hardware and change the Default Configuration template, as shown below.

mariuslucianand_0-1648251474071.png

In both cases, you also need to specify the PIL configuration which LPUART to use, the COM port on your PC, and the Baudrate. For this, you have to go to Hardware Implementation, PIL. For me it was COM31, but this will be different on your configuration.

mariuslucianand_1-1648251582058.png

I have also attached an example.

On this specific board, the OpenSDA functionality as USB2Serial is not yet fully functional, so you need to use an external USB2Serial Converter connected to the J44(1 to TX, 2 to RX) header in order for PIL to work. Simulink will deploy the generated elf file over the OSDA, and will communicate for PIL over the external USB2Serial converter. 

mariuslucianand_2-1648252183459.png

To test the example, please open the k344_q172_h_s32ct.mdl, open the referenced configuration and type your COM port for the UAB2Serial you are using.

Please find all the board's schematics here https://www.nxp.com/design/development-boards/automotive-development-platforms/s32k-mcu-platforms/s3... 

Hope this helps,

Marius

 

0 Kudos