[En-Nut-Discussion] UART 0 + 1
Hermann Schulz
hs at ehse.de
Sun Mar 18 16:02:51 CET 2007
Hello Ethernut Group,
I have again once tried with the ICC7AVR compilers to come behind my problem
with the READ() function.
The program functions with the GCC compiler.
In the program example UART it is located that some with that Imagecraft
compiler does not function.
But which and why?
/*
* UART sample.
*
* Some functions do not work with ICCAVR.
*/
Then I wrote the Uart.c program with the Low level functions.
Also here I have a similar problem: I give via the hyperterminal an byte to
the Ethernut hardware, get I with the function UartSize() communicated that
1 Byte is in the Buffer. Afterwards I fetch the indication with the function
UartRead() and give it with the function UartWrite() equivalent again out.
If I the second times at the function UartSize() go past return to me the
function 0x0000FF81.
Although no further byte were entered.
int got,len;
u_long wert;
UsartWrite(uart, banner, strlen(banner));
for (i = 0;; i++)
{
wert = UsartSize(uart);
if(wert)
{
len = wert;
got = UsartRead(uart, inbuf, len);
got = UsartWrite(uart, inbuf, len);
}
}
In the file \\nut\arch\avr\dev\uartavr.c in the RX interrupt routine is
located the following text:
/* Late increment fixes ICCAVR bug on volatile variables. */
ifs->if_rx_idx++;
Perhaps is the nose meanwhile repaired?
We wanted to use the AT mega 256 for further projects around more program
memories To have for the applications of Web. As it goes probably only that
is described ImageCraft compiler and therefore we would have the problem
with the UART 0+1 somehow into the grasp get. I do not know also whether the
problem lies in my environment or whether it a problem with the Imgecraft
compiler is.
Also it surprises me that probably no different one this Problem has.
For a few Tipps would be very grateful I.
Many greetings
Hermann Schulz
More information about the En-Nut-Discussion
mailing list