public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] Problem with serial setup
@ 2003-04-27 15:31 Daniel Lidsten
  2003-05-01  2:03 ` Jonathan Larmour
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Lidsten @ 2003-04-27 15:31 UTC (permalink / raw)
  To: Gary D. Thomas; +Cc: eCos Discussion

> Yes, I have done this successfully on the PowerPC (QUICC) 
> hardware that you are using.  Be sure and get up-to-date 
> sources, as I fixed a bug in the HAL/QUICC serial serial 
> drivers about a month ago.

When you use the two serial drivers together, how have you setup all
options in the configTool?

Regards, Daniel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ECOS] Problem with serial setup
  2003-04-27 15:31 [ECOS] Problem with serial setup Daniel Lidsten
@ 2003-05-01  2:03 ` Jonathan Larmour
  0 siblings, 0 replies; 8+ messages in thread
From: Jonathan Larmour @ 2003-05-01  2:03 UTC (permalink / raw)
  To: Daniel Lidsten; +Cc: Gary D. Thomas, eCos Discussion

Daniel Lidsten wrote:
>>Yes, I have done this successfully on the PowerPC (QUICC) 
>>hardware that you are using.  Be sure and get up-to-date 
>>sources, as I fixed a bug in the HAL/QUICC serial serial 
>>drivers about a month ago.
> 
> 
> When you use the two serial drivers together, how have you setup all
> options in the configTool?

I think trying to do both is a recipe for confusion. You say you set:
HAL/diag serial device driver: /dev/ser1
but assuming you are referring to  CYGDAT_IO_SERIAL_TTY_CONSOLE, this is 
just the name of the device that the io/serial layer _exports_ as a tty 
device based on top of haldiag. It doesn't actually change anything about 
where haldiag goes *to*.

Instead this option should be left as /dev/ttydiag, otherwise you will get 
two entries in the device table that claim to be /dev/ser1 which would be bad.

But even then haldiag isn't really intended to be used with the 
interrupt-driven serial drivers. You can maybe let it share the same 
device but with haldiag still using its own driver in the HAL - that might 
not be too bad, although obviously output may overlap. You'll also 
probably get bogus tx complete interrupts, although hopefully whatever 
serial driver you are using should ignore those.

If you really want to use the interrupt-driven driver for diagnostic 
output, you could try editting infra/current/src/diag.cxx, specifically 
diag_write_char, to do this. Although some care is needed - you will have 
to eliminate anything that tries to do any diag output before the serial 
driver is initialized and interrupts enabled, otherwise it may jam waiting 
for an interrupt that never happens, or if the driver isn't initialized 
yet, it may do who knows what depending on what your hardware requires to 
be set up (you could of course cheat by just testing in your serial driver 
if the device has been initialized and interrupts enabled).

Jifl
-- 
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [ECOS] Problem with serial setup
  2003-05-13 13:21 Daniel Lidsten
@ 2003-05-13 13:27 ` Gary D. Thomas
  0 siblings, 0 replies; 8+ messages in thread
From: Gary D. Thomas @ 2003-05-13 13:27 UTC (permalink / raw)
  To: Daniel Lidsten; +Cc: eCos Discussion

On Tue, 2003-05-13 at 07:20, Daniel Lidsten wrote:
> > > 
> > > > > I am trying to use the same serial port for both printf and
> > > > > diag_printf but there seem to be some problem. Is there 
> > > > someone that
> > > > > use the same port for both an interrupt driven serial 
> > driver and a
> > > > > diag version at the same time?
> > > > > 
> > > > 
> > > > Yes, I have done this successfully on the PowerPC (QUICC)
> > > > hardware that you are using.  Be sure and get up-to-date 
> > > > sources, as I fixed a bug in the HAL/QUICC serial serial 
> > > > drivers about a month ago.
> > > 
> > > I now have two serial channels (diag and printf) working on 
> > the same 
> > > HW port but when i want to change the diag to use SMC2 
> > instead of SMC1 
> > > then i hang in the quicc_smc1.c putc function because a BD flag 
> > > indicates
> > > busy:
> > > 
> > > while (bd->ctrl & QUICC_BD_CTL_Ready)
> > > 
> > > The only change i have done in ConfigTool is to change the 
> > "Diagnostic 
> > > Serial Port" from 0 to 1. Is there any other location that 
> > i need to 
> > > change to make this work?
> > > 
> > 
> > Do you have RedBoot running on this platform?  If so, does it 
> > use the second port (SMC2) properly?
> 
> No, i dont have RedBoot on the platform.
> 

I'd start with a simple test.  Build a RAM version of RedBoot for
your platform.  This should come up and try to use both serial ports
(initially both will be used).  This process will test if the drivers
for SMC2 are working properly on your platform.

Question: are you working from recent CVS?  I've made many changes
in this area in the past few months.  In particular, the port setup
for the various serial ports has been extended quite a lot.  Sadly,
I don't have a device which uses SMC2 to test this on.

-- 
Gary D. Thomas <gary.thomas@mind.be>


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [ECOS] Problem with serial setup
@ 2003-05-13 13:21 Daniel Lidsten
  2003-05-13 13:27 ` Gary D. Thomas
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Lidsten @ 2003-05-13 13:21 UTC (permalink / raw)
  To: Gary D. Thomas; +Cc: eCos Discussion

