S32K3x4EVB-T172 PIL Communication Error/ Timeout with MBDT S32K3xx 1.4.0

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

S32K3x4EVB-T172 PIL Communication Error/ Timeout with MBDT S32K3xx 1.4.0

336 Views
PruthviB
Contributor II

Hello, 

I tried running the example PIL S32CT with MBDT S32K3xx (v1.4.0) on MATLAB 2023a. My setup consists of an S32K3x4EVB-T172 connected via the onboard OpenSDA port.

Attempt 1 (OpenSDA COM):
I can flash the generated target model successfully, but PIL execution fails immediately with the following error:
"The communication channel could not be opened" (see attached screen shot of the error message)

Attempt 2 (External USB2Serial Convertor)
I kept the OpenSDA port connected for flashing, but connected an external USB2Sireal  connector to J44(1 to TX and 2 to RX) for PIL communication and updated the COM port in the hardware settings. The model flashes successfully, but execution times out with this error:

Error: The timeout of 10 seconds for receiving data from the rtiostream interface has been exceeded. There might be multiple reasons for this communications failure.
You should:

(a) Check that the target hardware configuration is correct, for example, check that the byte ordering is correct.
(b) Confirm that the target application is running on the target hardware.
(c) Consider the possibility of application run-time failures (e.g. divide by zero exceptions, incorrect custom code integration, etc.).

Note (c): To identify possible reasons for the run-time failure, consider using SIL, which supports signal handlers and debugging.

If you cannot find a solution, consider using the method setTimeoutRecvSecs of rtw.connectivity.RtIOStreamHostCommunicator to increase the timeout value.
  

Questions:
 
1. Does the S32K3x4EVB-T172 board require an external USB2Serial convertor for PIL or can it run PIL over the onboard OpenSDA port ? 
2. If an external USB2Serial convertor required , what is the exact hardware UART configuration expected? 
3. Am i missing any configuration ?

Any guidance i highly appreciated! 

0 Kudos
Reply
3 Replies

279 Views
dragostoma
NXP Employee
NXP Employee

Hi, @PruthviB,

Before investigating further, could you clarify why you are using MBDT S32K3xx v1.4.0? The latest available release is v1.8.0, which includes several fixes and improvements. We recommend upgrading to v1.8.0 first and checking whether the issue still reproduces.

Regarding your setup, an external USB-to-Serial converter is not required for PIL communication on the S32K3X4EVB-T172. The onboard OpenSDA interface already provides access to the target UART used for host-target communication, so the same USB connection can be used for both programming and PIL communication.

Since OpenSDA has direct access to the UART pins, connecting an additional USB-to-Serial adapter is generally unnecessary and may even introduce configuration conflicts if multiple serial interfaces are active.

Could you please try the example with:

  • MBDT S32K3xx v1.8.0
  • Only the onboard OpenSDA USB connection
  • The COM port exposed by OpenSDA selected in the hardware settings

 

Best regards,
Dragos

56 Views
PruthviB
Contributor II

Hi, @dragostoma

Thank you for the guidance regarding OpenSDA onboard interface.

Regarding the version, MBDT v1.4.0 was the recommended version for MBDT for BMS. Could you please provide guidance on running PIL simulations in v1.4.0 ? 

Best Regards,

Pruthvi

0 Kudos
Reply

44 Views
dragostoma
NXP Employee
NXP Employee

Hi, @PruthviB,

Indeed, you are correct. The BMS Toolbox requires S32K3 Toolbox version 1.4.0. Since the initial discussion did not mention the BMS Toolbox, I assumed the issue was related to the use of an outdated S32K3 Toolbox version.

Regarding the PIL simulation in version 1.4.0, the workflow remains unchanged. The example model provided with the toolbox is configured to use the LPUART instance whose RX and TX signals are routed through the OpenSDA interface. If you intend to use a dedicated USB-to-Serial converter, you will need to configure a different LPUART instance and assign the corresponding RX and TX pins to which the converter will be connected.

To summarize:

  • Using the OpenSDA interface: the example model included with the toolbox should work without any additional modifications. The required LPUART instance and associated RX/TX pins are already configured.

  • Using a dedicated USB-to-Serial converter: the converter must be connected to specific RX and TX pins on the target device. Consequently, those pins must be configured and mapped to an available LPUART instance, which requires corresponding updates to the project configuration.

Please make sure that the correct COM Port is used, and the RX and TX pins from J44 are configured when using the USB2Serial converter.

 

Let us know how it works,

