MEMMAP Manipulation
2004-12-20 by Leighton Rowe
Yahoo Groups archive
Index last updated: 2026-04-28 23:31 UTC
Thread
2004-12-20 by Leighton Rowe
Let's say MEMMAP's initially configured as 1 (flash mode), and I plan todo a complete firmware update using IAPs. If I remapped the interrupt vectors to RAM (MEMMAP = 2) before overwriting segment 0, will the original vectors remain preserved in RAM?
2004-12-20 by Karl Olsen
--- In lpc2000@yahoogroups.com, "Leighton Rowe" <leightonsrowe@y...> wrote: > Let's say MEMMAP's initially configured as 1 (flash mode), and I > plan todo a complete firmware update using IAPs. If I remapped the > interrupt vectors to RAM (MEMMAP = 2) before overwriting segment 0, > will the original vectors remain preserved in RAM? Before changing MEMMAP from 1 to 2, you should write whatever you want as interrupt vectors to RAM (0x4000_0000 - 0x4000_003F). Changing MEMMAP doesn't by itself copy anything from flash to RAM. Relocating the interrupt vectors to RAM is only necessary if you need to handle interrupts during the flash writing. In that case, you should also copy the interrupt handlers themselves to RAM. It might be easier to just disable all interrupts and use polled I/O. When updating the whole flash, you of course have to copy the firmware updating code to RAM as well. Karl Olsen
2004-12-20 by Leighton Rowe
> Before changing MEMMAP from 1 to 2, you should write whatever you > want as interrupt vectors to RAM (0x4000_0000 - 0x4000_003F). > Changing MEMMAP doesn't by itself copy anything from flash to RAM. Makes much more sense now. I'm able to get the RAM Mode working. Thanks. > Relocating the interrupt vectors to RAM is only necessary if you need > to handle interrupts during the flash writing. In that case, you > should also copy the interrupt handlers themselves to RAM. It might > be easier to just disable all interrupts and use polled I/O. When > updating the whole flash, you of course have to copy the firmware > updating code to RAM as well. I'd rather go with updating segments (not containing the original program code) with the new program (int handlers included). That way flash functions won't have to be copied and executed in RAM. I hope this suggestion isn't too hard to pull off. Leighton