I have a few questions on data flash: 1. Is the "XMEMORY" dialogue box that comes up in Codewarrior when you select "Data | View Memory" showing what's in Data Flash from 0x2000 (for the 807)? I've got an 807EVM and Codearrior, btw. 2. Can anyone see why the following simple routine might not be programming the data flash? I've followed the instructions in section 5.10.1 of the manual to no avail. (Missgin out step 3 as I'm not bothered about interrupts at the moment.) char ProgramFlash(int FlashData,int FlashAddress) { if ((DFIU_CNTL & 0x3F) == 0) // Ensure flash is idle { DFIU_PE |= 0x4000; // Set IPE bit DFIU_ADDR = (FlashAddress + DATA_FLASH_BASE); // Write the flash address to be written to DFIU_DATA = FlashData; // then the word to be written while ((DFIU_CNTL & 0x8000) == 1); // Wait until the busy flag is cleared return 1; } else { return 0; } } 3. Finally, does anyone have an algorithm for reading data flash? There doesn't seem to be anything in the manual about it. Cheers, Rob. |
|
Data flash
RE: [motoroladsp] Data flash
See embedded comments! Also need to clear the IPE bit when done. Jerry. > -----Original Message-----
Yes, assuming you are in internal address mode (EX=0). >
DFIU_CNTL also has
the busy bit in it,
>
{
DFIU_PE needs the
Row Number in it in addition to IPE enable.
>
DFIU_ADDR = (FlashAddress +
DATA_FLASH_BASE);
DFIU_ADDR is a read
only register!!!
> address to be written to
DFIU_DATA is a read only register!!! > while ((DFIU_CNTL & 0x8000) == 1); // Wait The above will
never be equal to 1!!!
> until the busy flag is
just read the
data: value = *FlashAddress;
________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information visit http://www.messagelabs.com ________________________________________________________________________ |