diff --git a/lib/CMSIS/CM3/CoreSupport/core_cm3.c b/lib/CMSIS/CM3/CoreSupport/core_cm3.c index 56fddc52b..0e8c3c43c 100755 --- a/lib/CMSIS/CM3/CoreSupport/core_cm3.c +++ b/lib/CMSIS/CM3/CoreSupport/core_cm3.c @@ -733,7 +733,7 @@ uint32_t __STREXB(uint8_t value, uint8_t *addr) { uint32_t result=0; - __ASM volatile ("strexb %0, %2, [%1]" : "=r" (result) : "r" (addr), "r" (value) ); + __ASM volatile ("strexb %0, %2, [%1]" : "=&r" (result) : "r" (addr), "r" (value) ); return(result); } @@ -750,7 +750,7 @@ uint32_t __STREXH(uint16_t value, uint16_t *addr) { uint32_t result=0; - __ASM volatile ("strexh %0, %2, [%1]" : "=r" (result) : "r" (addr), "r" (value) ); + __ASM volatile ("strexh %0, %2, [%1]" : "=&r" (result) : "r" (addr), "r" (value) ); return(result); } diff --git a/src/mw.c b/src/mw.c index f8e24abc9..b82452f58 100755 --- a/src/mw.c +++ b/src/mw.c @@ -180,7 +180,7 @@ void annexCode(void) vbatRawArray[(ind++) % 8] = adcGetBattery(); for (i = 0; i < 8; i++) vbatRaw += vbatRawArray[i]; - vbat = (((vbatRaw / 8) * 3.3f) / 4095) * 110; // result is Vbatt in 0.1V steps + vbat = (((vbatRaw / 8) * 3.3f) / 4095) * 110; // result is Vbatt in 0.1V steps. 3.3V = ADC Vref, 4095 = 12bit adc, 110 = 11:1 voltage divider (10k:1k) * 10 for 0.1V } if (rcOptions[BOXBEEPERON]) { // unconditional beeper on via AUXn switch buzzerFreq = 7;