Dragos

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2409795%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K3x4EVB-T172%20PIL%20Communication%20Error%2F%20Timeout%20with%20MBDT%20S32K3xx%201.4.0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2409795%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20running%20the%20example%20PIL%20S32CT%20with%20MBDT%20S32K3xx%20(v1.4.0)%20on%20MATLAB%202023a.%20My%20setup%20consists%20of%20an%20S32K3x4EVB-T172%20connected%20via%20the%20onboard%20OpenSDA%20port.%3CBR%20%2F%3E%3CBR%20%2F%3EAttempt%201%20(OpenSDA%20COM)%3A%3CBR%20%2F%3EI%20can%20flash%20the%20generated%20target%20model%20successfully%2C%20but%20PIL%20execution%20fails%20immediately%20with%20the%20following%20error%3A%3CBR%20%2F%3E%22The%20communication%20channel%20could%20not%20be%20opened%22%20(see%20attached%20screen%20shot%20of%20the%20error%20message)%3CBR%20%2F%3E%3CBR%20%2F%3EAttempt%202%20(External%20USB2Serial%20Convertor)%3CBR%20%2F%3EI%20kept%20the%20OpenSDA%20port%20connected%20for%20flashing%2C%20but%20connected%20an%20external%20USB2Sireal%26nbsp%3B%20connector%20to%20J44(1%20to%20TX%20and%202%20to%20RX)%20for%20PIL%20communication%20and%20updated%20the%20COM%20port%20in%20the%20hardware%20settings.%20The%20model%20flashes%20successfully%2C%20but%20execution%20times%20out%20with%20this%20error%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EError%3A%20The%20timeout%20of%2010%20seconds%20for%20receiving%20data%20from%20the%20rtiostream%20interface%20has%20been%20exceeded.%20There%20might%20be%20multiple%20reasons%20for%20this%20communications%20failure.%3CBR%20%2F%3EYou%20should%3A%3CBR%20%2F%3E%3CBR%20%2F%3E(a)%20Check%20that%20the%20target%20hardware%20configuration%20is%20correct%2C%20for%20example%2C%20check%20that%20the%20byte%20ordering%20is%20correct.%3CBR%20%2F%3E(b)%20Confirm%20that%20the%20target%20application%20is%20running%20on%20the%20target%20hardware.%3CBR%20%2F%3E(c)%20Consider%20the%20possibility%20of%20application%20run-time%20failures%20(e.g.%20divide%20by%20zero%20exceptions%2C%20incorrect%20custom%20code%20integration%2C%20etc.).%3CBR%20%2F%3E%3CBR%20%2F%3ENote%20(c)%3A%20To%20identify%20possible%20reasons%20for%20the%20run-time%20failure%2C%20consider%20using%20SIL%2C%20which%20supports%20signal%20handlers%20and%20debugging.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20cannot%20find%20a%20solution%2C%20consider%20using%20the%20method%20setTimeoutRecvSecs%20of%20rtw.connectivity.RtIOStreamHostCommunicator%20to%20increase%20the%20timeout%20value.%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EQuestions%3A%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3E1.%20Does%20the%20S32K3x4EVB-T172%20board%20require%20an%20external%20USB2Serial%20convertor%20for%20PIL%20or%20can%20it%20run%20PIL%20over%20the%20onboard%20OpenSDA%20port%20%3F%26nbsp%3B%3CBR%20%2F%3E2.%20If%20an%20external%20USB2Serial%20convertor%20required%20%2C%20what%20is%20the%20exact%20hardware%20UART%20configuration%20expected%3F%26nbsp%3B%3CBR%20%2F%3E3.%20Am%20i%20missing%20any%20configuration%20%3F%3CBR%20%2F%3E%3CBR%20%2F%3EAny%20guidance%20i%20highly%20appreciated!%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2409937%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3x4EVB-T172%20PIL%20Communication%20Error%2F%20Timeout%20with%20MBDT%20S32K3xx%201.4.0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2409937%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F265798%22%20target%3D%22_blank%22%3E%40PruthviB%3C%2FA%3E%2C%3C%2FP%3E%0A%3CDIV%3E%0A%3CP%3EBefore%20investigating%20further%2C%20could%20you%20clarify%20why%20you%20are%20using%20%3CSTRONG%3EMBDT%20S32K3xx%20v1.4.0%3C%2FSTRONG%3E%3F%20The%20latest%20available%20release%20is%20%3CSTRONG%3Ev1.8.0%3C%2FSTRONG%3E%2C%20which%20includes%20several%20fixes%20and%20improvements.%20We%20recommend%20upgrading%20to%20v1.8.0%20first%20and%20checking%20whether%20the%20issue%20still%20reproduces.%3C%2FP%3E%0A%3CP%3ERegarding%20your%20setup%2C%20an%20%3CSTRONG%3Eexternal%20USB-to-Serial%20converter%20is%20not%20required%20for%20PIL%20communication%3C%2FSTRONG%3E%20on%20the%20%3CSTRONG%3ES32K3X4EVB-T172%3C%2FSTRONG%3E.%20The%20onboard%20%3CSTRONG%3EOpenSDA%20interface%20already%20provides%20access%20to%20the%20target%20UART%20used%20for%20host-target%20communication%3C%2FSTRONG%3E%2C%20so%20the%20same%20USB%20connection%20can%20be%20used%20for%20both%20programming%20and%20PIL%20communication.%3C%2FP%3E%0A%3CP%3ESince%20OpenSDA%20has%20direct%20access%20to%20the%20UART%20pins%2C%20connecting%20an%20additional%20USB-to-Serial%20adapter%20is%20generally%20unnecessary%20and%20may%20even%20introduce%20configuration%20conflicts%20if%20multiple%20serial%20interfaces%20are%20active.%3C%2FP%3E%0A%3CP%3ECould%20you%20please%20try%20the%20example%20with%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EMBDT%20S32K3xx%20%3CSTRONG%3Ev1.8.0%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EOnly%20the%20onboard%20%3CSTRONG%3EOpenSDA%20USB%20connection%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EThe%20COM%20port%20exposed%20by%20OpenSDA%20selected%20in%20the%20hardware%20settings%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EDragos%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2412453%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3x4EVB-T172%20PIL%20Communication%20Error%2F%20Timeout%20with%20MBDT%20S32K3xx%201.4.0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2412453%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F199423%22%20target%3D%22_blank%22%3E%40dragostoma%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%20for%20the%20guidance%20regarding%20OpenSDA%20onboard%20interface.%3CBR%20%2F%3E%3CBR%20%2F%3ERegarding%20the%20version%2C%20MBDT%20v1.4.0%20was%20the%20recommended%20version%20for%20MBDT%20for%20BMS.%20Could%20you%20please%20provide%20guidance%20on%20running%20PIL%20simulations%20in%20v1.4.0%20%3F%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20Regards%2C%3C%2FP%3E%3CP%3EPruthvi%3C%2FP%3E%3C%2FLINGO-BODY%3E