ITADN

mbed-usb-device-serial test randomly fails (STM32F7)

#547OpenJohnK1987 创建于 2026-02-22
STMicro
J
JohnK1987commented
My setup: - Windows 11; VS Code; GCC 13.3.1 - Nucleo-F767ZI - MbedOS 7 The mbed-usb-device-serial test is randomly failing mostly on cases below - Running case 1: 'CDC USB reconnect' - Running case 7: 'Serial USB reconnect' - Sometimes also others This does not look like target or STM32 specific issue but more like a timing issue on host side because the error is > PermissionError(13, 'Access denied.', None, 5)". Tried 20 times When change delay in [usb_device_serial.py ](https://github.com/mbed-ce/mbed-os/blob/64e236ffc7092033a8e6d7d79a5b14f7822f4350/drivers/usb/tests/TESTS/host_tests/usb_device_serial.py#L147-L154) from 0,05 to 0,2 then the random failing disappeared. >With delay 0,05 10/20 successful attempts. With delay 0,2 20/20 successful attempts. I propose to change the delay 0,2 and also define that peace of code as function because it is five times same across the file. More over the STM32F7 is not first family where I saw this so I believe this will help whole ST brand.
1 条评论