-
Notifications
You must be signed in to change notification settings - Fork 3k
Mutex lock failed on Mbed OS5.10.x #8518
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
Comments
Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-97 |
@toyowata I believe this is answered. I'll close it as resolved. If not, please reopen with an update |
@0xc0170 What is the correct usage of the serial API |
@maxgerhardt it would be something like that #include "mbed.h"
EventQueue queue;
Serial pc(TX, RX);
void read() {
printf("%02X\n", pc.getc());
}
int main() {
Thread eventThread;
eventThread.start(callback(&queue, &EventQueue::dispatch_forever));
pc.attach(queue.event(&read));
wait(osWaitForever);
} or I made a wrapper around |
@pilotak - that wrapper's seems very... complicated. But hard to judge as I'm not quite sure what the intended timeout semantics are. The If you want to process serial data from interrupt, use Don't use Or I guess Documentation for |
@kjbracey-arm it's for receiving block of data sent out every 2 sec with variable block length. And important callback when sending is done - for RS485 DE/RE pin. I was inspired by AT parser lib but yes i could probably make it better or maybe don't need it at all but due to lack of documentation this is the result. Anyway reading your explanation it sound like |
I have now worked around this issue by using |
@pilotak If the data is framed sensibly, a timeout on the reads shouldn't really be required. You just do a non-blocking read of whatever is available, running your state machine. The AT handlers are a bit ugly because they're not state machine based - they're sitting there waiting for a response, and want that wait to have a timeout. It's possible to do better A simpler model is the PPP data pump (https://github.com/ARMmbed/mbed-os/blob/master/features/lwipstack/ppp_lwip.cpp), but that does rely on lovely nice framing. |
Description
I wrote a following program and works fine on OS5.9.7 but error is happened on OS5.10. 0, 5.10.1 and 5.10.2.
Target Board: Nucleo-F446RE
https://os.mbed.com/users/kenjiArai/code/Mutex_lock_failed_on_os_5_10/
The error message is below.
Looks like OS internal RTX Kernel bug.
Please give me an advice how to overcome this issue.
Issue request type
[ ] Question
[ ] Enhancement
[x] Bug
The text was updated successfully, but these errors were encountered: