[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: RS485 userspace test



Hi,

Since we don't have access to your firmware you need to run the oops 
through ksymoops to see where the problem occurs.

example: ksymoops -v vmlinux -K -L -O -m os/linux/System.map

Normally it should be possible to run any kernel but we recommend
the kernels distributed with the developer board releases on
developer.axis.com.

/Mikael

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
Behalf Of Hansen Martin
Sent: Friday, June 07, 2002 7:56 PM
To: dev-etrax
Subject: RS485 userspace test


I have tested the new serial driver design, in the 2.4.19-pre10 kernel.
I have tested whether I can write to RS485 bus from userspace, with the
RS485 capability on
Basically I enable RS485 in kernel config.
A userspace program open the dev file /dev/ttyS3 then calls the IOCTL to
enable RS485.
I write to the dev file

That runs well if I am the only on the RS485 bus, because if I get an answer
from the device I that also is on the RS485 bus.
Then I get a kernel oops and panic. the answer comes about 10 ms after I
send my message.

I have tested it on kernel 2.4.19-pre8 + new serial patch, and on kernel
2.4.19-pre9 and pre10 without a patch.
Exact same result.


The serial port is set to 9600 parenb (8o1).

By a normal run, (that I can achieve trough a call to the same driver from
another module, and therefore kernelspace).
I get something like the ascii graphic below

data-----|||||||||----|||||||||||-----
rts------___________------------------
         axis send    device answer

But if I do the same thing from userspace, I get this result

data-----|||||||||----|||x|||x|||-----
rts------___________-----_---_--------
         axis send    device answer

As you can see the RTS line makes two short jumps when receiving the answer,
it is probably caused by the kernel going down.

If I turn off my device, so there is no answer. It looks as expected. and no
extra jumps on the RTS line.

data-----|||||||||--------------------
rts------___________------------------
         axis send    device answer

Attached the oops message from the pre8 version (they are similar for all
versions)


BTW: I can _not_ use the method of toggling the RTS directly from userspace,
it is too slow.

-- 
Martin Hansen
Student at SDU Sønderborg. www.sdu.dk
Writing final project at Danfoss drives A/S. http://drives.danfoss.com

Tlf: 74 88 54 62