| Author |
Message |
|
|
Posted: Jan 18, 2012 - 08:30 AM |
|

Joined: Dec 04, 2007
Posts: 2382
Location: UK London
|
|
Hi All
I am having some issue with JTAG ICE and SYS_SysInit(). I got another post related to this issue.
But I need to know more about the SYS_SysInit().
Can this function be accessed for debugging purpose? |
_________________ Thanks
Regads
DJ
|
| |
|
|
|
|
|
Posted: Jan 18, 2012 - 04:10 PM |
|


Joined: Apr 15, 2009
Posts: 4875
Location: San Jose, CA
|
|
What issues?
This function is closed source, so if you don't mind debugging using assembly code, then go ahead, otherwise it is not accessible. |
_________________ 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.
|
| |
|
|
|
|
|
Posted: Jan 18, 2012 - 04:19 PM |
|

Joined: Dec 04, 2007
Posts: 2382
Location: UK London
|
|
I got another post open which I am truing to find out why I can get my code to work when JTAG IC is not debuging in run mode. And therefore wanted to know what was inside this function as I can not go pass it.
But after various trial and errors, I have discovered the issue is with the RC calibration with 32768khz. When I place my JTAG IC in run mode it works well and once its removed is does not go pass the calibration.
This the active post.
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=116170
Have you experienced any RC calibration issue such as this? First time this has happen to me on the certain zigbee board. |
_________________ Thanks
Regads
DJ
|
| |
|
|
|
|
|
Posted: Jan 18, 2012 - 04:43 PM |
|


Joined: Apr 15, 2009
Posts: 4875
Location: San Jose, CA
|
|
| No, I have not seen this before. But the part of SYS_SysInit() you might be interested in is HAL_Init() which is open source. |
_________________ 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.
|
| |
|
|
|
|
|
Posted: Jan 18, 2012 - 04:50 PM |
|

Joined: Dec 04, 2007
Posts: 2382
Location: UK London
|
|
Thanks, I made sample RC calibration program and thats how I determined that issue is there.
Does bitcloud require a 32768Khz, Can it work without it. I do not need a accurate RTC. Just need small delays like 1 or 2 seconds, which is done via the the HAL.
If this is possible then I can calibrate Cord's via the UART instead of with 32768khz as it done now.
DJ |
_________________ Thanks
Regads
DJ
|
| |
|
|
|
|
|
Posted: Jan 18, 2012 - 04:52 PM |
|


Joined: Apr 15, 2009
Posts: 4875
Location: San Jose, CA
|
|
| Look at the HAL source code, it is all there. If you don't need this calibration then just remove it. |
_________________ 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.
|
| |
|
|
|
|
|
Posted: Jan 18, 2012 - 05:02 PM |
|

Joined: Dec 04, 2007
Posts: 2382
Location: UK London
|
|
If I am correct this calibration was just for the UART purpose on the RAVEN board?
Would I be correct in saying that will not effect other parts of the stack such as the timming elements?
My Cord is giving me some problems in calibration. If I can avoid using the 32768 it would be good, but for UART I need to calibrate the internal RC. My PCB has 2 AVR's , the other AVR is running on a 11.0592Mhz.
So would it be possible to calibrate the other Cord AVR using UART instead? This way I have less external components. |
_________________ Thanks
Regads
DJ
|
| |
|
|
|
|
|
Posted: Jan 18, 2012 - 05:38 PM |
|

Joined: Dec 04, 2007
Posts: 2382
Location: UK London
|
|
| Must I also need to compile it an certain way. I remeber somthing about a command line. |
_________________ Thanks
Regads
DJ
|
| |
|
|
|
|
|
Posted: Jan 18, 2012 - 07:49 PM |
|


Joined: Apr 15, 2009
Posts: 4875
Location: San Jose, CA
|
|
|
djoshi wrote:
If I am correct this calibration was just for the UART purpose on the RAVEN board?
Mostly yes, but it also helps to keep timer more accurate.
djoshi wrote:
Would I be correct in saying that will not effect other parts of the stack such as the timming elements?
It will, but if you don't use for accurate timekeeping then it will be fine.
djoshi wrote:
So would it be possible to calibrate the other Cord AVR using UART instead?
Calibration is a process of matching to an external more accurate source. There is nothing to calibrate to in UART. |
|
|
| |
|
|
|
|
|
Posted: Jan 18, 2012 - 07:50 PM |
|


