STM32MP1 support available in SW4STM32

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world.
And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4; you can download a short video showcasing this on the ac6-tools website (registration required).

System Workbench for STM32

STM32F417 USB stop communicating

they use to be some bugs in the cdc i/f that coud hangs the com but those got fixed a while ago.

they are possible races condition between rx and tx if you handle them outside the interrupt handler context that can lead to strange issue. that is because ST midleware and HAL not proplery locking and disbaling interrupt to acess the usb ll.
if you’r using rtos such issue come even more easily.

I myslef faces lock-up using teraterm and other terminal emulator when mixing and doing concurent rx/tx (f4 h/w) .

You may have data and pointer corruption timing issues on added code causing trouble to the cdc side
could you share the cdc i/f code part where you hanlding new rx packet and where you do the tx  ?