[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Setting pin to high in function instead of main, inst
From: |
Johannes Bauer |
Subject: |
Re: [avr-gcc-list] Setting pin to high in function instead of main, instructions in main never run? |
Date: |
Thu, 01 Mar 2012 15:24:02 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 |
On 01.03.2012 14:38, Richard Zetterberg wrote:
> Cory: No, setting PB0 to 1 in DDRB two times in main doesn't change
> anything. Doing "DDRB = 0xFF;" doesn't change anything. However, if I
> put that line of code inside the "turn_on_pb" function it works as
> expected.
Why don't you include the whole program assembly (i.e. after linking),
but only compile units? This would also show the startup code, where a
fault in setting up the stack pointer would be visible (i.e. would cause
the "call" to fail and therefore resetting the MCU instead of the
behavior you desire).
Best regards,
Joe
- [avr-gcc-list] Setting pin to high in function instead of main, instructions in main never run?, Richard Zetterberg, 2012/03/01
- Re: [avr-gcc-list] Setting pin to high in function instead of main, instructions in main never run?, Peter Fuhrmann, 2012/03/01
- Re: [avr-gcc-list] Setting pin to high in function instead of main, instructions in main never run?, Richard Zetterberg, 2012/03/01
- Re: [avr-gcc-list] Setting pin to high in function instead of main, instructions in main never run?,
Johannes Bauer <=
- Re: [avr-gcc-list] Setting pin to high in function instead of main, instructions in main never run?, Richard Zetterberg, 2012/03/01
- Re: [avr-gcc-list] Setting pin to high in function instead of main, instructions in main never run?, Richard Zetterberg, 2012/03/01
- Re: [avr-gcc-list] Setting pin to high in function instead of main, instructions in main never run?, David Kelly, 2012/03/01
- Re: [avr-gcc-list] Setting pin to high in function instead of main, instructions in main never run?, Johannes Bauer, 2012/03/01
- Re: [avr-gcc-list] Setting pin to high in function instead of main, instructions in main never run?, David Kelly, 2012/03/01
- Re: [avr-gcc-list] Setting pin to high in function instead of main, instructions in main never run?, Johannes Bauer, 2012/03/01
- Re: [avr-gcc-list] Setting pin to high in function instead of main, instructions in main never run?, Johannes Bauer, 2012/03/01
Re: [avr-gcc-list] Setting pin to high in function instead of main, instructions in main never run?, Georg-Johann Lay, 2012/03/01
Re: [avr-gcc-list] Setting pin to high in function instead of main, instructions in main never run?, Bernard Fouché, 2012/03/05