Yahoo Groups archive

AVR-Chat

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

Thread

Re: Re: program stack linker

Re: Re: program stack linker

2004-02-17 by Theo Maryonovich

Thanks Volkmar,

Switching off the Mega103 emulation mode solved my problem of not returning
from function calls on the Mega128.

Ted
Show quoted textHide quoted text
----- Original Message -----
From: <AVR-Chat@yahoogroups.com>
To: <AVR-Chat@yahoogroups.com>
Sent: Thursday, February 12, 2004 2:33 AM
Subject: [AVR-Chat] Digest Number 614



There are 10 messages in this issue.

Topics in this digest:

      1. Re: program stack linker
           From: "inpactmicro" <brendan.oflynn@nmrc.ie>
      2. Re: Re: Sneaky Sram Subterfuge (Somewhat long and complicated)
           From: Dave VanHorn <dvanhorn@cedar.net>
      3. Re: Re: program stack linker
           From: <volkmar.dierkes@web.de>
      4. RE: Relay Control
           From: MuRaT KaRaDeNiZ <karademu@yahoo.com>
      5. RE: Relay Control
           From: Dave VanHorn <dvanhorn@cedar.net>
      6. Re: Sneaky Sram Subterfuge (Somewhat long and complicated)
           From: Brian Dean <bsd@bdmicro.com>
      7. Re: Relay Control
           From: Brian Dean <bsd@bdmicro.com>
      8. RE: Relay Control
           From: Ricardo Callejo <surbyte@satlink.com>
      9. Re: Sneaky Sram Subterfuge (Somewhat long and complicated)
           From: "fnatmed" <fnatmed@yahoo.com>
     10. Off topic - general electronics question
           From: "Claxton, Dean J" <dean.j.claxton@team.telstra.com>


________________________________________________________________________
________________________________________________________________________

Message: 1
   Date: Wed, 11 Feb 2004 13:20:54 -0000
   From: "inpactmicro" <brendan.oflynn@nmrc.ie>
Subject: Re: program stack linker

exactly whats happening to me!
i tried using codevision AND iCC as my C compiler but the same thing
is happening
im using ICE JTAG to program

it simulates fine but emulates/runs bizarrly

if You find out whats wrong, let me know!!

