I have a global address segment assigned to P-FLASH block 2 (block 1S).
My code is running in P-FLASH block 0.
When I use the Processor Expert routine SetBlockFlash() to write an 8-byte block of data, the routine completes with no errors but the P-FLASH does not update?
I'm using a 4.9152MHz clock and I've set FCLKDIV to 4. (Using the PLL I have a bus clock of 9.8304 MHz)
I've stepped through the code and I can't see what is wrong...
I've attached the Processor Expert setup.
Thanks for any help!!
Solved! Go to Solution.
This link solved my problem.
It turns out the P-FLASH was being written... I just couldn't see it.
https://community.freescale.com/message/49575#49575
Thanks to the Forums!
Hello,
it seems, according to your screen-shot. The problem is in the Write mode selected in Write Method property. In this case the data will be written only if appropriate byte was in erased state before write (0xFF).
To avoid the problem:
- select another Wirte method (Destructive write, Safe Write) - for more details please see the hint of the Write Method property.
- erase the sector before write
In case the problem persist, please post here the whole project in order to analyze it
best regards
Vojtech Filip
Processor Expert Support Team
The Write method was purposely chosen.
I do not want to erase as I am only writing once, starting at the beginning and stopping if/when I get to the end.
I do not want to spend the time erasing, nor the resources required to do a safe write.
The bits are erased, I have them displayed in a global memory window.
Does the "Flash Clock" parameter concern you?
The hint says it should be between 150 kHz & 200 kHz... the documentation in the reference manual says it should be 1 MHz.
I don't want to upload the project to a public board. I'm busy today as the next rev of hardware came in... If I can't figure it out, I'll open a service request.
Thanks.
This link solved my problem.
It turns out the P-FLASH was being written... I just couldn't see it.
https://community.freescale.com/message/49575#49575
Thanks to the Forums!