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 mbed official

Committer:
LancasterUniversity
Date:
Wed Jul 13 12:52:54 2016 +0100
Revision:
641:be9b2017785a
Parent:
581:39197bcd20f2
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?

UserRevisionLine numberNew contents of line
mbed_official 581:39197bcd20f2 1 {
mbed_official 581:39197bcd20f2 2 "name": "mbed-classic",
mbed_official 581:39197bcd20f2 3 "version": "0.0.1",
mbed_official 581:39197bcd20f2 4 "description": "mbed core SDK (for mbed 2.0, *not* mbedOS)",
mbed_official 581:39197bcd20f2 5 "keywords": [
mbed_official 581:39197bcd20f2 6 "mbed"
mbed_official 581:39197bcd20f2 7 ],
mbed_official 581:39197bcd20f2 8 "author": "Bogdan Marinescu <bogdan.marinescu@arm.com>",
mbed_official 581:39197bcd20f2 9 "repository": {
mbed_official 581:39197bcd20f2 10 "url": "git@github.com:mbedmicro/mbed.git",
mbed_official 581:39197bcd20f2 11 "type": "git"
mbed_official 581:39197bcd20f2 12 },
mbed_official 581:39197bcd20f2 13 "homepage": "https://github.com/mbedmicro/mbed",
mbed_official 581:39197bcd20f2 14 "licenses": [
mbed_official 581:39197bcd20f2 15 {
mbed_official 581:39197bcd20f2 16 "url": "https://spdx.org/licenses/Apache-2.0",
mbed_official 581:39197bcd20f2 17 "type": "Apache-2.0"
mbed_official 581:39197bcd20f2 18 }
mbed_official 581:39197bcd20f2 19 ],
mbed_official 581:39197bcd20f2 20 "extraIncludes": [
mbed_official 581:39197bcd20f2 21 "api",
mbed_official 581:39197bcd20f2 22 "hal",
mbed_official 581:39197bcd20f2 23 "targets/hal",
mbed_official 581:39197bcd20f2 24 "targets/cmsis"
mbed_official 581:39197bcd20f2 25 ],
mbed_official 581:39197bcd20f2 26 "dependencies": {
mbed_official 581:39197bcd20f2 27 },
mbed_official 581:39197bcd20f2 28 "targetDependencies": {
mbed_official 581:39197bcd20f2 29 }
mbed_official 581:39197bcd20f2 30 }