Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Debugging a ATmega48V - what's going on?

2007-11-12 by Richard Cooke

Hi Leon,

I've thought of the "bad chip" as the problem but it occurs on two
different boards.  I had spent too much time on the new board I
decided to build up another one and test it.  Problem didn't go away
with the new board so the issue shouldn't be a bad chip and since the
firmware works on Ver1 it shouldn't be the firmware.  I just don't
know what else to try.

Thanks,

Richard Cooke

--- In AVR-Chat@yahoogroups.com, "Leon" <leon355@...> wrote:
>
> ----- Original Message ----- 
> From: "Richard Cooke" <rcooke@...>
> To: <AVR-Chat@yahoogroups.com>
> Sent: Monday, November 12, 2007 7:14 PM
> Subject: [AVR-Chat] Debugging a ATmega48V - what's going on?
> 
> 
> > Hi Folks,
> >
> > I've run into a problem that has me pulling out my hair.  I'm using
> > the AVR Dragon and the latest version of AVR Studio to debug my
> > boards.  I have two versions let's all them Ver1 and Ver2.  The only
> > difference being the RF matching network.  Ver1 works fine.  If I use
> > the exact same firmware that works in Ver1 in Ver2 it will hang at a
> > spot that makes no sense.
> >
> > After working for quite a while, I discovered the offending code as
> > "PORTB.0 = 1;".  All I am doing is setting the PORTB.0 pin high but as
> > I single step through the code it will hang right here. So, the code
> > snippet looks like:
> >
> > PORTD.7 = 1;  <-- this works
> > PORTB.0 = 1;  <-- hangs here
> >
> > If I reverse the two lines to this:
> >
> > PORTB.0 = 1;  <-- now this works
> > PORTD.7 = 1;  <-- debugger hangs here
> 
> A faulty flash memory location that loads and verifies OK, but
doesn't work 
> when the program runs?
> 
> Leon
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.