SNIU028D February 2016 – September 2020 UCD3138 , UCD3138064 , UCD3138064A , UCD3138128 , UCD3138A , UCD3138A64
All operations which modify flash must be started by writing a value to the FLASHILOCK register.
DecRegs.FLASHILOCK.all = 0x42dc157e;
This is done to prevent flash corruption from unexpected events.
Note that with multiple flash blocks, there are different keys for each additional flash block: 0x42DC157E for data and program flash 0, 0x6C97D0C5 for program flash 1, 0x184219B3 for program flash 2, and 0x5973EF21 for program flash 3.