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
alexru
PostPosted: Jan 19, 2012 - 07:34 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4982
Location: San Jose, CA

What do you mean?

_________________
The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I'm affiliated with.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
djoshi
PostPosted: Jan 19, 2012 - 07:37 PM
Raving lunatic


Joined: Dec 04, 2007
Posts: 2382
Location: UK London

Say a valid byte is 0x55.

I recive one.

How can I confirm that I have got 0x55 due to calibration tuning and not an error.

So what I am trying to ask is can there be a possibilty that when AVR is not calibrated it could recivie a 0x55 just once.

_________________
Thanks

Regads

DJ
 
 View user's profile Send private message  
Reply with quote Back to top
djoshi
PostPosted: Jan 19, 2012 - 09:21 PM
Raving lunatic


Joined: Dec 04, 2007
Posts: 2382
Location: UK London

Where can I find the current calibratin function, as I can see a assembler file but I can see where its called.

Is there a doc or guide, showing how I compile the hal as i belive this can not be done using avr studio.

_________________
Thanks

Regads

DJ
 
 View user's profile Send private message  
Reply with quote Back to top
alexru
PostPosted: Jan 19, 2012 - 09:36 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4982
Location: San Jose, CA

djoshi wrote:
How can I confirm that I have got 0x55 due to calibration tuning and not an error.
Implement some kind of confirmation protocol.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
alexru
PostPosted: Jan 19, 2012 - 09:38 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4982
Location: San Jose, CA

djoshi wrote:
Where can I find the current calibratin function, as I can see a assembler file but I can see where its called.

halCalibrateInternalRc() in Components\HAL\avr\atmega1281\common\src\calibration.c

djoshi wrote:
Is there a doc or guide, showing how I compile the hal as i belive this can not be done using avr studio.
There is no document for this. You need to run "make clean all" from the command line in HAL directory.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
djoshi
PostPosted: Jan 20, 2012 - 11:30 AM
Raving lunatic


Joined: Dec 04, 2007
Posts: 2382
Location: UK London

When you say HAL directory. I guess you mean the top most level inside the HAL folder.

I guess I must also disable the ASYNC clock as well. Can this be done via a flag or do I need to comment out lines,

_________________
Thanks

Regads

DJ
 
 View user's profile Send private message  
Reply with quote Back to top
alexru
PostPosted: Jan 20, 2012 - 09:00 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4982
Location: San Jose, CA

djoshi wrote:
When you say HAL directory. I guess you mean the top most level inside the HAL folder.
Yep.

djoshi wrote:
I guess I must also disable the ASYNC clock as well. Can this be done via a flag or do I need to comment out lines,
I think code comments will be necessary. Also keep in mind that async. timer is used during sleep, so your device won't be able to sleep.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
djoshi
PostPosted: Jan 20, 2012 - 11:02 PM
Raving lunatic


Joined: Dec 04, 2007
Posts: 2382
Location: UK London

This problem is only on the cord board. Worst case, I will disable it only for the cord. MY Router and End are working well with the a 32Khz.

Is it possible to compile the HAL so that calibration function and async enable function can be executed outside SYS_SysInit() and then called from the bitcloud project enviroment.

This way I can have two extra function, so that I do not need to keep re compiling when I jump from cord to end.

_________________
Thanks

Regads

DJ
 
 View user's profile Send private message  
Reply with quote Back to top
alexru
PostPosted: Jan 20, 2012 - 11:05 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4982
Location: San Jose, CA

For initialization from HAL_Init() call function defined in the application and define this function differently for different devices.

_________________
The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I'm affiliated with.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
djoshi
PostPosted: Jan 20, 2012 - 11:15 PM
Raving lunatic


Joined: Dec 04, 2007
Posts: 2382
Location: UK London

But how is this function called from the Bitcloud project file? I am only calling SYS_SysInit()

_________________
Thanks

Regads

DJ
 
 View user's profile Send private message  
Reply with quote Back to top
alexru
PostPosted: Jan 20, 2012 - 11:16 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4982
Location: San Jose, CA

SYS_Init() calls HAL_Init().

_________________
The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I'm affiliated with.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
djoshi
PostPosted: Jan 20, 2012 - 11:21 PM
Raving lunatic


Joined: Dec 04, 2007
Posts: 2382
Location: UK London

Silly Question.

Say I have a flag in my application area called calib_flag, so if I place the extern before this in the HAL file, will it be accessble.

_________________
Thanks

Regads

DJ
 
 View user's profile Send private message  
Reply with quote Back to top
djoshi
PostPosted: Jan 27, 2012 - 09:03 PM
Raving lunatic


Joined: Dec 04, 2007
Posts: 2382
Location: UK London

Where Can I find the place in the HAL that let me select the define to set timer2 as a syn or async?

DJ

_________________
Thanks

Regads

DJ
 
 View user's profile Send private message  
Reply with quote Back to top
alexru
PostPosted: Jan 27, 2012 - 09:06 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4982
Location: San Jose, CA

Timer2 is used for sleep modes, it is not configurable.

_________________
The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I'm affiliated with.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
djoshi
PostPosted: Jan 27, 2012 - 09:18 PM
Raving lunatic


Joined: Dec 04, 2007
Posts: 2382
Location: UK London

What about in the Cord device. I would like it to be in Sync. At the moment its Async as its depending on the 32Khz.

_________________
Thanks

Regads

DJ
 
 View user's profile Send private message  
Reply with quote Back to top
alexru
PostPosted: Jan 27, 2012 - 09:20 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4982
Location: San Jose, CA

Then you'll have to change the HAL code to support whatever you need.

_________________
The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I'm affiliated with.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
djoshi
PostPosted: Jan 27, 2012 - 09:22 PM
Raving lunatic


Joined: Dec 04, 2007
Posts: 2382
Location: UK London

OK, I thought there might be some defines to make it a sync.

_________________
Thanks

Regads

DJ
 
 View user's profile Send private message  
Reply with quote Back to top
djoshi
PostPosted: Jan 31, 2012 - 03:26 PM
Raving lunatic


Joined: Dec 04, 2007
Posts: 2382
Location: UK London

What problems could happen if the timer2 is sync. Can there be an timing issues. I can also use 8Mhz for more accuracy,

_________________
Thanks

Regads

DJ
 
 View user's profile Send private message  
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