This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can I writeon the flash from where I execute code with C167CR?

Dear!!
I'm executing my code from the second page of the 29F040 flash memory (0x10000) and I want to write some data on the third page (0x20000) or other page(for example the page number zero). I'm using MVAR and XVAR functions but it doesn't work.
Can I write in a flash memory that uses /CS0 line?
If I set a page of the flash as ram,the compilers does not give me errors but it doesn't work on board.
Is posible update flash pages executing code from the same flash memory???
Thanks!!

Parents
  • Wtiting to the 29Fxx series requires a separate write function which will erase the sector if necessary then write the data to it. The actual data writing is done using a series of commands which give the address, mode and data. Then the flash status must be monitored until the actual cells are written by the flash chip. You cannot run the program in the flash at the same time you are programming it. Look at the AMD website for flash programming data sheets and app notes and Keil App #138 for help in creating a run-time relocatable programming module. This is not a trivial task.
    Best
    Scott

Reply
  • Wtiting to the 29Fxx series requires a separate write function which will erase the sector if necessary then write the data to it. The actual data writing is done using a series of commands which give the address, mode and data. Then the flash status must be monitored until the actual cells are written by the flash chip. You cannot run the program in the flash at the same time you are programming it. Look at the AMD website for flash programming data sheets and app notes and Keil App #138 for help in creating a run-time relocatable programming module. This is not a trivial task.
    Best
    Scott

Children
No data