This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Adding more serial ports


Hello,

I'm trying to use all four serial ports on my NXP LPC2388 device with eCos.? After looking through the eCos reference, searching the mailing list archives, and doing a LOT of grepping, I made a number of changes to eCos.

The problem is that I can't receive data on channels 2 and 3. ?I was thinking I had screwed-up a CDL file or something, but strangely, everything WORKS when running under the Keil JTAG ULINK2 debugger.

Here are the details:
1. I pulled the eCos CVS tree about a year ago and made a few tweaks in the lpc2xxx and mcb2100 areas to get things working on the LPC2378 (and later LPC2388).? I only recently tried to use serial ports 2 and 3.
2. I can output (cyg_io_write) to all four channels, but can only get input (cyg_io_read) from channels 0 and 1.
3. I've enabled non-blocking support and tried reading both ways, but that makes no difference.
4. If I read directly from the U2RBR and U3RBR (receive buffer registers), I do get data from channels 2 and 3, so I know the HW is hooked up and configured properly.
5. Here is a summary of the files I changed under ecos\packages to support serial ports 2 and 3:
? (a) devs\serial\arm\lpc2xxx\current\cdl\ser_arm_lpc2xxx.cdl
       * Added CYGPKG_IO_SERIAL_ARM_LPC2XXX_SERIAL2 and
         CYGPKG_IO_SERIAL_ARM_LPC2XXX_SERIAL3
       
 (b) devs\serial\arm\lpc2xxx\current\include\arm_lpc2xxx_ser.inl
       * Added sections for CYGPKG_IO_SERIAL_ARM_LPC2XXX_SERIAL2 and 
         CYGPKG_IO_SERIAL_ARM_LPC2XXX_SERIAL3
       
 (c) hal\arm\lpc2xxx\var\current\include\var_io.h
       * Added definitions for CYGARC_HAL_LPC2XXX_REG_UART2_BASE and 
         CYGARC_HAL_LPC2XXX_REG_UART3_BASE
 
 (d) hal\arm\lpc2xxx\var\current\include\hal_var_ints
       * Added definitions for CYGNUM_HAL_INTERRUPT_UART2 and
         CYGNUM_HAL_INTERRUPT_UART3
 
 (e) hal\arm\lpc2xxx\var\current\src\hal_diag.c
       * Bumped lpc2xxx_ser_channels[] from two entries to four entries
         (changing UART base and interrupt names)
       * In cyg_hal_plf_serial_init(), called
         cyg_hal_plf_serial_init_channel() for channels 2 and 3
?????? * In cyg_hal_plf_serial_init(), cloned the channel 0 and 1
         CYGACC_COMM_IF_xxx_SET() macros for channels 2 and 3
 
 (f) hal\arm\lpc2xxx\mcb2100\current\cdl\hal_arm_lpc2xxx_mcb2100.cdl
       * Changed CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS from 2 to 4??? 

Does anyone have any idea why eCos doesn't "see" incoming data from serial ports 2 and 3 unless it is running under the Keil debugger?

Is it possible that I haven't made all the necessary eCos changes to support ports 2 and 3?? I figure that since I can output to those serial channels and (while running the debugger) read from them, that eCos must be aware of them all. 

Thanks in advance for any help you can provide.

Steve Gaskill
PowerFile, Inc.


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]