ATmega328p complete chip erase

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How to do a complete chip erase when Memory Lock Bits LB1 and LB2 are both set to 0?

Because e.g. the SPI communication is disabled.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Be_logic wrote:
Because e.g. the SPI communication is disabled.

 

If the fuses are set to disable ISP programming, then you will need to use High Voltage programming to erase your chip, see tutorial on how to unbrick your AVR in the tutorial section for how to do that.

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:
If the fuses are set to disable ISP programming, then you will need to use High Voltage programming to erase your chip,

True enough.  OP did't really say that, though. [and one cannot clear that with ISP, right, so if that is the case then OP must have another workable mechanism]   Only that the lock bits were set.  A chip erase can still be done when the lock bits are set.  What does the datasheet say about that?

 

The Lock bits can only be erased to “1” with the Chip Erase command
 

28.7.3 Chip Erase
The Chip Erase will erase the Flash and EEPROM(1) memories plus Lock bits. The Lock bits are not reset until
the program memory has been completely erased. The Fuse bits are n
 

...and so on

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I "assumed" when OP said SPI was disabled, (s)he meant ISP was disabled......   waiting for clarification from the OP.

 

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Perhaps a commercial device "locked down tight" and OP wishes to repurpose.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.