Lancaster University's (short term!) clone of mbed-src for micro:bit. This is a copy of the github branch https://github.com/lancaster-university/mbed-classic
Fork of mbed-src by
.yotta_ignore@641:be9b2017785a, 2016-07-13 (annotated)
- Committer:
- LancasterUniversity
- Date:
- Wed Jul 13 12:52:54 2016 +0100
- Revision:
- 641:be9b2017785a
- Parent:
- 621:9c82b0f79f3d
Synchronized with git rev 1fb8ab4c
Author: James Devine
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.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 621:9c82b0f79f3d | 1 | # ignore files for targets that aren't supported by the yotta build (to |
mbed_official | 621:9c82b0f79f3d | 2 | # minimise the size of the published module) |
mbed_official | 621:9c82b0f79f3d | 3 | |
mbed_official | 621:9c82b0f79f3d | 4 | TARGET_ARM_SSG |
mbed_official | 621:9c82b0f79f3d | 5 | TARGET_Freescale |
mbed_official | 621:9c82b0f79f3d | 6 | TARGET_RENESAS |
mbed_official | 621:9c82b0f79f3d | 7 | TARGET_Silicon_Labs |
mbed_official | 621:9c82b0f79f3d | 8 | TARGET_Atmel |
mbed_official | 621:9c82b0f79f3d | 9 | TARGET_Maxim |
mbed_official | 621:9c82b0f79f3d | 10 | TARGET_NXP |
mbed_official | 621:9c82b0f79f3d | 11 | TARGET_STM |
mbed_official | 621:9c82b0f79f3d | 12 | TARGET_WIZNET |
mbed_official | 621:9c82b0f79f3d | 13 | TOOLCHAIN_IAR |
mbed_official | 621:9c82b0f79f3d | 14 |