Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
pdelprat
PostPosted: Feb 17, 2012 - 07:49 PM
Rookie


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
 
 View user's profile Send private message  
Reply with quote Back to top
Koshchi
PostPosted: Feb 17, 2012 - 09:39 PM
10k+ Postman


Joined: Nov 17, 2004
Posts: 15000
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.
 
 View user's profile Send private message  
Reply with quote Back to top
pdelprat
PostPosted: Feb 17, 2012 - 09:58 PM
Rookie


Joined: Jan 08, 2010
Posts: 40
Location: France

Thanks for your advice, I have created a post on AVR32 Hardware forum,
Kind regards,
Pascal
 
 View user's profile Send private message  
Reply with quote Back to top
js
PostPosted: Feb 18, 2012 - 12:10 AM
10k+ Postman


Joined: Mar 28, 2001
Posts: 22576
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. Embarassed

_________________
John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
pdelprat
PostPosted: Feb 18, 2012 - 09:53 AM
Rookie


Joined: Jan 08, 2010
Posts: 40
Location: France

Yes, you can delete this one,
Thanks,
 
 View user's profile Send private message  
Reply with quote Back to top
Focouzee
PostPosted: Feb 18, 2012 - 03:10 PM
Newbie


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
 
 View user's profile Send private message  
Reply with quote Back to top
pdelprat
PostPosted: Feb 18, 2012 - 03:40 PM
Rookie


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
 
 View user's profile Send private message  
Reply with quote Back to top
js
PostPosted: Feb 18, 2012 - 09:20 PM
10k+ Postman


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

Quote:
you can delete this one,
I can no longer do that as it is out of my "sheriff jurisdiction" Smile

but some moderator with access rights should lock and\or merge one of the 2 threads

http://www.avrfreaks.net/index.php?name ... p;t=117441

_________________
John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits