[En-Nut-Discussion] Possible BUG in ARM usart driver or crt routines
Coleman Brumley
cbrumley at gopolar.com
Tue Sep 1 17:36:19 CEST 2009
I've not noticed this specific bug, but when I tried UART_SETTXBUFSIZE and
UART_SETRXBUFSIZE, I didn't get the expected results.
At the time, I just abandoned it because I didn't have the time to
investigate it.
- Coleman
> -----Original Message-----
> From: en-nut-discussion-bounces at egnite.de [mailto:en-nut-discussion-
> bounces at egnite.de] On Behalf Of Ole Reinhardt
> Sent: Tuesday, September 01, 2009 11:26 AM
> To: Ethernut User Chat (English)
> Subject: [En-Nut-Discussion] Possible BUG in ARM usart driver or crt
> routines
>
> Hi all,
>
> I just discovered a strange bug, which I suppose to live anywhere in
> the
> usart code. Eventually it's arm specific, perhaps also in the main
> usart
> device driver code.
>
> I'm using NutOS 4.6.0 with some extra bugfixes on an ethernut3 board.
>
> In my special case I set the TX buffer size to a specific value. Let's
> say 8. When I then try to send out a larger data buffer with fwrite I
> recognise that packages of always 8 Bytes (same size as the usart tx
> buffer size) are repeated...
>
> Example:
>
> I'll send the following buffer:
>
> "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
>
> What is send out:
>
> "abcdefgabcdefg..."
>
> So the first 8 bytes are repeated twice, next followed by some more or
> less randomly new startpoint in the buffer.
>
> My code looks like this:
>
> [...]
> _ioctl(_fileno(uart0), UART_SETTXBUFSIZ, &txbuf_port0);
> [...]
>
> int pos = 0;
> u_char buffer[100] =
> "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789äöüÄÖÜß?
> !
> \"§$%&/()={[]}\\,.-_<>|#'~+*'....";
>
> do {
> pos += fwrite(&buffer[pos], 1, 100 - pos, uart0);
> } while (pos < 100);
>
> Has anybode noticed this behaviour too? Or have I missed any more
> recent
> bugfixes?
>
> Regards,
>
> Ole Reinhardt
>
>
> --
> _____________________________________________________________
> | |
> | Embedded-IT |
> | |
> | Ole Reinhardt Tel. / Fax: +49 (0)271 7420433 |
> | Luisenstraße 29 Mobil: +49 (0)177 7420433 |
> | 57076 Siegen eMail: ole.reinhardt at embedded-it.de |
> | Germany Web: http://www.embedded-it.de |
> |_____________________________________________________________|
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
More information about the En-Nut-Discussion
mailing list