simulavr-devel
[Top][All Lists]
Advanced

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

Re: [Simulavr-devel] SerialRX and feedback example


From: Joel Sherrill
Subject: Re: [Simulavr-devel] SerialRX and feedback example
Date: Thu, 9 Apr 2009 16:45:08 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Knut Schwichtenberg wrote:
Okay, now I see your pain.

BUT, attached I have a checkdebug.tcl and that shows what it should! So forget
the AVR-sources so the problem is in the TCL world!

OMG! I have made an incredibly stupid mistake completely unrelated
to this and now it bites me!

The C++ code is right.  The net code was right.  The calculation
of CPU Cycle time from CPU Frequency was wrong in simulavr.tcl.in.
My mistake for leaving it unchanged from a check*.tcl I worked from.
Today it's to late to proceed, tomorrow there is another day!

I will commit a fix tomorrow once I get some more run time on it.

Thanks.
Knut

Joel Sherrill schrieb:
Knut Schwichtenberg wrote:
Joel Sherrill schrieb:
Knut Schwichtenberg wrote:
Joel,

back to the roots: If I got you right your problem is that under all
circumstances your receiver get always "0". And now you are looking
for reasons.

That's the root of the problem.
Okay, I'm not sure if I get you right:
I use the CVS loaded on 27-Mar:

make dogdb
../simulavr.tcl -d atmega128 -f feedback -s ./feedback.tcl -W
0x21,/dev/stderr
-R 0x22,- -F 4000000 -T exit -S ./simfeedback.tcl -g
No connect to socket possible now... retry Connection refused
No connect to socket possible now... retry Connection refused
User Interface Connection opened by host 127.0.0.1 port 7777
Waiting on port 1212 for gdb client to connect...
Connection opened by host 0.0.0.0, port -28871.
Initialize debug io
-uart init--h-h-e-e-l-l-l-l-o-o- - -w-w-o-o-r-r-l-l-d-d-J--O--E--L--
...

What I do not understand is the duplicate of characters except if one
character
is routed to the special pin and one is the real received character.

No.  That's just debug IO using the -R/-W port.  Look at
main.c,  it is mirroring a string to both ports and
uart_putchar is actually also doing a debug print to the
-R/-W magic port.

You are seeing debug IO and thinking it is really going
out the UART.
In the "simfeedback.tcl" window I see
....
FDBK RECV: --->set rxD0 L<---
FDBK SET: rxD0 ChangeValue L
FDBK RECV: --->set serialRx0 0x0<---
FDBK SET: serialRx0 ChangeValue 0x0
SerialRx: 0x0
FDBK RECV: --->set rxD0 H<---
FDBK SET: rxD0 ChangeValue H
FDBK RECV: --->set rxD0 L<---
FDBK SET: rxD0 ChangeValue L
FDBK RECV: --->set serialRx0 0x0<---
FDBK SET: serialRx0 ChangeValue 0x0
SerialRx: 0x0
.....

Do you talk about the "SerialRx: 0x0"?
Yes.  That is the byte assembled by SerialRX and
handed off via a call to CharReceived() is always 0.
Clearly the RXD0 pin feeding into SerialRX.
Given the debug I posted earlier, I don't see how the pin
changes multiple times without Step ever seeing it.
The SerialRX PinChanged notification routine is showing transitions.
The state change bit sampling logic in Step is just always seeing 0.
Knut
Thanks.  Maybe now we are on track.
--joel


--
Joel Sherrill, Ph.D.             Director of Research & Development
address@hidden        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
  Support Available             (256) 722-9985






reply via email to

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