[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] AT86RF211 (TRX01) - Communication Problem
From: |
Rune Christensen |
Subject: |
RE: [avr-gcc-list] AT86RF211 (TRX01) - Communication Problem |
Date: |
Fri, 29 Aug 2003 23:56:43 +0200 |
Hello
Where do you have the Start_Timer0 and Stop_Timer0 from ??
When I measure latency I use an output pin. I set it high before
and low after then you can read the time on an oscilloscope.
Best regards
Rune Christensen
-----Original Message-----
From: address@hidden
[mailto:address@hidden Behalf Of John Yannakopoulos
Sent: Friday, August 29, 2003 4:14 PM
To: AVR GCC Mailing List
Subject: [avr-gcc-list] AT86RF211 (TRX01) - Communication Problem
Hi everyone,
I'm working with the AVR-TRX01 daughter boards, which the AT90S8535
microcontroller is embedded in each. Thanks to the wireless interface
(RF211),
I can send messages from the one board to the other (in software, using
avr-gcc).
I want to measure the latency of a message from one board to the other. In
this case, at the sensor board I'm calling the 'Send_MsgTRX()' function
and at the display board the 'Read_MsgTRX()' function. I'm using the T/C0 of
the AVR for measuring this time. I'm launching the timer before
'Send_MsgTRX'
and stopping it just after the 'Send_MsgTRX' has returned the control to the
main() function and I'm counting timer overflows as well as the remainder
timer ticks. This works fine!
Now, I want to measure the RTT of a message sent from one board to the
other and back again. In my code, I'm doing it like this:
/* Sensor Board Code Snippet */
Start_Timer0 (); /* Start T/C0 */
Send_MsgTRX (128, data, TRX_DATARATE);
result = Read_Msg_TRX (128, data, TRX_NO_TIMEOUT);
Stop_Timer0 ();
/* End Sensor Board Code Snippet */
--------------------------------------------------
/* Display Board Code Snippet */
result = Read_Msg_TRX (128, data, TRX_NO_TIMEOUT);
Send_Msg_TRX (128, data, TRX_DATARATE);
/* End Display Board Code Snippet */
But this doesn't seem to work! Any idea???
Regards,
--
Ioannis Yannakopoulos.
_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list