Skip to content

Lock fuse bit programming #9

@Nurgak

Description

@Nurgak

Setting a higher security in lock fuse bits doesn't allow to set a lower security value without a complete memory wipe (which resets them automatically), so setting programming fuses before programming isn't necessary (the if (!target_progfuses()) on line 148), unless other fuses change apart from the lock fuse.

But the actual problem is the writing of the lock bits: you're sending 0xAC, 0xE0, 0x00 and then the lock fuse, but the datasheet says that when writing the lock bits the 2 most significant bits of the sent data should be 1, this is quite dangerous as it doesn't write the right lock bits.

The fix is on line 519:
Replace: Serial.print(spi_transaction(0xAC, 0xE0, 0x00, f), HEX);
With: Serial.print(spi_transaction(0xAC, 0xE0, 0x00, 0xFF & f), HEX);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions