linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* jumbled characters on serial port
@ 2003-06-27 15:31 Omanakuttan
       [not found] ` <3EFC66FE.4050301@xopworks.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Omanakuttan @ 2003-06-27 15:31 UTC (permalink / raw)
  To: linuxppc-embedded


Hi,
We have developed MCC drivers for mpc8260. For debugging the driver we
have put several printk in the code. Since the data is not ascii all the
time, sometimes the screen gets fully jumbled characters. I understand
that printing some binary data causes this.
We are using minicom and busybox .60.5. If anybody knows how to get the
characters back, please advise.
We tried closing down the minicom window and restarting minicom. This
does not help. More over we are getting jumbled chars, not secondary
font. (if I were running bash, i would have run `reset`. But I never
faced this in i386)

Thanks and regards,
om.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* RE: jumbled characters on serial port
@ 2003-06-27 15:47 Jean-Denis Boyer
  0 siblings, 0 replies; 4+ messages in thread
From: Jean-Denis Boyer @ 2003-06-27 15:47 UTC (permalink / raw)
  To: Omanakuttan; +Cc: linuxppc-embedded


I would suggest you write yourself a kind of "safe_printk" (over printk) that filters characters that can not be displayed, and then use that function in your code. It is, IMHO, easier to fix the problem there than losing the tty and/or the terminal emulator. You can even hack directly the printk function (kernel/printk.c:412) and add a filter just after the call to vsnprintf.

Regards,
--------------------------------------------
 Jean-Denis Boyer, Software Designer
 M5T Centre d'Excellence en Télécom Inc.
 4283 Garlock Street
 Sherbrooke (Québec)
 J1L 2C8  CANADA
 (819)829-3972 x241
--------------------------------------------


> -----Original Message-----
> From: Omanakuttan [mailto:omanakuttan@tataelxsi.co.in]
> Sent: 27 juin, 2003 11:31
> To: linuxppc-embedded@lists.linuxppc.org
> Subject: jumbled characters on serial port
>
>
>
> Hi,
> We have developed MCC drivers for mpc8260. For debugging the driver we
> have put several printk in the code. Since the data is not
> ascii all the
> time, sometimes the screen gets fully jumbled characters. I understand
> that printing some binary data causes this.
> We are using minicom and busybox .60.5. If anybody knows how
> to get the
> characters back, please advise.
> We tried closing down the minicom window and restarting minicom. This
> does not help. More over we are getting jumbled chars, not secondary
> font. (if I were running bash, i would have run `reset`. But I never
> faced this in i386)

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: jumbled characters on serial port
       [not found] ` <3EFC66FE.4050301@xopworks.com>
@ 2003-06-27 16:10   ` Omanakuttan
  0 siblings, 0 replies; 4+ messages in thread
From: Omanakuttan @ 2003-06-27 16:10 UTC (permalink / raw)
  To: Srini Amble, linuxppc-embedded


>
> Have you tried playing around with the baud rate settings, parity
> settings, stop/data/start bit setting? From what you have mentioned I
> suspect the problem is with the mismatched settings I have listed
> before. Please make sure that the port on your host (on which minicom is
> running) is set to match with what your serial port on your target is
Yes, I have tried these settings.
Let me explain the problem like this,
starting minicom and set the baud rate, xon/xoff and hardware
flowcontrol and parity to correct values.
We begin getting messages on the tty, without any problem.
We do insmod ...etc for the driver. Now during the testing some packts
re passed (say 500.) suddenly the characters gets jumbled after printing
some data which we cannot get.
Sometime if the secondary font is set, then minicom exiting and
restarting will set the primary font back. Here it does not happen.

Do you want to me change the parity/xor/flowcontrol..etc once this
problem occurs? I will give that a shot too..
Thanks
Om.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* RE: jumbled characters on serial port
@ 2003-06-27 16:31 Jean-Denis Boyer
  0 siblings, 0 replies; 4+ messages in thread
From: Jean-Denis Boyer @ 2003-06-27 16:31 UTC (permalink / raw)
  To: Omanakuttan; +Cc: linuxppc-embedded


> We begin getting messages on the tty, without any problem.
> We do insmod ...etc for the driver. Now during the testing some packts
> re passed (say 500.) suddenly the characters gets jumbled
> after printing

Maybe this has nothing to do with the binary data that is output.
Do you call "printk" from interrupt context?
If so, there is currently a known bug (but no fix yet) about characters
getting jumbled when using printk in interrupt context.

Look at that thread of discussion:
  http://lists.linuxppc.org/linuxppc-embedded/200303/threads3.html#00109
The subject is:
  Problem of concurrency in arch/ppc/8260_io/uart.c

As a work around, I would suggest to defer your traces to a kernel task (with schedule_task)... or to fix the bug! ;-) ...whichever is more appropriate.

Regards,
--------------------------------------------
 Jean-Denis Boyer, Software Designer
 M5T Centre d'Excellence en Télécom Inc.
 4283 Garlock Street
 Sherbrooke (Québec)
 J1L 2C8  CANADA
 (819)829-3972 x241
--------------------------------------------

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2003-06-27 16:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-27 15:31 jumbled characters on serial port Omanakuttan
     [not found] ` <3EFC66FE.4050301@xopworks.com>
2003-06-27 16:10   ` Omanakuttan
  -- strict thread matches above, loose matches on Subject: below --
2003-06-27 15:47 Jean-Denis Boyer
2003-06-27 16:31 Jean-Denis Boyer

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 NNTP newsgroup(s).