We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
i'm using the MCB167 NET Evaluation board which uses M29F040B flash-chip as external memmory. i've written the following device driver for program a word on the flash chip. the data has been written onto RAM instead of the flash.i feel the problem may be with the device driver. what i've to do if i want to write the data onto the flash chip. it will be very helpful if you address this problem. Flash_Write PROC NEAR EXTS R9, #01H MOV [R8], R10 RET Flash_Write ENDP Note: CS0# is checked. WRL# and WRH# are enabled. SALSEL CSCFG and etc. are configured. but still...
Hi I have read you flash programming problem. Do you know now how to program external flash memory? I need to write and read data from flash, Timing seems to be ok, cs works as it should...but I cannot write to flash! Do you have a running example program? Thanks Erwin
The code fragment you've posted makes little sense to me. Sign extend 1 into R9, then move R10 to whereever R8 points, and that's it? This flash device is programmed with what I think of as the "AMD style" of commands. You have to present a particular sequence of inputs to the flash as a program command. You do not simply store data to an address, as you do with RAM. It takes three writes to set up the program command, followed by the actual address and data you want to program. Note that you must erase a flash sector before programming a word in that sector. Programming flash can really only set bits to 0. Erasing a sector sets all the bits to 1, so that later programming commands can set some of the bits to 0. You can only program a word once after you erase the sector (unless you're doing something clever and you know you just need to zero some extra bits). Make sure that the operations on your processor bus actually match the device bus width. That is, if you have a 16-bit wide device, then you do not want to write a value as two successive 8-bit writes. I notice after a quick check of Google that ST gives you an app note with heavily commented source code for driver routines. (What more could you ask for?) http://us.st.com/stonline/books/pdf/docs/6887.pdf