I wanna write some data in P-Flash with MC9S12ZVCA192. When I debug the program with step by step, the data can write P-Flash. But When I run the program in debug, it was paused in the FSTAT_CCIF = 1. When I check FSTAT register, I find it data was 00001000b.
Hi,
By writing FSTAT_CCIF = 1, you launch the flash command.
Please make sure you don’t launch the command from the same flash block.
You may refer to S12Z Flash example code
In the example, you can place the code either into RAM or execute the code in an array of instruction in machine code.
Regards,
Daniel