--- In lpc2000@yahoogroups.com, "catstransport" <remco@u...> wrote: > --- In lpc2000@yahoogroups.com, David Willmore <willmore@o...> wrote: > > > catstransport <remco@u...> wrote:Hi all, > > > I am a newby in writing to external memory. The RAM works. I can write > > > to it. But the flash is a problem. We have combined two 16bit flash to > > > the lpc2292. I have found flash drivers for the 16bit. But I have to > > > write with 32bit. I just don't know how to get it work. > > > > > > the memory is: 2 x m29w320DB on bcfg0. bcfg0 = 0x2000348f. After I > > > write 0x00AA0AA to flashBase[0x05550555] the whole microcontroller > > > doesn't do anything anymore. Can somebody help me with this problem. > > > > You need 0x00AA to appear on the 16 bit data bus for each FLASH, right? > > You also need their address likes to read 0x0555? Yeah, checked the > > data sheet from ST, that's right. > > > > Okay, so you you want is flashBase[0x00000555] = 0x00aa00aa > > > > Keep in mind that your address lines are in parallel to the chips, so > > you don't need to replicate the pattern in the address bits. The data > > bits are concatinated, so you do need to replicate that data. > > > > So, you could: > > flashBase[command_addr]= (command_data | (command_data << 16)); > > > > for all of the commands and then: > > flashBase[data_addr] = data_32; > > > > for the actual data write. > > > > Does that make sense? It's always a bit hard to wrap your head > > around the first time, but it's second nature after that. :) > > > > Cheers, > > David > I Have tried it but still I see only a empty flash when I read the address. I have download the st flashdrivers for 16 bit. And I have changed it with the above changes and it still will not write. I gonna look with a scope to see if the data lines toggling. cheers remco
Message
Re: EMC flash memory programming
2005-08-08 by catstransport
Attachments
- No local attachments were found for this message.