Can a 328P Be Recovered If The SPI Fuse Is Set To DISABLE?

I was trying to reduce the current consumption as much as possible, and in the process disabled the SPI bus fuse. It wasn't until I went through all of my Arduino Nano boards that I finally figured out that I was killing them.

Can they be recovered or restored or whatever?

Thanks!

Details:
Board: The Chinese version of the Nano-some with old boot loaders, and some with new
Programmer: USBTiny
Apps Involved:
Arduino IDE--Note: The CH340 chips on all of the boards have now been removed because I started using the USBTiny
AVRDUDE
AVRDUDESS

I don't know the answer by experience but I would guess programming by ISP would be your best bet. Have you tried this and not have it work?

If SPI is disabled you can only program via the high-voltage parallel programming mode (see chapter 31 in the data sheet). Basically you won't be able to do this without removing the chip from the board and building a special programmer. So, just consider the Nano boards ruined.

The debugWIRE or Paralllel Programming features may allow to load the traditional (Serial) boot loader. Repairing fuse bits sounds impossible to me.

Edit: Parallel/HV Programming is right, remaining assumptions wrong :frowning:

You’re not supposed to be able to disable ISP programming while using ISP programming…

I agree! It should be trivial for AVRDUDE to recognize that the fuse programmer (me) is about to step off a cliff. Serves me right for not reading the data sheet as thoroughly as I should have. I guessed that I would have to HV program the chips to recover them--I was just hoping that I was wrong. Thanks for taking the time to reply.

almytom: That was my conclusion...

@CrossRoads This seems to be in your territory.

I believe you can reprogram Without having to remove the chip.
The High Voltage programming just applies 12V to the Reset line, everything else uses regular voltage levels.
Nick Gammon has a page on it here, the circuit needed is a simple transistor switch to allow control of a 12V pulse.

The Arduino Nano has an external pull-up (probably 10K ohm in chinese clone) from RESET to VCC on the board, which can be a problem.


The 12V reset pulse is short and 10K ohm resistor limits the current to about 1mA, so it may be feasible to ignore.

However, I agree to @westfw's opinion.

But!
Keep in mind that RSTDISBL and DWEN fuses are accessible with ISP and it change ISP to unusable.
The OP may have programmed this.

Hmm, later boards have a diode from Reset to 5V also to prevent spikes on the Reset line from fooling the chip into starting HV Programming mode, and then looking hung.
But - a Nano does not! So, as chrisknightley points out, the 1K pullup resistor would allow (Nano V3 anyway) could allow damaging current into the 5V line and fry other things. And that 1K is part of a resistor pack, so you would have cut a trace to remove RP1D from the Reset Line to let 12V be applied without damaging other bits of the board.
An external 1K or 10Kk could then be added to the Nano to allow normal Reset operations for ICSP re-bootloading or serial downloads.

What makes you think that a 6mA current into Vcc could damage anything?

It'd be the voltage that does the damage.

Which voltage? Where?

There is a resistor between 12V and Vcc, not a short.

12V for High Voltage Parallel Programming.

One resistor provides a current limit, but not a voltage divider.
The voltage across the resistor, depends on the impedance of the connected load to unpowered side.

But it is not allowed to apply 12V to VCC in the first place.
It is regardless of the amount of current.

image

IMO; It's mistake to make this connection to decide that it's okay.
image

If we treat the 5V line as being at 0 when 12V is first applied (discharged cap capacitance) then current of 12V/1000 = 12mA can flow. As the capacitance charges up, current will drop, and if the equivalent load becomes another 1K, then Vcc wil become 6V and current will drop to 6mA.
A Nano has the 328P, FT232, Power LED, and the Rx/Tx LEDs driven by the FT232. What equivalent load would those all represent?
Say only 500 ohm. Then current of 12V/(1000 + 500) = 8mA would flow, 8V across the 1K and 4V across the rest.
Say the load was higher - 2000 ohm.
12V(1000+2000) = 4mA, 4V across the 1Kand 8V across the rest.
The 328P and FT232 are active loads tho, I don't know what their equivalent static load would be, or if 8V into Vcc while the 328P is attempting to boot up would damage it.

Considering the current consumption when powering up at 5V, I think that the input impedance when considering it as an active-load of 328P is higher than 500 ohm.
But well, the 328P is reasonably robust, and as I mentioned at the beginning, the 12V reset pulse takes only a short time, so it may not break.

But I don't want to do much. :expressionless:

The connection exists in the left circuit, no need to add anything. image

What is the "left side?" :roll_eyes:

Each RESET NET label means connected in cirucuit.
It just didn't draw as a line but it connect.

In this schematic, applying 12V to RESET will result in the same state I posted in the post above.

image

Naturally, 5V is connected to the VCC of the microcontroller.
image

That's against 28.7.1 Enter Programming Mode rules. Start here if you suspect damage to the chip. After reading the entire section I suspect more problems from other connections to pins used to program the chip on a board, e.g. XTAL.1.

It never was a good idea to apply high programming voltage to a chip before operating voltage.