Go to file
James Devine 1fb8ab4c19 mbed-classic: BUGFIX for timer when using wait_ms from interrupt context
Previously if a user used wait[_ms,_us] in interrupt context the device would
hang indefinitely. This was due to incrementing overflowCount from
interrupt context only.

This meant that if a user used wait[_ms,_us] in an ISR with
the same or greater interrupt priority, it would result in an infinite
loop as the overflowCount variable would never be incremented, and
wait[_ms,_us] would never return.

This patch simply applies a better solution for the race condition
mentioned in the previous commit. It instead disables the timer1
interrupt and increments the overflowCount variable, preventing
the race condition whilst supporting wait[_ms,_us] in interrupt
context.
2016-05-13 16:39:15 +01:00
api initial commit before we edit this git repo 2016-02-02 15:26:15 +00:00
common initial commit before we edit this git repo 2016-02-02 15:26:15 +00:00
hal initial commit before we edit this git repo 2016-02-02 15:26:15 +00:00
targets mbed-classic: BUGFIX for timer when using wait_ms from interrupt context 2016-05-13 16:39:15 +01:00
CMakeLists.txt initial commit before we edit this git repo 2016-02-02 15:26:15 +00:00
module.json initial commit before we edit this git repo 2016-02-02 15:26:15 +00:00