AnsweredAssumed Answered

ADSP-21469: how to read M29W320EB flash?

Question asked by misterdsp on Aug 14, 2013
Latest reply on Sep 22, 2013 by misterdsp

I am able to upload data and program a M29W320EB flash using the method detailed in EE345. In VisualDSP++ I can use the flash programmer tool to Save the flash out to a file, and it is the same data that was uploaded. However, I am having trouble reading the flash data in the dsp application code. The general approach is like this, to read data starting at flash offset 0x00300000:

 

#define DSP_FLASH_START_ADDRESS 0x04300000  // base address 0x04000000 + offset 0x00300000

volatile unsigned short *pFlashAddr;

unsigned short flashdata;

...

  *pEPCTL = (((*pEPCTL) & (~B1SD)) | EPBRCORE);

  *pAMICTL1 = ( PKDIS | WS31 | HC1 | HC2 | RHC1 | RHC2 | IC7 | AMIEN | AMIFLSH);

  pFlashAddr = (volatile unsigned short *)(DSP_FLASH_START_ADDRESS);

  flashdata = ((unsigned short)*pFlashAddr)&0xFF;

...

 

 

The data that gets read out is not the same as was Save'd to file at address 0x00300000. I have read out of flash a small block of contiguous bytes and searched the Save'd file, no match. What am I missing here? I did try immediately writing 0xF0 to the flash after a reset, sending the flash RESET command, made no difference.

Outcomes