ATmega256RFR2 TX0 Pin permanently failed after trying Deep Sleep mode - Page 1
Forum section: electronics / general

author: Rodmg
author_rank: Newbie
timestamp: February 19, 2015, 05:08:01 pm
content: 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.

author: FreddyVictor
author_rank: Regular Contributor
timestamp: February 19, 2015, 10:46:21 pm
content: would check Errata in datasheetthere appears to be restrictions regarding interrupts + Deep-sleep mode

author: Rodmg
author_rank: Newbie
timestamp: February 20, 2015, 12:26:48 am
content: Quote from: FreddyVictor on February 19, 2015, 10:46:21 pmThank you for your response. I checked the Errata in the datasheet and it's not related to the problem I'm having, it says that if the sleep call is over some maximum address it doesn't hear wakeup interrupts. The problem I'm having is that even now when I'm not usinginterruptsSleep anymore the TX0 pin is doing weird things even with completely different code.Further test are giving me these results: I'm configuring the pin as an output and when I toggle it High, The board consumes ~47mA (A normal board consumes about 21mA max), and when I toggle it Low it consumes ~63mA, and still the pin's voltage is 3.3V, but sometimes it is less, about 2.5 and seems to be floating.

author: amyk
author_rank: Super Contributor
timestamp: February 20, 2015, 02:52:40 pm
content: That sounds like physical damage. What happens when the pin is configured as input? Does it sink/source current?