Flash problem Mighty 1284p

I have an 1284p on a pcb with ISP connector and use Nick's ATMega Board programmer with adjusted fuse settings (8 mhz internal clock).

Upon connecting I see

Atmega chip programmer.
Written by Nick Gammon.
Version 1.28
Compiled on Jun  5 2015 at 00:38:35
Attempting to enter programming mode ...
Entered programming mode OK.
Signature = 0x1E 0x97 0x05 
Processor = ATmega1284P
Flash memory size = 131072 bytes.
LFuse = 0xE2 
HFuse = 0xDE 
EFuse = 0xFD 
Lock byte = 0xFF 
Clock calibration = 0x91 
Bootloader address = 0x1FC00
Bootloader length = 508 bytes.
Type 'Q' to quit, 'V' to verify, or 'G' to program the chip with the bootloader ...
Erasing chip ...
Writing bootloader ...
Committing page starting at 0x1FC00
Committing page starting at 0x1FD00
Written.

But then the verify starts and I get

Verifying ...
Verification error at address 1FC00. Got: 0x00  Expected: 0x0F 
Verification error at address 1FC01. Got: 0x00  Expected: 0x92 
Verification error at address 1FC02. Got: 0x01  Expected: 0xCD 
Verification error at address 1FC03. Got: 0x01  Expected: 0xB7 
Verification error at address 1FC04. Got: 0x02  Expected: 0xDE 
Verification error at address 1FC05. Got: 0x02  Expected: 0xB7 
Verification error at address 1FC06. Got: 0x03  Expected: 0x11 
Verification error at address 1FC07. Got: 0x03  Expected: 0x24 
Verification error at address 1FC08. Got: 0x04  Expected: 0x84 
Verification error at address 1FC09. Got: 0x04  Expected: 0xB7 
Verification error at address 1FC0A. Got: 0x05  Expected: 0x14 
Verification error at address 1FC0B. Got: 0x05  Expected: 0xBE 
Verification error at address 1FC0C. Got: 0x06  Expected: 0x81 
Verification error at address 1FC0D. Got: 0x06  Expected: 0xFF 
Verification error at address 1FC0E. Got: 0x07  Expected: 0xF1 
Verification error at address 1FC0F. Got: 0x07  Expected: 0xD0 
Verification error at address 1FC10. Got: 0x08  Expected: 0x85 
Verification error at address 1FC11. Got: 0x08  Expected: 0xE0

Note the increasing read bytes

If I try to burn a sketch using 'Arduino as ISP' and use verbose mode I see it's writing and reading, but also a verify error with the same pattern.

What am I doing wrong ?!?!?

This is a new iteration of my pcb, and on the previous pcb (same schematic) everything was working fine. I have made 2 more pcb's (with only the power lines, mcu and capacitors) to rule out a faulty 1284p but these exhibit the exact same problem.

I tried connecting an AVR dragon using ISP to see the fuses in atmel studio, but the device programmer cannot connect to the mcu (strange as Nick's sketch has no problems)

I seemed to have fixed the problem by using the following fuses

C2 DF FF FF

instead of

E2 DE FF FF

So different startup time, and disabled BOD (running on 3.7V lipo directly) and disabled the reset vector.

I'll try to narrow it down to one of the fuses

New fuses have fixed burning the bootloader, both the programming and the verify are now ok.

But burning a sketch still returns

avrdude: verification error, first mismatch at byte 0x0000
         0x00 != 0x0c
avrdude: verification error; content mismatch

It may happen if the bootloader version for MCU clock is incorrect.

burning the bootloader seemed to work, but it's on and off.

sometimes it works, sometimes it doesn't.

I'll check all my wiring again.

The bootloader version is not 'relevant'. I'm using the board programmer to set the fuses, but as I'm uploading using ISP/Arduino as ISP programmer I'm overwriting the bootloader anyway (in any case not using it)

Problem has been solved for now. I have a 328p in the circuit as well (eventually for OTAU).

After disabling the BOD on the 328p (which did not exhibit board programmer/avr dragon/sketch burning problems itself) the problems on the 1284p are gone as well....

Both are connected on the same SPI bus, and I connect to them using Arduino as ISP with a switchable connection to the reset lines. D10 of the 328p is connected to the the reset line of the 1284p so this might account for the problems (maybe just burning a sketch on the 328p which sets D10 to output would also fix the problem).

I will also hookup some equipment to detect a voltage drop and find a potential design problem (328p has 3x 100nF on Vcc/AVcc, 1284p-au has 4x 100nF on each Vcc/AVcc)