Rene Heppell

9S12XS/XE Reading FAR Memory - Addressing issue in DataFlash

Discussion created by Rene Heppell on Jan 16, 2009
Latest reply on Jan 21, 2009 by Rene Heppell
Hi, I've written a dataflash "driver" which writes data into the DF, it also needs to read the dataflash and compare with the original data to be written in order to complete.

So the dataflash is being written, thats working fine, but I cannot get my read and verify code to work, I think it is an error in the way I am writing my code below, Could someone Help?

/* Verify Write Operation */
df_ptr = (UINT8 @far *)(0x100000u | dfInfo.saved.dfAddress);

while ((*df_ptr == *dfInfo.saved.ramAddress) && (dfInfo.saved.totalCount > 0u))
if (dfInfo.saved.totalCount > 0u) { ..error.. }