I use ChibiOS_17.6.3
I use power STOP mode to save power on my battery-powered device.
I shut my system down and restart it according to the recommendations here: http://www.chibios.org/dokuwiki/doku.ph ... s:kb:power
Everything goes well, but I noticed that the thread named "usb_pump" does not reappear after system has restarted.
The driver sources say that this thread can only be started once:
Code: Select all
#if defined(_CHIBIOS_RT_)
/* Creates the data pump thread. Note, it is created only once.*/
if (usbp->tr == NULL) {
thread_descriptor_t usbpump_descriptor = {
"usb_pump",
THD_WORKING_AREA_BASE(usbp->wa_pump),
THD_WORKING_AREA_END(usbp->wa_pump),
STM32_USB_OTG_THREAD_PRIO,
usb_lld_pump,
(void *)usbp
};
usbp->tr = chThdCreateI(&usbpump_descriptor);
chSchRescheduleS();
}
#endif
The sources also say "This function must be executed by a system thread in order to make the USB driver work."
My question is: how can I restart this thread after returning from STOP mode?
Regards,
Vladimir
PS: I notices this system thread disappeared in ChibiOS 18.2.1 code.