-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Block not only uart interrupts #6587
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
base: master
Are you sure you want to change the base?
Conversation
sync with main repo
Replaced by all interrupts blocking/unblocking
Replaced by all interrupts blocking/unblocking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plesde don't use the ets_intr_lock/unlock functions or macros directly, their usage is flawed and can cause stability issues.
Instead, use the InterruptLock object for scoped and correct protection, including possible nesting.
I should use it in this way?: InterruptLock *lock=new InterruptLock;
// time critical section
delete lock; |
Easier than that:
check this example |
In some places interrupts unlocks before scope ends. I think in this places better to use |
new and delete are slow, increase heap fragmentation and useless in this case. |
I have tested more: |
@saloid said:
Please don't work on this over core v2.5.2. There are recent fixes related to lock/unlock that were merged recently and aren't released. What you said sounds like that. |
Still getting same exceptions with the latest git version.
|
Fixes #6564