Hi Glen,
Please read section 27.4.5 and 27.4.6 first. Reading from program flash memory space while a flash command is active is not allowed. When the flash is programming, MCU can't get next code from Flash. This will cause hardfault.
There is flash demo in KL16 SDK (SDK_2.2.0_MKL16Z64xxx4.zip\boards\frdmkl26z\driver_examples\flash\pflash). You can see that is code is execute in flash too. This is because before it trig flash erase/program command, it will copy a small piece of code to ram. This code will write CCIF register to launch the command and wait till command finish.
So, please refer to the pflash example and use this code directly. Flash can't program in VLPR mode. And please disable all interrupt before erase/program flash. This is because if interrupt happened during flash operation, MCU will read flash for interrupt vector address and service code. This will cause hardfault.
Regards,
Jing