Switching code and data flash

Hi all,

I am writing an application using a 512kb program flash and a 512kb data flash. When doing the firmware update I have the luxury that it is OK to loose all data in the data flash. So what I would like to do is to store the new firmware version in the data flash and after verification swoop the two flashed so the data flash now becomes the program flash and the program flash gets reinitialized and becomes the data flash.

Does anyone have some experience doing this?

Thank you,
Dennis

Parents
  • I have done this, you should have a possibility (via external hardware) to swap /RD, /WR and /PSEN signals for FLASH and SRAM.I have used EPLD to do this, via single port line.In the FLASH upload mode, I copied bootloader part of FLASH to RAM, at the exact addresses, then switched to program execution from RAM, which now looks like ROM (/WR and /RD are no more routed to it). FLASH, on the other side, appears in the XDATA address space and you can apply standard FLASH programming algorithms. In my application, after FLASH erase, I copied bootloader again back to FLASH...

Reply
  • I have done this, you should have a possibility (via external hardware) to swap /RD, /WR and /PSEN signals for FLASH and SRAM.I have used EPLD to do this, via single port line.In the FLASH upload mode, I copied bootloader part of FLASH to RAM, at the exact addresses, then switched to program execution from RAM, which now looks like ROM (/WR and /RD are no more routed to it). FLASH, on the other side, appears in the XDATA address space and you can apply standard FLASH programming algorithms. In my application, after FLASH erase, I copied bootloader again back to FLASH...

Children
More questions in this forum