Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0036777

Browse files
author
RFduino
committed
Added radioActive check to flashPageErase
1 parent e99f5fd commit 0036777

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
CHANGELOG
22

3+
v 2.3.3
4+
- Enable C++11 support (thanks focalintent)
5+
- Fix Print::printf("%f") with correct digits (thanks ShenggaoZhu)
6+
- Added radioActive check to flashPageErase
7+
38
v 2.3.2
49
- Fixes required to support Arduino 1.6.6
510
- Updated to the latest RFDLoaders

cores/arduino/Memory.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ int flashPageErase( uint8_t page )
4848
if (page <= PAGE_FROM_ADDRESS(&_etextrelocate))
4949
return 2;
5050

51+
// do not erase flash if the BLE radio is active
52+
while (RFduinoBLE_radioActive)
53+
;
54+
5155
// enable flash page erase
5256
NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Een << NVMC_CONFIG_WEN_Pos);
5357
while (NRF_NVMC->READY == NVMC_READY_READY_Busy)
@@ -79,7 +83,7 @@ int flashWrite( uint32_t *address, uint32_t value )
7983
if (page <= PAGE_FROM_ADDRESS(&_etextrelocate))
8084
return 2;
8185

82-
// do not write to flash in the BLE radio is active
86+
// do not write to flash if the BLE radio is active
8387
while (RFduinoBLE_radioActive)
8488
;
8589

0 commit comments

Comments
 (0)