2015-01-19 12:19 PM
I've been reading through this (rather complex) datasheet for NOR flash.
http://www.micron.com/~/media/documents/products/data-sheet/nor-flash/parallel/m29w/m29w128g.pdfIt's the same flash that the STM32F439xI EVAL uses, unfortunately there are no examplesIt seems in CFI mode I can read asynchronously, which I'll be doing most of the time,but I am going to write an interface driver for Keil so I can program the external memory with data that will be accessed and copied to the internal nor flash and jumped to.My question is, are all the complicated read and write commands for the flash handled by the FMC, or do I have to do those things manually? It doesn't seem to say and I have searched the web and this forum for an example using external flash.Thanks!2015-01-19 12:27 PM
The FMC interfaces the bus.
The NOR memory has a bunch of commands and magic sequences you have to send to it to get it in the appropriate modes, and erasing and writing to the array. During the time the array is busy you will read status information, and not the content of the memory. Thus you cannot program and execute from the memory at the same time, and you cannot have interrupt code reading the memory (it will return status). So figure you're writing 0xAA, 0x55 data into memory offsets +0x2AAA +0x5555, etc How this works will depend if the memory is 8-bit wide or 16-bit wide and the address you configure it at, for example 0x64002AAA, 0x64005555 or 0x64005554, 0x6400AAAA So yes, you'll need to read the FLASH memory manual, the FSMC/FMC isn't going to do the magic voodoo.