> > 
> > > > I am trying to use the same serial port for both printf and
> > > > diag_printf but there seem to be some problem. Is there 
> > > someone that
> > > > use the same port for both an interrupt driven serial 
> driver and a
> > > > diag version at the same time?
> > > > 
> > > 
> > > Yes, I have done this successfully on the PowerPC (QUICC)
> > > hardware that you are using.  Be sure and get up-to-date 
> > > sources, as I fixed a bug in the HAL/QUICC serial serial 
> > > drivers about a month ago.
> > 
> > I now have two serial channels (diag and printf) working on 
> the same 
> > HW port but when i want to change the diag to use SMC2 
> instead of SMC1 
> > then i hang in the quicc_smc1.c putc function because a BD flag 
> > indicates
> > busy:
> > 
> > while (bd->ctrl & QUICC_BD_CTL_Ready)
> > 
> > The only change i have done in ConfigTool is to change the 
> "Diagnostic 
> > Serial Port" from 0 to 1. Is there any other location that 
> i need to 
> > change to make this work?
> > 
> 
> Do you have RedBoot running on this platform?  If so, does it 
> use the second port (SMC2) properly?

No, i dont have RedBoot on the platform.

Regards, Daniel Lidsten


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [ECOS] Problem with serial setup
  2003-05-13  9:30 Daniel Lidsten
@ 2003-05-13 13:09 ` Gary D. Thomas
  0 siblings, 0 replies; 8+ messages in thread
From: Gary D. Thomas @ 2003-05-13 13:09 UTC (permalink / raw)
  To: Daniel Lidsten; +Cc: eCos Discussion

On Tue, 2003-05-13 at 03:30, Daniel Lidsten wrote:
> Hi,
> 
> > > I am trying to use the same serial port for both printf and 
> > > diag_printf but there seem to be some problem. Is there 
> > someone that 
> > > use the same port for both an interrupt driven serial driver and a 
> > > diag version at the same time?
> > > 
> > 
> > Yes, I have done this successfully on the PowerPC (QUICC) 
> > hardware that you are using.  Be sure and get up-to-date 
> > sources, as I fixed a bug in the HAL/QUICC serial serial 
> > drivers about a month ago.
> 
> I now have two serial channels (diag and printf) working on the same HW
> port but when i want to change the diag to use SMC2 instead of SMC1 then
> i hang in the quicc_smc1.c putc function because a BD flag indicates
> busy:
> 
> while (bd->ctrl & QUICC_BD_CTL_Ready)
> 
> The only change i have done in ConfigTool is to change the "Diagnostic
> Serial Port" from 0 to 1. Is there any other location that i need to
> change to make this work?
> 

Do you have RedBoot running on this platform?  If so, does it use
the second port (SMC2) properly?

-- 
Gary D. Thomas <gary.thomas@mind.be>


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [ECOS] Problem with serial setup
@ 2003-05-13  9:30 Daniel Lidsten
  2003-05-13 13:09 ` Gary D. Thomas
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Lidsten @ 2003-05-13  9:30 UTC (permalink / raw)
  To: Gary D. Thomas; +Cc: eCos Discussion

Hi,

> > I am trying to use the same serial port for both printf and 
> > diag_printf but there seem to be some problem. Is there 
> someone that 
> > use the same port for both an interrupt driven serial driver and a 
> > diag version at the same time?
> > 
> 
> Yes, I have done this successfully on the PowerPC (QUICC) 
> hardware that you are using.  Be sure and get up-to-date 
> sources, as I fixed a bug in the HAL/QUICC serial serial 
> drivers about a month ago.

I now have two serial channels (diag and printf) working on the same HW
port but when i want to change the diag to use SMC2 instead of SMC1 then
i hang in the quicc_smc1.c putc function because a BD flag indicates
busy:

while (bd->ctrl & QUICC_BD_CTL_Ready)

The only change i have done in ConfigTool is to change the "Diagnostic
Serial Port" from 0 to 1. Is there any other location that i need to
change to make this work?

Regards, Daniel
 

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ECOS] Problem with serial setup
  2003-04-27 12:40 Daniel Lidsten
