cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMonitor-UCPD 1.1.0 crashes when a board is connected

asmi
Associate II

If I run the application without any boards connected, it launches OK (showing "Please connect your board(s)!", but as soon as I connect the board (tried that with STM32G071B-DISCO and Nucleo-G474RE with X-NUCLEO-USBPDM1 attached and programmed for USB PD, and results were the same) and I click "Refresh list of connected boards", it crashes to desktop. If I run the application while having board already connected, it just crashes immediately. I tried launching it as administrator, and results were the same, but this time error log files appeared in the program directory. I've attached one of them hoping it will help with investigation. Among other things, it contains information about my system.

Any help with this would be appreciated. I'm working on a project that will use G4 MCU for USB PD, so I need to get this to work, as the whole point I've bought DISCO board was to use it as CC sniffer.

1 ACCEPTED SOLUTION

Accepted Solutions
Landry
Senior

For your information , STM32CubeMonitor-UCPD 1.1.1 has been released this week to solve this incompatibility issue with recent version of JRE.

https://www.st.com/en/development-tools/stm32cubemonucpd.html

View solution in original post

12 REPLIES 12
stephane.legargeant
ST Employee

Hello

It seems that you are facing an issue between jssc (the serial port java driver) and the jvm version.

Can you try to use an older jre version to see if it is better ?

Thank you

Stephane

asmi
Associate II

Where can I find them? Oracle website seems to only have latest one (8u261) available : https://www.oracle.com/java/technologies/javase-jre8-downloads.html

I've also did some changes in the log file config to see if it will show anything useful for your developers to diagnose. Nothing stood out to me, but I'm not a Java developer, so I've attached the log file anyway in case it will be useful for diagnostics.

Please let me know if there is anything else I can do to help your developers diagnose and fix the problem. I tried everything I can think of to no avail, the problem seems to be inside detectIfUSBCPD method of CommunicationUSBCPD class.

Kraal
Senior III

Hello,

I faced the exact same issue 3 days ago with the Cube Power monitor and its relevant board (X-NUCLEO-LPM01A).

It was working without issues last year, and when I wanted to use it again it showed the same behavior as you, i.e. as soon as I tried to click on the connect button of the GUI the monitor would crash to desktop.

I solved it by installing the latest version of Cube Power Monitor, which comes with its own java machine, and sure enough the interface is working again.

So @stephane.legargeant​ is right, there is an incompatibility between the latest Java version and the jar files.

Best regards.

There is an archive page on oracle website providing older JRE for test purpose.

You can try the version 8u202 on this page : https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html

Hi Stephane!

I've installed 8u202 as you suggested, unpacked the executable and launched the app with this command line: "c:\Program Files\Java\jre1.8.0_202\bin\java" com.st.mtt.guiusbcpd.MainApp (I use console version of Java executable on purpose as it allows to see trace output in real time)

It does not crash anymore, so that's a good sign. However it doesn't recognize STM32G071B-DISCO board connected. I flashed it with the latest firmware found here: https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-discovery-kits/stm32g071b-disco.html#resource but UCPD still does not "see" it.

Attached is UCPD application's trace log in case there is anything useful.

Hello Asmi

It seems that board is not detected. How is connected the board to the computer ? Do you see some com port in the device manager when the board is plugged ? (The user manual indicates "We recommend to always plug the micro USB cable so that the disco is powered on, and have the possibility to see the details on the USBPD protocol exchanges.")

Best regards

Stephane

The board is connected to PC via microUSB and is properly detected - I can see an mbed "drive", there is a comport "COM4", and I'm able to communicate to it using STM32Programmer tool (which is what I used to flash it with the latest firmware). If you look in the log file, you will see that it detects that COM4 port is connected, but UCPD monitor still doesn't "see" it.

Hello Asmi,

Have you checked the UM2546 (STM32G071B-Disco USB-C Discovery kit) ?

Are you in standalone mode or in spy mode ? What is your door position ?0693W000003QCk5QAG.jpg

As indicated in the UM, when you are in spy mode (chapter 5.2.4) , only the trace is available, so you can't "see" the board.

See the wiki to see how to get the trace.

Thanks Nicolas! It turned out I didn't really understand how GUI is supposed to work. It works just fine now!

But I still think you guys should update the executable to work with latest Java version because I imagine a lot of people are going to use it, and it's not trivial to force app to use a different version of JRE. I'm a software develop who happen to know this, but I suspect there is quite a bit of people who don't.