S32K3X4EVB-Q257 with MBDT?

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

S32K3X4EVB-Q257 with MBDT?

Jump to solution
617 Views
SoulWorker
Contributor I

Unable to connect to S32K3X4EVB-Q257?

Please help!!!连接失败.png连接失败_2.png

0 Kudos
1 Solution
553 Views
georgevictor
NXP Employee
NXP Employee

Hi, @SoulWorker,

Thank you for your interest in using our MBDT for S32K3 in your projects.

 

In the attached pictures I can see that you are encountering two different issues.

I will answer them in the following order:

  1. The External Mode Simulation

First of all, I would like to mention that there is a difference between the deployment of the Dio application on target and an External Mode Simulation, described as it follows:

  1. When building the s32k3xx_dio_s32ct model, code gets generated from the application, it is cross-compiled and linked into an executable file, which is automatically downloaded onto the board.
  2. In case of an External Mode Simulation, beside the behavior described at point a, which also happens here: the s32k3xx_dio_s32ct model is built and downloaded on target, there is one more step that is performed. The application running on target is fed with inputs from the host Simulink model, which are transmitted to the board via a serial communication. Also, outputs of the application running on target are sent back to the Simulink environment to be displayed and analyzed over the same serial communication.

Therefore, this serial communication needs to be configured, both hardware and software when running an External Mode Simulation.

Hardware:

You can use either:

  • the same OpenSDA port of the S32K3x4-Q257 as for download because it has an integrated USB2Serial converter.
  • the dedicated USB2Serial converter on the EVB.  I would like to add here that in the pre-configured project for the S32K344-Q257 processor that we are providing, the Uart component has two channels configured (UartChannel_0 and UartChannel_1). UartChannel_0 configures the LPUART6 instance on the board and UartChannel_1 corresponds to LPUART13.

    LPUART6 is routed to the EVB's OpenSDA chip. The MCU's LPUART13 instance is connected to ChannelB of the USB2Serial converter on the EVB.

    When you connect the board to the PC via the USB2Serial port, DeviceManager will display two COM ports for both FTDI channels; typically, the higher COM port number corresponds to our LPUART13 instance (it depends on how Windows assigns COM port numbers).georgevictor_0-1691763250017.png

Software: After making this connection press the refresh button under Hardware Implementation --> Target Hardware Resources --> External mode group and select the COM Port as identified inside Device Manager under the Ports tab on your PC.

If you are using the dedicated USB2Serial converter of the EVB, you should select UartChannel_1 inside the model settings and start with the highest COM port number in the list. Otherwise, use UartChannel0 for the OpenSDA USB2Serial converter.

 

For more details about how to run an External Mode Simulation, use the s32k3xx_extmode_s32ct example delivered with our toolbox and check the s32k3xx_extmode_s32ct_example_readme.html file found next to the model.

 

  1. The S32K3_FreeMaster example build

My suggestion for now is to start with a fresh setup for this example and try to rebuild the model.

To do this you need to:

  1. Clear our default project files like  <model_name>_Config folder and the <model_name>_Config.mex configuration file .
  2. The generated files like <model_name>_ert_rtw and slprj folders, the executables (<model_name>.elf, <model_name>.bin) and the Simulink Cache file (<model_name>.slxc).
  3. Clear also the <model_name>.sldd and  <model_name>.mat files generated by our toolbox for the model.

 

Please let me know if this helped you.

Cheers,

Victor

View solution in original post

2 Replies
554 Views
georgevictor
NXP Employee
NXP Employee

Hi, @SoulWorker,

Thank you for your interest in using our MBDT for S32K3 in your projects.

 

In the attached pictures I can see that you are encountering two different issues.

I will answer them in the following order:

  1. The External Mode Simulation

First of all, I would like to mention that there is a difference between the deployment of the Dio application on target and an External Mode Simulation, described as it follows:

  1. When building the s32k3xx_dio_s32ct model, code gets generated from the application, it is cross-compiled and linked into an executable file, which is automatically downloaded onto the board.
  2. In case of an External Mode Simulation, beside the behavior described at point a, which also happens here: the s32k3xx_dio_s32ct model is built and downloaded on target, there is one more step that is performed. The application running on target is fed with inputs from the host Simulink model, which are transmitted to the board via a serial communication. Also, outputs of the application running on target are sent back to the Simulink environment to be displayed and analyzed over the same serial communication.

Therefore, this serial communication needs to be configured, both hardware and software when running an External Mode Simulation.

Hardware:

You can use either:

  • the same OpenSDA port of the S32K3x4-Q257 as for download because it has an integrated USB2Serial converter.
  • the dedicated USB2Serial converter on the EVB.  I would like to add here that in the pre-configured project for the S32K344-Q257 processor that we are providing, the Uart component has two channels configured (UartChannel_0 and UartChannel_1). UartChannel_0 configures the LPUART6 instance on the board and UartChannel_1 corresponds to LPUART13.

    LPUART6 is routed to the EVB's OpenSDA chip. The MCU's LPUART13 instance is connected to ChannelB of the USB2Serial converter on the EVB.

    When you connect the board to the PC via the USB2Serial port, DeviceManager will display two COM ports for both FTDI channels; typically, the higher COM port number corresponds to our LPUART13 instance (it depends on how Windows assigns COM port numbers).georgevictor_0-1691763250017.png

Software: After making this connection press the refresh button under Hardware Implementation --> Target Hardware Resources --> External mode group and select the COM Port as identified inside Device Manager under the Ports tab on your PC.

If you are using the dedicated USB2Serial converter of the EVB, you should select UartChannel_1 inside the model settings and start with the highest COM port number in the list. Otherwise, use UartChannel0 for the OpenSDA USB2Serial converter.

 

For more details about how to run an External Mode Simulation, use the s32k3xx_extmode_s32ct example delivered with our toolbox and check the s32k3xx_extmode_s32ct_example_readme.html file found next to the model.

 

  1. The S32K3_FreeMaster example build

My suggestion for now is to start with a fresh setup for this example and try to rebuild the model.

To do this you need to:

  1. Clear our default project files like  <model_name>_Config folder and the <model_name>_Config.mex configuration file .
  2. The generated files like <model_name>_ert_rtw and slprj folders, the executables (<model_name>.elf, <model_name>.bin) and the Simulink Cache file (<model_name>.slxc).
  3. Clear also the <model_name>.sldd and  <model_name>.mat files generated by our toolbox for the model.

 

Please let me know if this helped you.

Cheers,

Victor

510 Views
SoulWorker
Contributor I
Thanks !
0 Kudos