If I understood the AVR instruction manual correctly, the ATtiny 25 can disable the BODlevel2 fuse by software, but when compiling with Studio 7 (version 7.0.132), I get the error "Undefined symbol: BODS & BODSE".
- BODLEVEL fuses are set correctly. L:0x62 H:0xDD E:0xFF
; init brown out detection disable for sleep mode
ldi r23, (1<<BODS)|(1<<BODSE) ; En 2 fois 1- pour autoriser ecriture
out MCUCR, r23 ; Envoyer autorisation ecriture
ldi r23, (1<<BODS)|(0<<BODSE) ; Ecrire valeur a envoyer dans R23
out MCUCR, r23 ; Envoyer R23 dans MCUCR
; init WDT for interrupt mode
ldi r23, (1<<WDCE)|(1<<WDE)
out WDTCR, r23
ldi r23, (1<<WDIE)|(0<<WDE)|(0<<WDP0)|(1<<WDP1)|(0<<WDP2)|(0<<WDP3) ; sec time out WDT interrupt; no system reset
out WDTCR, r23
sei ; global interrupt enable bit is active
L1_INTERIEUR: ; init sleep modes
ldi r23, (1<<SM1) ; Power-down mode
out MCUCR, r23
in r23, MCUCR
ldi r23, (1<<SE) ; sleep mode enabled
out MCUCR, r23 ; put MCU into sleep
L1A_INTERIEUR:
in R15,SREG
wdr
sleep
cat iotn25.h | grep BODS
in where the toolchain is stalled give me this#define BODS 7
, and#define BODSE 2
.