ATtiny fuses
See original GitHub issueSetting the fuses for the ATtiny85 (for example) seems to be a issue that emerges every now and then. I’ve been struggling with this and read the documentation and some issues here in Github but it just looks broken.
When I use pio run -t upload
and the board is attiny85
the fuses set are: E:FF, H:D7, L:E2
and it does not matter what I change in the boards
directory in the attiny85.json
file. It will always use the same fuses.
But when I run the command pio run -t fuses
the fuses are set. Sort of.
avrdude errors with avrdude: verification error; content mismatch
because while it sets the new fuses it looks like it also sets the old fuses and when it verifies the new fuses it gets confused (no pun intended).
In the background avrdude asks:
Would you like this fuse to be changed back? [y/n]
But this question is invisible to the user, only visible using verbose output. When I choose n
the right fuses are set and verified! So this seems to be a small bug, you maybe need to force the changes here to avoid the question asked by avrdude.
Now I have the right fuses but when I upload my code the fuses are overwritten by the defaults! So I still cannot use it.
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (9 by maintainers)
Top GitHub Comments
@stonehippo yes thank you
@Thijxx @ivankravets one more thing: the
fuses
target needs to get the-u
flag inmain.py
to disable the safemode warning if you really want to disable SPIEN (and I’d do that after programming, so switch the -t order above).