@ 2003-04-27 14:39 ` Gary D. Thomas
  0 siblings, 0 replies; 8+ messages in thread
From: Gary D. Thomas @ 2003-04-27 14:39 UTC (permalink / raw)
  To: Daniel Lidsten; +Cc: eCos Discussion

On Sun, 2003-04-27 at 06:14, Daniel Lidsten wrote:
> Hi,
> 
> I am trying to use the same serial port for both printf and diag_printf
> but there seem to be some problem. Is there someone that use the same
> port for both an interrupt driven serial driver and a diag version at
> the same time?
> 

Yes, I have done this successfully on the PowerPC (QUICC) hardware
that you are using.  Be sure and get up-to-date sources, as I fixed
a bug in the HAL/QUICC serial serial drivers about a month ago.

> I have setup my config file like this:
> 
> Section->Serial Device Drivers/TTY-mode serial device drivers:
> HAL/diag serial device driver: /dev/ser1
> TTY mode channel #0: /dev/ser1
> TTY mode channel #1: /dev/ser2
> 
> Section->Serial Device Drivers/Hardware serial device drivers
> Here i have enabled two serial driver with the names /dev/ser1 and
> /dev/ser2
> 
> However, when i run this then i get the following printout:
> 
> Init device '/dev/tty0'
> Init tty channel: 89428
> Init device '/dev/tty1'
> Init tty channel: 89448
> Init device '/dev/haldiag'
> HAL/diag SERIAL init
> Init device '/dev/ser1'
> QUICC_SMC SERIAL init - dev: 90.54 el:0el:0el:0el:0el:0el:0eQUICC_SMC
> SERIAL ini
> t - dev: d0.55
> Set output buffer - buf: 8ab20 len: 256
> Set input buffer - buf: 8ac20 len: 256
> 
> [cyg_hal_interrupt_set_level] Vector:55
> [cyg_hal_interrupt_set_level]
> Level:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:
> 0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:
> 0el:0el:
> 0el:0el:0el:0el:0el:
> 
> After i have setup the two interrupt driven serial ports then the diag
> channel doesnt work anymore.
> 
> My question is: Is it possible to setup diag to use an interrupt driver
> serial port (so that diag_ and printf use the same driver)OR shall i use
> two drivers on the same serial port?
> 
> Regards, Daniel Lidsten
> 
> -- 
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss

-- 
.--------------------------------------------------------.
|       Mind: Embedded Linux and eCos Development        |
|--------------------------------------------------------|
| Gary Thomas              email:  gary.thomas@mind.be   |
| Mind ( http://mind.be )  tel:    +1 (970) 229-1963     |
| gpg: http://www.chez-thomas.org/gary/gpg_key.asc       |
'--------------------------------------------------------'


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ECOS] Problem with serial setup
@ 2003-04-27 12:40 Daniel Lidsten
  2003-04-27 14:39 ` Gary D. Thomas
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Lidsten @ 2003-04-27 12:40 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I am trying to use the same serial port for both printf and diag_printf
but there seem to be some problem. Is there someone that use the same
port for both an interrupt driven serial driver and a diag version at
the same time?

I have setup my config file like this:

Section->Serial Device Drivers/TTY-mode serial device drivers:
HAL/diag serial device driver: /dev/ser1
TTY mode channel #0: /dev/ser1
TTY mode channel #1: /dev/ser2

Section->Serial Device Drivers/Hardware serial device drivers
Here i have enabled two serial driver with the names /dev/ser1 and
/dev/ser2

However, when i run this then i get the following printout:

Init device '/dev/tty0'
Init tty channel: 89428
Init device '/dev/tty1'
Init tty channel: 89448
Init device '/dev/haldiag'
HAL/diag SERIAL init
Init device '/dev/ser1'
QUICC_SMC SERIAL init - dev: 90.54 el:0el:0el:0el:0el:0el:0eQUICC_SMC
SERIAL ini
t - dev: d0.55
Set output buffer - buf: 8ab20 len: 256
Set input buffer - buf: 8ac20 len: 256

[cyg_hal_interrupt_set_level] Vector:55
[cyg_hal_interrupt_set_level]
Level:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:
0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:0el:
0el:0el:
0el:0el:0el:0el:0el:

After i have setup the two interrupt driven serial ports then the diag
channel doesnt work anymore.

My question is: Is it possible to setup diag to use an interrupt driver
serial port (so that diag_ and printf use the same driver)OR shall i use
two drivers on the same serial port?

Regards, Daniel Lidsten

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-05-13 13:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-27 15:31 [ECOS] Problem with serial setup Daniel Lidsten
2003-05-01  2:03 ` Jonathan Larmour
  -- strict thread matches above, loose matches on Subject: below --
2003-05-13 13:21 Daniel Lidsten
2003-05-13 13:27 ` Gary D. Thomas
2003-05-13  9:30 Daniel Lidsten
2003-05-13 13:09 ` Gary D. Thomas
2003-04-27 12:40 Daniel Lidsten
2003-04-27 14:39 ` Gary D. Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).