Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB stack using freertos task and external message queue. #198

Open
anischali opened this issue Jun 20, 2024 · 1 comment
Open

USB stack using freertos task and external message queue. #198

anischali opened this issue Jun 20, 2024 · 1 comment

Comments

@anischali
Copy link

We implemented a full peripheral power management system, so we disable and enable devices multiple times and we also use a the usb use task feature. doing that we might have an unexpected behavior with the freertos heap allocation since deinit usb stack will destroy the internal msg queue and create it again and again. with the other devices we separated the memory resources from the rest so we allocate memory only one at the init time but in case of usb stack the sdk is responsible for allocating and destroying the queues.

The solution:

  1. would be an external (from sdk) provided queue when calling the init code just like the usb use task macro.
  2. A macro that envelops the create and destroy queue and when used we don't destroy the queue in runtime to keep the same queue all the time (I have already tested it and I can eventually submit a merge request if you want).

Thank you.

@mcuxsusan
Copy link
Contributor

Hi @anischali, thanks for raising the issue. I have forwarded the issue to develop team, the feedback could be delayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants