I followed this guide to http://maniacbug.wordpress.com/2011/11/27/arduino-on-atmega1284p-4/
set up a 1284P with arduino IDE using maniacbug-mighty 1284P bootloader. It flashed ok.
The problem is that I uploaded blink sketch without changing ledpin, I left pin 13 which is XTAL1 and since then I can't program nor reflash bootloader anymore.
I use an arduino UNO as ISCP programmer.
I've tried many different things such as programming via FTDI, using AVR programmer, changing Fuses from AtmelStudio (when I do this it says write ok but verifying wrong, and fuse doesn't change, but I can read them)...
The fuses set right now, and that I can't change are:
I'm using a 16 MHz oscillator, I've checked with a oscilloscope if it's running well and I can see pin 12 have a 16 MHz wave signal but pin 13 hasn't.
I'd appreciate very much any kind of advice to make it work.