[PATCH v2] usb: gadget: f_mass_storage: Move schedule() in sleep_thread()
Patrice CHOTARD
patrice.chotard at foss.st.com
Mon Jun 29 08:24:13 CEST 2026
On 6/25/26 14:36, Marek Vasut wrote:
> On 6/25/26 10:38 AM, Patrice Chotard wrote:
>> On STM32MP157C-DK2, when aborting the command "ums" using CTRL-C
>> it may take a while to get the control back on the console,
>> sometimes around 1 second.
>
> Why does that happen ?
>
> [...]
On STM32MP157C-DK2 board, there are 3 cyclics registered which are called by schedule():
_ mmc_cyclic_cd_poll (1 to 2us) every 100 ms
_ watchdog at 5a002000
_ video_idle
schedule is called on every loop, whereas ctrlc() (CTRL+C detection) is called every 10 * 20000 loops.
That means ctrlc() is called every ~700ms on STM32MP157C-DK2 board,
Moving schedule() from main loop to same level that ctrlc(), it allows to call ctrlc() every ~70ms
which increase reactivity when user hit CTRL+C.
Patrice
More information about the U-Boot
mailing list