Open stefanrueger opened 1 year ago
Apparently, "modern" AVRs (ie, the AVR8X family but not XMEGAs) treat some of their fuses as configuration values that are copied into a live register after power-on reset. This makes it more "practical" to treat a bit value 0 as false/disable whilst the tradition used to be that fuse bits with a value of 0 are treated as programmed/enable.
Fun fact: The EESAVE fuse bit has the latter meaning in "classic"/XMEGAs, whilst it has the semantically opposite meaning for modern AVRs. And to make it more fun for programmers/users the semantics of the reset pin configuration (acting as GPIO or acting as external reset) has remained the same between classic and modern parts, but the decision was taken to rename this AVR fuse bit from RSTDISBL
to RSTPINCFG
.
Summarising, sometimes Microchip keep the name of the fuse bit but invert the semantics of its value, and sometimes Microchip keep the semantics of the bit value but change the name. Go figure!
Normally fuse bits are defined like
For the list of parts below gcc v12 defines a lot of them without bit inversion
~
One example is here: https://github.com/avrdudes/avr-libc/blob/55e8cac69935657bcd3e4d938750960c757844c3/include/avr/iotn1616.h#L5613-L5672