From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ho Shui Choy Stanley PS03B NCS To: "Ecos-Discuss (E-mail)" Subject: RE: [ECOS] Serial application Date: Tue, 08 May 2001 01:43:00 -0000 Message-id: <19C34CD863B1D4118E2800508BAF663A0112F629@STONE> X-SW-Source: 2001-05/msg00078.html After I made the corrections, the application ran well in external RAM but when I transfer the codes to the flash it run for a few seconds then nothing is output but the program is still running -----Original Message----- From: Ho Shui Choy Stanley PS03B NCS [ mailto:scho@ncs.com.sg ] Sent: Tuesday, May 08, 2001 14:52 To: Ecos-Discuss (E-mail) Subject: RE: [ECOS] Serial application Solve the problem already. Somehow in /io/serial/currentsrc/common/serial.c, in serial_read function, the checking for blocking was wrong. -----Original Message----- From: Ho Shui Choy Stanley PS03B NCS [ mailto:scho@ncs.com.sg ] Sent: Tuesday, May 08, 2001 14:04 To: Ecos-Discuss (E-mail) Subject: [ECOS] Serial application I wrote a test program to test the serial port on my platform (AT91EB40). This program simply transfer data received from one port to the other. I have two threads, each will monitor one serial port. Below is the codes. Thread 1: static void simple_prog1(CYG_ADDRESS data) { cyg_uint32 buf_len; cyg_uint8 in_buffer[10]; while (1) { buf_len = 1; cyg_io_read(serial1, in_buffer, &buf_len); buf_len = 1; cyg_io_write(serial0, in_buffer, &buf_len); } } Thread 2: static void simple_prog2(CYG_ADDRESS data) { cyg_uint32 buf_len; cyg_uint8 in_buffer[10]; while (1) { buf_len = 1; cyg_io_read(serial0, in_buffer, &buf_len); buf_len = 1; cyg_io_write(serial1, in_buffer, &buf_len); } } When I start the program, it just run for a few seconds then stops. Can anyone tell me what's wrong? Thanks Stanley > ____________________________ > This email (including all attachments) contains confidential information > which may be privileged. It is intended solely for the identified > recipient(s) to whom it is addressed. If you are not an intended > recipient, please reply to us immediately and delete this message from > your system. You may not copy or use it for any purpose, or otherwise > disclose its contents to any person. >