AW: AW: [En-Nut-Discussion] Bug in EtherNut 3 with serial ports

Ernst Stippl ernst at stippl.org
Mon Mar 13 22:00:28 CET 2006


Hi Costas!

Could it have something to do with the NutThreadCreate funtion call? The
last param defines the stack size allocated for the Thread. If it is too
small, it might overwrite something. Try with a bigger stacksize and see
what's happening.

Regards
ernst 

-----Ursprüngliche Nachricht-----
Von: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] Im Auftrag von scostas
Gesendet: Montag, 13. März 2006 10:12
An: Ethernut User Chat (English)
Betreff: Re: AW: [En-Nut-Discussion] Bug in EtherNut 3 with serial ports

Ernst Stippl wrote:

Hi Ernst:

>> Have a look into the HW docs for thernut 2 and 3 board. You will see 
>> that on the serial DB9 connector, the RX/TX pins (pin 2 and 3) are 
>> reversed. Due to this, a cable working with the Ethernut 2 will not 
>> work with the Ethernut 3 and vice versa.
>  
>

No, that isn't the problem, I built a new connector and checked it. I
already tested each part independently and they work fine (send to and
receive from each serial port). I even can have both ports opened at the
same time and work first with one, then with the other, and back again. But
as soon as I try to work with both serial ports at the same time (this is, I
try to send a character to serial 1 from a thread while another thread is
waiting for a character from serial 0) the system hangs  :( 

I did a new test this morning: I created a program with two threads. The
first shows some cicling messages at the LCD screen (conected to the serial
port 1), and the other one receives one character from serial port 0 and
sends it again to the same port (a simple ECHO). Each thread works fine
alone, but as soon as I launch both, the system hangs. More precisely, when
I try to write to serial port 1 from thread 1 while thread 0 is waiting for
a character from serial port 0.

_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion




More information about the En-Nut-Discussion mailing list