I've done bootloaders for SAM3 and 4S and SAM4E with single bank flash, and am attempting to do one for a SAM4C32.
Although I can program pages of flash in the same bank, I cannot get programming from bank 1 to bank 2 to work. I think the first thing I'd like to ascertain whether I am interpreting the pages from one bank to the next correctly.
Bank 1 I believe has 16 sectors and within each sector 128 pages. Therefore bank 1 has 2048 pages, 0-2047. Bank 2 I think starts at 2048. However, if I attempt to erase and program pages 2048 and above, this doesn't seem to work. I am using exactly the same code to write within the same banks as I am in writing from bank 1 to 2. ie A load of setup commands are in flash, but the actual writing of commands for erase, program etc are run from RAM.
I am making the assumption also that in Atmel Studio if you program something into bank 2 and you select 0x1100000 in the memory window, I should be looking at bank 2.
I have questions about the safe and secure bootloader and how it describes two bank bootloaders, but I think it's best to ask that once this first issue is solved.