AnsweredAssumed Answered

Data Flash Read/Write on 56F8323

Question asked by Justin McCurdy on Apr 19, 2006
Latest reply on Aug 23, 2006 by Holger Sachs
I am using processor expert to generate the base code for my project.  I am attempting to write a data table to data flash from my code that is running in Program Flash.  I have made calls using PE specified addresses within the Data Flash such as:

#define DATA_FLASH_START 4096

From what it looks like, when calling the following two fxns, you need to multiply the address by 2 before calling:

byte DataFlash_SetByteFlash(dword Addr,byte Data);

byte DataFlash_GetByteFlash(dword Addr,byte *Data);

When calling any other set or get fxn for words or long words, you just pass the actual address that you wish to write.

 

My problem is that no matter what I try at what address, the read and write functions never return an Error Ok value, there is always some sort of an error that is returned.  I have turned off all interrupts in the system so that I can step through this code without CodeWarrior crashing or the peripheral clocks queueing interrupts.  If someone has some basic code that performs basic read/write fxns that they know work, could you please reply and attach them.

 

Thanks,

Justin

Outcomes