thank you for your reply
I therefore understand that the serial connection could cause a Nucleo to freeze.
But my program uses serial communication via USB to communicate with a LabView program, for that I close the serial panel of Mbed Studio.
I had already had a freezing problem which ended up resolving it without my understanding why.
I also had a recurring problem (every 30 minutes) of interrupted serial communication via USB between the Nucleo and LabView under Windows 10 that I was able to solve by deactivating the “USB MSD” which concerns the Nucleo (to find: open the Windows 10 peripheral manager - USB bus controller - USB mass storage device) (see: Nucelo L432KC freeze - #10 by JojoS). But I need the USB MSD as long as I am developing the program.
I would do a test by disabling USB MSD and letting the Nucleo run for a few hours.
Marc.