I have a MEGA168 that is setup with seperate boot and application sections. Boot code is setup as 8 pages (512 words, 1024 bytes). These are pages 120-127. Application code is used for the lower pages 0-119.
The RWW section is fixed from pages 0-111 with the NRWW section being fixed from pages 112-127.
Now for the problem. My bootloader code (running from the boot section) programs all pages in the RWW (application) section fine. However, it will not program any of the pages in the NRWW section. According to what I can find in the datasheets, the only limitation from programming the NRWW section while running code from the NRWW section, is that the CPU is stopped while the flash page in actually being programming after the SPM instruction. This is a limitation that I can deal with.
But why won't the 8 pages from 112-127 not program at all ? Is there another limitation of running code in the NRWW section while programming there as well ?