| Author |
Message |
|
|
Posted: Feb 17, 2012 - 07:49 PM |
|

Joined: Jan 08, 2010
Posts: 40
Location: France
|
|
Hello,
Sometime my projet works and sometime not. After a low search, I'm facing with a strange behavior, and I don't know how it can happen.
Look at my screenshop, after two simple instructions :
Code:
mov r0, lo(0x78)
orh r0, hi(0x78)
My register r0 value is 0x00010078 and not 0x00000078. It doesn't happen all times, but when it happen, my program crash due to a overflow later.
How it can be possible ?
Thanks for your help,
Pascal |
|
|
| |
|
|
|
|
|
Posted: Feb 17, 2012 - 09:39 PM |
|

Joined: Nov 17, 2004
Posts: 13956
Location: Vancouver, BC
|
|
| Wrong forum. This is an AVR32 question, not an AVR Studio 5 question. |
_________________ Regards,
Steve A.
The Board helps those that help themselves.
|
| |
|
|
|
|
|
Posted: Feb 17, 2012 - 09:58 PM |
|

Joined: Jan 08, 2010
Posts: 40
Location: France
|
|
Thanks for your advice, I have created a post on AVR32 Hardware forum,
Kind regards,
Pascal |
|
|
| |
|
|
|
|
|
Posted: Feb 18, 2012 - 12:10 AM |
|


Joined: Mar 28, 2001
Posts: 20627
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
Moved here. Perhaps I should have deleted it as there is the same thread here now.  |
_________________ John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
|
| |
|
|
|
|
|
Posted: Feb 18, 2012 - 09:53 AM |
|

Joined: Jan 08, 2010
Posts: 40
Location: France
|
|
Yes, you can delete this one,
Thanks, |
|
|
| |
|
|
|
|
|
Posted: Feb 18, 2012 - 03:10 PM |
|

Joined: Dec 28, 2011
Posts: 16
Location: Germany
|
|
Hi Pascal,
with Atmel AVR Studio 5 (Version: 5.1.148) the debugger works fine:
Code:
mov r0,lo(0x78)
orh r0,hi(0x78)
R0 0x00000078
or just
Code:
mov r1,0x78
R1 0x00000078 |
|
|
| |
|
|
|
|
|
Posted: Feb 18, 2012 - 03:40 PM |
|

Joined: Jan 08, 2010
Posts: 40
Location: France
|
|
|
Focouzee wrote:
Hi Pascal,
with Atmel AVR Studio 5 (Version: 5.1.148) the debugger works fine:
Code:
mov r0,lo(0x78)
orh r0,hi(0x78)
R0 0x00000078
or just
Code:
mov r1,0x78
R1 0x00000078
Thanks for your reply,
Now I fixed my issue by configuring wait state to access flash, which is mandatory when we use more than 33 Mhz. I forgot to select it before, and my MCU was unstable. Now all works fine,
Little demo on my blog: http://pdelprat.wordpress.com
Thanks again,
Pascal |
|
|
| |
|
|
|
|
|
Posted: Feb 18, 2012 - 09:20 PM |
|


Joined: Mar 28, 2001
Posts: 20627
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
|
|
|
|
|