2번째 시리얼이 잘 동작하지 않습니다.

rma8806의 이미지

임베디드 보드에 리눅스 포팅후 작업중입니다.

serial port가 2개 있는데, 하나는 터미널 출력용으로 사용하고, 나머지 하나를 사용해서 주변기기와 통신 하려고 합니다.

터미널용 시리얼은 /dev/ttyAM0으로 잡히고 잘 동작하는데,

2번째 시리얼(/dev/ttyAM1)이 핸들은 얻어지는데, 실제로 출력이 이루어지지 않는 것 같습니다.

open("/dev/ttyAM1",O_RDWR | O_NOCTTY | O_NONBLOCK);

이렇게 주면 핸들값은 3으로(에러가 아니게..) 나오더라고요..

몇가지 정보를 출력 해보면 다음과 같습니다.

# ls /proc/tty/driver
serial ttyAM

# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:unknown port:00000000 irq:0
1: uart:unknown port:00000000 irq:0
2: uart:unknown port:00000000 irq:0
3: uart:unknown port:00000000 irq:0

# cat /proc/tty/driver/ttyAM
serinfo:1.0 driver revision:
0: uart:AMBA mmio:0x808C0000 irq:52 tx:2553 rx:217 RTS|DTR
1: uart:AMBA mmio:0x808D0000 irq:54 tx:0 rx:0
2: uart:AMBA mmio:0x808E0000 irq:55 tx:0 rx:0

# ls /dev
audio hdb loop6 mtdblock7 ptyp7 sdb3 ttyp6
audio1 hdb1 loop7 mtdr0 ram snd ttyp7
audio2 hdb2 mem mtdr1 ram0 spisd urandom
basic-io hdb3 misc mtdr2 ram1 tty vcs
console hdb4 mixer mtdr3 ram2 tty0 vcs1
cuam0 hdb5 mtd0 mtdr4 ram3 tty1 vcs2
cuam1 hdb6 mtd1 mtdr5 random tty2 vcs3
dsp hdb7 mtd2 mtdr6 rawctl tty3 vcs4
dsp1 input mtd3 mtdr7 rtc tty4 vcs5
dsp2 kmem mtd4 null rtc0 tty5 vcs6
fb lirc mtd5 printkA rtc1 tty6 vcs7
fb0 lircd mtd6 ptmx rtc2 tty7 vcsa
hda lircm mtd7 pts rtc3 ttyAM0 vcsa1
hda1 log mtdblock0 ptyp0 sda ttyAM1 vcsa2
hda2 loop0 mtdblock1 ptyp1 sda1 ttyp0 vcsa3
hda3 loop1 mtdblock2 ptyp2 sda2 ttyp1 vcsa4
hda4 loop2 mtdblock3 ptyp3 sda3 ttyp2 vcsa5
hda5 loop3 mtdblock4 ptyp4 sdb ttyp3 vcsa6
hda6 loop4 mtdblock5 ptyp5 sdb1 ttyp4 vcsa7
hda7 loop5 mtdblock6 ptyp6 sdb2 ttyp5 zero

특히 핸들을 얻고 데이터를 전송 하는중에

/proc/tty/driver/ttyAM 파일을 출력해보면 전송한 량만큼 tx값이 올라는 가는데, 수신측으로는 아무런 데이터도 들어오지 않네요..

system("cat /proc/tty/driver/ttyAM");

serinfo:1.0 driver revision:
0: uart:AMBA mmio:0x808C0000 irq:52 tx:7039 rx:347 RTS|DTR
1: uart:AMBA mmio:0x808D0000 irq:54 tx:56 rx:0 RTS|DTR
2: uart:AMBA mmio:0x808E0000 irq:55 tx:0 rx:0

또 시리얼의 RXD,TXD를 연결해서 루프백으로 만들어봐도 데이터 수신도 되지 않습니다.

이럴경우에는 어느부분을 점검 해봐야 할까요?

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.