-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
Description
Target
Multiple, tested with stm32l072 target
Tools
Keil uVision
Mbed OS Version
be215a3
As requested by @jeromecoutant I am submitting a new issue for a bug briefly discussed here: #6840.
In equeue_sema_wait in equeue_mbed.cpp if RTOS not present the ms argument is passed as a signed integer and then multiplied by 1000. This causes an overflow in some cases!
Changing this:
timeout.attach_us(callback(equeue_sema_timeout, s), ms*1000);
to this
timeout.attach_us(callback(equeue_sema_timeout, s), (us_timestamp_t)ms*1000);
Solves the problem for me, but it is still handled as a integer outside this function so might be other issues with this.
[ ] Question
[ ] Enhancement
[x] Bug
Metadata
Metadata
Assignees
Labels
No labels