Hello,
I have a really strange problem that I've been trying to fix for some time now. I have created development boards based on ATmega256rfr2 and they have been working great, however now that I'm trying the Sleep modes I'm having the following problem:
This is my configuration:
The board is loaded with a stk500v2-based serial bootloader that uses UART0 as it's interface, with pins TX0 and RX0 exposed and connected to a FT230XS-based USB-Serial board. This way I can program the board with avrdude and the Arduino IDE perfectly.
Now that I tried to put the micro in deep sleep mode following the example code on the datasheet, then I can no longer program it via the bootloader, avrdude says that there is no response.
I tried loading the program with an AVR ISPmkII (now bypassing the bootloader) and it runs without problems, Then I tried sending and receiving serial data via UART0; The board receives the data correctly, however It doesn't send anything.
Then, I tried configuring the pin as digital output and toggling it High and Low, but it doesn't toggle, indeed it stays at ~2.5v (!), when it should be 3.3v logic. (all other pins work correctly, tested voltages and are all ok).
Also, current consumption of the board is now more than doubled as normal (it should be at most 21mA, and now reaches 45mA and sometimes even 60mA).
I thought that the micro was faulty, but then replicated the same problem in a new board.
I've also checked the Fuses and are all correct, even erasing the chip completely changes nothing.
The only thing that comes to mind is that the pin driver could have been physically damaged, however it doesn't make sense that only entering sleep mode could have caused it unless there is a major bug in the chip, and I cant find any info on that.