Closed DanielKirsch closed 2 years ago
I think a good solution would anyway be to replace all
if (USBH_USE_OS == 1U)
phost->os_msg = (uint32_t)USBH_PORT_EVENT;
if (osCMSIS < 0x20000U)
(void)osMessagePut(phost->os_event, phost->os_msg, 0U);
else
(void)osMessageQueuePut(phost->os_event, &phost->os_msg, 0U, NULL);
endif
endif
with a single define like USBH_OS_TASKTRIGGER ( USBH_PORT_EVENT ) that can then be configured and the user has the option to replace it with an more efficient function then osMessageQueue.
Hi @DanielKirsch,
Thank you for this report and thank you also for the solution suggested. You request has been forwarded to our development teams. I will get back to you as soon as they provide me with their feedback.
With regards,
Hi @DanielKirsch,
First of all we would like to apologize for the time it takes to answer sometimes. Please allow me to introduce @CHAMSTM who will look deeper into what you reported.
Thank you for your patience and again thank you for your contribution.
With regards,
Hi @DanielKirsch,
Our development teams confirmed your point. They will deeper analyze your proposal and share a fix in a future release. Thank you again for your contribution.
With regards,
ST Internal Reference: 107774
Hi ST Team,
any news about that?
Hi @DanielKirsch and @GiulioDallaVecchia,
I hope you are both fine. Back to you about this point.
Our development teams said this is rather an enhancement than a bug. Indeed, the stack is working correctly and has been validated and certified.
As for the request itself, it is about providing the users with the possibility to call their own implementation of osMessageQueue()
. This change is approved on the principle but, unfortunately, cannot be implemented for the time being due to its impact on all applications. Moreover, the impact on customers has been evaluated not to be significant.
We would have really been able to address your request but could not in this case. Thank you for your comprehension and thank you again for the detailed proposal.
With regards,
Describe the set-up
Describe the bug The USB driver is putting a way to much in the message queue of the OS. The OS is returning an error code that the memory can't be reserved anymore. All error codes are been ignored from the OS, that's why it is still "working".
How To Reproduce
Additional context The USBH_Process shall only add something in the queue if really needed and if not already done.