Flash write

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flash write

600 Views
wangzhongyuan
Contributor I

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.

Tags (2)
0 Kudos
1 Reply

407 Views
danielmartynek
NXP TechSupport
NXP TechSupport

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

0 Kudos