[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] AT86RF211 (TRX01) - Communication Problem

From: John Yannakopoulos
Subject: RE: [avr-gcc-list] AT86RF211 (TRX01) - Communication Problem
Date: Sat, 30 Aug 2003 22:22:00 +0300 (EET DST)

Hi Rune and everyone,

The Start_Timer0 and Stop_Timer0 are routines of my own. I measure
the latency in software using avr-libc/(avr-)gcc/uisp and C code in a
Linux environment (AVR's In-System Programming capabilities). Thus, the
routines are written in C. I have made an interrupt service routine for
the TIMER_OVERFLOW0 interrupt and when this is executed, a variable which
holds the current timer's overflows is incremented by one. I also use another
variable which holds the timer's0 ticks after the last overflow. I dump the
values of the two variables to the LCD of the board. Furthermore, the latency
is calculated as: (overflows * 256) + remainder (in CPU cycles).

But my problem is focused on somewhere else. I want to measure the RTT
with the same method (in the sender board), but when my code for each
AVR-TRX01 board contains the sequence Send_MsgTRX - Read_MsgTRX and the
opposite at the receiver board, the communication is not taking place,
the things are getting stucked.
Have you any idea what's going on there? Cannot a board send and after a
while receive some data? Or one of the two boards MUST be a sender and
the other one a receiver (willy-nilly)?


Ioannis Yannakopoulos.

On Fri, 29 Aug 2003, Rune Christensen wrote:

> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]