LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-26-2008, 03:06 PM   #1
derek_ou
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Rep: Reputation: 0
serial port opening and closing byte


Hi, all,

I am not sure whether this is the right place for my question. If there is a better place, please let me know.

I am playing with an arm9 embedded Linux device. When I open the serial port, it sends out 1 byte 0 to the RS232 bus. When I close it, it sends out 0xFF. Is this behavior normal? Is there a way to disable it?

Thanks,
Derek
 
Old 08-26-2008, 03:38 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Sending data at driver open/close is certainly not the behaviour expected. There is a number of possibilities:
* your're observing non-data pin (unlikely, as I understand that except those extra 0x0 and 0xff it works fine)
* parity problem - check parity settings on both the device and your PC
* driver problem/peripherial problem - check documentation of your processor (esp. errata)
* opening in some unexpected manner - please include the code you use to open/close your port (plus the configuration you pass)

Which processor is it (it's peripherial issue, so arm9 is not enough)?
 
Old 08-27-2008, 11:14 AM   #3
derek_ou
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks, Mara. With a scope, I can see a short pulse on the serial port when I open the serial port and a little bigger pulse when I close the serial port. The real term mistakes them as 0x00 and 0xFF. If this is not normal, it must be something wrong in the serial port driver or the processor configuration.

This is an Cirrus Logic EP9302 processor. And I am playing with the second serial port of the processor. We are using the linux 2.6.19.1 kernel with embedded file system, busy box, redboot...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to send byte from serial port neutron001 Linux - Software 9 03-31-2008 05:48 PM
cpu is closing and opening on it's own fakhruddinhd Linux - Software 3 09-06-2006 09:10 AM
Opening and closing ports stormtracknole Slackware 10 01-11-2006 08:29 AM
opening/closing window sounds matt_com911 Fedora 1 06-18-2005 09:17 PM
Opening/Closing Ports on Debian 3.0 addowen Linux - Newbie 0 04-22-2004 06:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration