Skip to content

Commit 2b585ad

Browse files
committed
Unlocking info A section before writing
1 parent a596f6c commit 2b585ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/panstamp/cc430info.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ uint8_t CC430INFO::write(uint8_t *buffer, uint16_t section, uint16_t position, u
7878

7979
__disable_interrupt(); // 5xx Workaround: Disable global
8080
// interrupt while erasing
81-
FCTL3 = FWKEY; // Clear Lock bit
81+
FCTL3 = FWKEY + LOCKA; // Clear Lock bit and unlock info A section
8282
FCTL1 = FWKEY+ERASE; // Set Erase bit
8383
*flashPtr = 0; // Dummy write to erase Flash seg
8484
FCTL1 = FWKEY+WRT; // Set WRT bit for byte write operation

0 commit comments

Comments
 (0)