some suggestions Ive been give are
is the watchdog disabled
is it running too fast (im trying 20 MHz, but at lo voltage 8 is
recommended

stack being overwritten somewhere............

--- In AVR-Chat@yahoogroups.com, "Theo Maryonovich" <ted_marytl@s...>
wrote:
> Hello to all,
>
> I am a bit new to the AVR world.  I recently purchased a STK-500
and 501 development kit with a mega128 and am using WinAVR for my C++
compiler.  Having some trouble returning from function calls (like
not returning at all).  I am assuming I need to link to the program
stack somehow to allow this to happen.  Does anybody out there have
any insight on how I might accomplish this?  Thank you for your time.
>
>
> Ted



________________________________________________________________________
________________________________________________________________________

Message: 2
   Date: Wed, 11 Feb 2004 08:22:17 -0500
   From: Dave VanHorn <dvanhorn@cedar.net>
Subject: Re: Re: Sneaky Sram Subterfuge (Somewhat long and complicated)


>
>What compiler are you using ?
>Is the application a mix of 'C' and assembler ?

0%C, 100% assembler.



________________________________________________________________________
________________________________________________________________________

Message: 3
   Date: Wed, 11 Feb 2004 18:08:02 +0100
   From: <volkmar.dierkes@web.de>
Subject: Re: Re: program stack linker


Are you using both the Mega128? Did you switch off the Mega103 emulation
mode in the fuses? If not, the compiler will locate the stack in an
area where the Mega103 has no RAM!

HTH

Volkmar

inpactmicro <brendan.oflynn@nmrc.ie> schrieb am 11.02.2004, 14:20:54:
> exactly whats happening to me!
> i tried using codevision AND iCC as my C compiler but the same thing
> is happening
> im using ICE JTAG to program
>
> it simulates fine but emulates/runs bizarrly
>
> if You find out whats wrong, let me know!!
>
> some suggestions Ive been give are
> is the watchdog disabled
> is it running too fast (im trying 20 MHz, but at lo voltage 8 is
> recommended
>
> stack being overwritten somewhere............
>
> --- In AVR-Chat@yahoogroups.com, "Theo Maryonovich"
> wrote:
> > Hello to all,
> >
> > I am a bit new to the AVR world.  I recently purchased a STK-500
> and 501 development kit with a mega128 and am using WinAVR for my C++
> compiler.  Having some trouble returning from function calls (like
> not returning at all).  I am assuming I need to link to the program
> stack somehow to allow this to happen.  Does anybody out there have
> any insight on how I might accomplish this?  Thank you for your time.
> >
> >
> > Ted


________________________________________________________________________
________________________________________________________________________

Message: 4
   Date: Wed, 11 Feb 2004 14:30:08 -0800 (PST)
   From: MuRaT KaRaDeNiZ <karademu@yahoo.com>
Subject: RE: Relay Control

are ATMEL AVR micros more vulnerable to EMI than other
micros? what do you think? Or can the EMI problems be
addressed to circuit design & environment directly? A
elektronik circuit design firm in my country was using
atmel micros beside nec,mitsubishi,pic and the manager
had some complaints about atmel. He was happy with
mitsubishi in contrast.

--- Kathy Quinlan
<kat-yahoo@kaqelectronics.dyndns.org> wrote:
>
>
> > -----Original Message-----
> > From: JoeT [mailto:joet@attg.net]
> > Sent: Wednesday, 11 February 2004 1:14 AM
> > To: AVR-Chat@yahoogroups.com
> > Subject: RE: [AVR-Chat] Relay Control
> >
> >
> > I was going to go for the PCB shielding next. It
> does not
> > have a ground plane. I used a 10k a pull up
> resistor on int0,
> > I'll try 1k. What is a "a snubber network on the
> contactor" ?
> >
> > Thanx
> > JoeT
>
> The opto isolator *should* provide the isolation
> from spikes, so the 10K
> is probably fine. I would suggest the problem is the
> EMI from the
> Contactors getting into the processor and triggering
> the Int0.
>
> A snubber network is a cap and resistor placed
> across the contacts of
> the contactor (and also the drive relay) the
> function is to quench the
> arc drawn as the contacts open, this is achieved by
> the resistor and
> capacitor providing a path for the current to flow
> as the contacts open,
> the leakage current is not high, so the device being
> driven does not
> operate.
>
> Any good electrical shop (industrial) should be able
> to sell you a
> snubber network in a signal package with two leads
> hanging out. IT will
> need to be selected to suit the load, but they may
> be able to help you.
>
> Remember young Jedi ;o) google is your friend.
>
> Regards,
>
> Kat.
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system
> (http://www.grisoft.com).
> Version: 6.0.580 / Virus Database: 367 - Release
> Date: 6/02/2004
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
>
>
> Yahoo! Groups Links
>
>
>      AVR-Chat-unsubscribe@yahoogroups.com
>
>
>


__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html


________________________________________________________________________
________________________________________________________________________

Message: 5
   Date: Wed, 11 Feb 2004 17:39:29 -0500
   From: Dave VanHorn <dvanhorn@cedar.net>
Subject: RE: Relay Control

At 02:30 PM 2/11/2004 -0800, you wrote:
>are ATMEL AVR micros more vulnerable to EMI than other
>micros? what do you think? Or can the EMI problems be
>addressed to circuit design & environment directly?

I see no reason why AVRs would be more or less susceptible than other
similar chips.
Mostly, it's a matter of proper PCB layout, managing where the currents
flow.

I use the AVR in a couple of applications now, where we are gating 3-10A
currents on timescales of 300uS to 2mS, without any emi problems.
Of course if you do the ground management wrong, you can make pretty much
anything fail.





________________________________________________________________________
________________________________________________________________________

Message: 6
   Date: Wed, 11 Feb 2004 17:51:00 -0500
   From: Brian Dean <bsd@bdmicro.com>
Subject: Re: Sneaky Sram Subterfuge (Somewhat long and complicated)

Hi Dave,

On Tue, Feb 10, 2004 at 09:36:14AM -0500, Dave VanHorn wrote:

> >Is there anywhere in the code where a multibyte pointer variable is
> >updated or used in both interrupt routines as well as non-interrupt
> >routines?
>
> Just double-checked, X is reserved for INT0, so no problem there.
> Z is used in one timer int, but it's pushed and popped. (the right way!)

Please do let us know what the culprit turns out to be if / when you
nail it!

-Brian
--
Brian Dean, bsd@bdmicro.com
BDMICRO - Maker of the MAVRIC ATmega128 Dev Board
http://www.bdmicro.com/


________________________________________________________________________
________________________________________________________________________

Message: 7
   Date: Wed, 11 Feb 2004 17:56:11 -0500
   From: Brian Dean <bsd@bdmicro.com>
Subject: Re: Relay Control

On Wed, Feb 11, 2004 at 02:30:08PM -0800, MuRaT KaRaDeNiZ wrote:

> are ATMEL AVR micros more vulnerable to EMI than other
> micros? what do you think? Or can the EMI problems be
> addressed to circuit design & environment directly? A
> elektronik circuit design firm in my country was using
> atmel micros beside nec,mitsubishi,pic and the manager
> had some complaints about atmel. He was happy with
> mitsubishi in contrast.

Atmel's AVR040 application note does a pretty good job of talking
about the issues:

  http://www.atmel.com/dyn/resources/prod_documents/doc1619.pdf

Toward the later parts of the document, they talk about AVR specific
considerations.

-Brian
--
Brian Dean, bsd@bdmicro.com
BDMICRO - Maker of the MAVRIC ATmega128 Dev Board
http://www.bdmicro.com/


________________________________________________________________________
________________________________________________________________________

Message: 8
   Date: Thu, 12 Feb 2004 00:26:22 -0300
   From: Ricardo Callejo <surbyte@satlink.com>
Subject: RE: Relay Control

Can you suggest where can i find some examples of good and wrong pcbs?
Thanks.

-----Mensaje original-----
De: Dave VanHorn [mailto:dvanhorn@cedar.net]
Enviado el: MiƩrcoles, 11 de Febrero de 2004 07:39 p.m.
Para: AVR-Chat@yahoogroups.com
Asunto: RE: [AVR-Chat] Relay Control

At 02:30 PM 2/11/2004 -0800, you wrote:
>are ATMEL AVR micros more vulnerable to EMI than other
>micros? what do you think? Or can the EMI problems be
>addressed to circuit design & environment directly?

I see no reason why AVRs would be more or less susceptible than other
similar chips.
Mostly, it's a matter of proper PCB layout, managing where the currents
flow.

I use the AVR in a couple of applications now, where we are gating 3-10A

currents on timescales of 300uS to 2mS, without any emi problems.
Of course if you do the ground management wrong, you can make pretty
much
anything fail.





  _____

Yahoo! Groups Links
*         To visit your group on the web, go to:
http://groups.yahoo.com/group/AVR-Chat/

*         To unsubscribe from this group, send an email to:
AVR-Chat-unsubscribe@yahoogroups.com
<mailto:AVR-Chat-unsubscribe@yahoogroups.com?subject=Unsubscribe>

*         Your use of Yahoo! Groups is subject to the Yahoo! Terms of
<http://docs.yahoo.com/info/terms/>  Service.

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.553 / Virus Database: 345 - Release Date: 18/12/2003


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.553 / Virus Database: 345 - Release Date: 18/12/2003



[This message contained attachments]



________________________________________________________________________
________________________________________________________________________

Message: 9
   Date: Thu, 12 Feb 2004 04:46:10 -0000
   From: "fnatmed" <fnatmed@yahoo.com>
Subject: Re: Sneaky Sram Subterfuge (Somewhat long and complicated)

--- In AVR-Chat@yahoogroups.com, Brian Dean <bsd@b...> wrote:
>
> Please do let us know what the culprit turns out to be if / when
you
> nail it!

No ifs here.  Definitely WHEN.  Ready - steady - shoot !

Dean.



________________________________________________________________________
________________________________________________________________________

Message: 10
   Date: Thu, 12 Feb 2004 16:15:21 +1100
   From: "Claxton, Dean J" <dean.j.claxton@team.telstra.com>
Subject: Off topic - general electronics question

Surface mount 8 pin device on the back of a video card - marked "1375
pncn" - any ideas what it is??

Could it be some type of voltage regulator?


________________________________________________________________________
________________________________________________________________________



------------------------------------------------------------------------
Yahoo! Groups Links




------------------------------------------------------------------------

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.