Hi All,
Yes, it seems to be the debugger that is causing the byte value to change which then alters the CRC value!!
My requirement is to CRC check all memory that could be used for code storage - so as long as I remove the offending portion of code (I will take out the whole section FF00-FF7F) from the linker segments then I should be able to meet the requirements!
It was more confusing to me to understand why this memory section was different from any other, but now I have read the FLASH documentation it all makes sense - sanity is restored!
From a implementation point of view - why did Freescale choose to use memory locations FF00-FF0F for this function, surely it would be better to have placed down in the 00xx's next to other control registers?
Or if you wanted / needed a high address, why not place it right next to the vector table - i.e. FF7F downwards?
And, more seriously, it is very difficult to find the information that locations FF00 - FF0F are reserved, it is mentioned only in the Flash documentation (I know, I should have read ALL the data sheets...) but not at all in the overview document or anywhere else that I can find!
This is quite a big issue, as maybe there are others like me that haven't found this information, and are using the area FF00-FF7F to store Const Data or worse, Code!! Of course, as I found in my project, wierd stuff can then happen (and different stuff when runnning from BDM or standalone!)!
But, in the big scheme of things, a minor gripe - all in all I have found the HCS12 series a very flexible chip!
Thanks,
Mike