Joined: Apr 15, 2009
Posts: 4875
Location: San Jose, CA
|
|
|
djoshi wrote:
Must I also need to compile it an certain way. I remeber somthing about a command line.
After you change the HAL you need to run "make clean all" in the HAL directory. |
|
|
| |
|
|
|
|
|
Posted: Jan 18, 2012 - 08:13 PM |
|

Joined: Dec 04, 2007
Posts: 2382
Location: UK London
|
|
Well in regards accuracy I do not mind few seconds here or there.
Quote:
Calibration is a process of matching to an external more accurate source. There is nothing to calibrate to in UART
My PCB has two AVR, one for my application and the other for Cord Zigbee.
The AVR for my appliction uses a UART friendly crystal.
So what I was hoping for was to use the application AVR to stream 10+ bytes to Bitcloud and this process is repeated atleast 255 times(worst case), till the bitcloud sees all 10 bytes as the correct bytes and responds back ask to stop. |
_________________ Thanks
Regads
DJ
|
| |
|
|
|
|
|
Posted: Jan 18, 2012 - 09:37 PM |
|


Joined: Apr 15, 2009
Posts: 4875
Location: San Jose, CA
|
|
| Well, yes, this method might work. |
_________________ 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.
|
| |
|
|
|
|
|
Posted: Jan 18, 2012 - 09:57 PM |
|

Joined: Dec 04, 2007
Posts: 2382
Location: UK London
|
|
I will give it a go. Its very simple, I can run it boot sector and save value in EEPROM.
When temperture changes how much does RC get effected? I have not noticed any issue with current method of calibration.
I dont know why I got this problem. |
_________________ Thanks
Regads
DJ
|
| |
|
|
|
|
|
Posted: Jan 18, 2012 - 10:12 PM |
|


Joined: Apr 15, 2009
Posts: 4875
Location: San Jose, CA
|
|
| I've seen cases where RC was off enough to disturb normal communication. This why in SerialNet, for example, automatic calibration is startet after few incorrect commands. |
_________________ 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.
|
| |
|
|
|
|
|
Posted: Jan 18, 2012 - 10:25 PM |
|

Joined: Dec 04, 2007
Posts: 2382
Location: UK London
|
|
Yes,I can start in boot sector and do a quick calibration using UART. And then I can do a check to see if I get an Valid ACK while in run mode. And if there is a failure then I can do re calibration along with RST of the bitcloud AVR.
Unless if I can find out why the autoclibration is failing on one of my boards. |
_________________ Thanks
Regads
DJ
|
| |
|
|
|
|
|
Posted: Jan 19, 2012 - 11:29 AM |
|

Joined: Dec 04, 2007
Posts: 2382
Location: UK London
|
|
|
|
|
|
|
Posted: Jan 19, 2012 - 04:32 PM |
|


Joined: Apr 15, 2009
Posts: 4875
Location: San Jose, CA
|
|
| If it is "legal" method then go ahead. This appnote is right, instead of sending 10+ characters it is easier to send just one. |
_________________ 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.
|
| |
|
|
|
|
|
Posted: Jan 19, 2012 - 04:37 PM |
|

Joined: Dec 04, 2007
Posts: 2382
Location: UK London
|
|
| Yes, how do I select a number for the calibration when there is range or do I just select first one. Well I need to still read it in detail. |
_________________ Thanks
Regads
DJ
|
| |
|
|
|
|
|
Posted: Jan 19, 2012 - 06:08 PM |
|


Joined: Apr 15, 2009
Posts: 4875
Location: San Jose, CA
|
|
| I would start at 128 and try one point up and one point down, as soon as I'll receive a correct character I would move towards this direction until I'll receive a bad character. Then just take middle of this range. |
_________________ 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.
|
| |
|
|
|
|
|
Posted: Jan 19, 2012 - 07:11 PM |
|

Joined: Dec 04, 2007
Posts: 2382
Location: UK London
|
|
Yeah, then once its calibrated it can send a confirmation message.
How can i confirm that the reciving byte is valid byte due to new calibration value still an error. |
_________________ Thanks
Regads
DJ
|
| |
|
|
|
|
|