Mini2440 Serial Port

Ruben
Hi

I'm trying to access the serial port on my mini2440. but theres not /ttys0
in /dev and I can see ttySAC0 is used for console when i log in. SAC1
doesnt work either. am i missing something? 

thanks in advance

Ruben

davef
Yup!

Are you using PTXdist?  

mknod if all else fails

Actually, there could be an entry in ptxdist menuconfig or kernelconfig

Sorry, my Linux stuff is at home.

Ruben
Hi Dave

I managed to get the SAC0 working, but its a bit of a mission not knowing
where what is, is there any reference docs somewhere? or can you point my
in the right direction?

Yes I'm using ptxdist latest 2012.12.0.

Thanks for your help.

davef
OK, I have had a look and I don't have ttys0.  ttySAC0, ttySAC1 and ttySAC2
are listed

ttySAC0 is 620 root root
ttySAC1 is 666 root dialout
ttySAC2 is 666 root dialout

How they behave might be in root/lib/udev/init.d/rules and

50-udev-default.rules and/or 75-tty-description.rules

Maybe, ttySAC1 and ttySAC2 behaves differently than ttySAC0.

Reference document ... maybe "Linux serial port" in Google.

Appears to be nothing in menuconfig or kernelconfig.

Good luck!

Juergen Beisert
Ruben,

'ttyS*' is the device node name for Intel's 8250 based UARTs. The S3C2440
CPU does not have such a UARTs, it has its own variant. So, also the device
node name differs, but acts in the same way like the 'ttyS*'.

If your kernel registers all three UARTs available on the Mini2440, you
also should see three 'ttySAC*' device nodes in the 'dev/' directory.

But note: only 'ttySAC0' is a real RS232. 'ttySAC1' und 'ttySAC2' are UARTs
at TTL level only.

Ruben
Thanks Dave

I'll google and check what i can find.

Regards

Ruben
Hi Juergen

I overlooked your response. Thanks for the advice. Another thing I'm having
a hard time with is knowing where what is, I saw SAC0, SAC1 and SAC2 in
/dev/, is there a doc or code I could look at to see whats where and a
description? I also saw in the quickstart doc that theres some locations
and descriptions for some of the component e.g. led etc... 

is that all there is and I dont need anything else? 

Thanks!

Juergen Beisert
Hi Ruben, sorry, but I don't understand your question.

Ruben
Hi Juergen

Sorry about that, after re-reading it, I couldn't understand myself. I
guess what I was trying to ask is, how am I able to see that SAC0 is the
normal serial RS232 and SAC1 and SAC2 are the TTL UARTs, is that mentioned
in a doc or a file in the BSP tar.gz? 

I think my biggest prob is, I haven't programmed with c++ on Linux before
and I'm trying to get my foot in the door to see how everything fits in
together, I found some examples on the net, but what gets me is say I want
to turn led 1 on, I can open the file no prob, but what then, can I just
write a hex value, or should I setup something else?

I suppose this is'nt really the best place to ask, but I'm kinda desperate
and confused, so any help or advice is rrreeeaaallllyyyy appreciated, and
once I become more fimiliar with how it all works, I'd definitely make some
tutorials.

Regards

Ruben

Titus Breidung
ttySAC0 = TTL0. The TTL is connected on CON1 of Mini2440. ttySAC0 is always
dedicated to console by default.
You can use a TTL to RS232 Converter from FriendlyArm for less than 10$ if
you need more RS232 ports. TTL1 is CON2, TTL2 is CON3. The files are
ttySAC1 and ttySAC2.

To use them under C++ you need to include termio.h and initializing the
ports to the parameters you need.

Then you can treat them as files and read and write to them.

Titus Breidung
There are much examples on using termio.h in internet. Just google for it.

Ruben
Thanks Titus

BaHko
Question?

When I type: 
setserial -a /dev/ttySAC1 

I get:
/dev/ttySAC1, Line 1, UART: undefined, Port: 0x0000, IRQ: 73
        Baud_base: 0, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal

Is it normal to say UART: undefined?


Also if I type:
setserial -g /dev/ttySAC[0123]

I get:
/dev/ttySAC0, UART: undefined, Port: 0x0000, IRQ: 70
/dev/ttySAC1, UART: undefined, Port: 0x0000, IRQ: 73
/dev/ttySAC2, UART: undefined, Port: 0x0000, IRQ: 76

Is this normal and if I have to set the UART the which argument should I
use?
What about the ports?

For UART types I have:
        unknown, 8250, 16450, 16550, 16550A, Cirrus, 16650, 16650V2, 16750,
        16950, 16954, 16654, 16850, RSA, NS16550A, XSCALE, RM9000, OCTEON,
AR7,
        U6_16550A

I'm trying to read/write to ttySAC1 and ttySAC2 (TTL levels) but with no
luck!
If I try: setserial /dev/ttySAC1 uart 16550
I get: setserial: can't set serial info: Invalid argument

Juergen Beisert
setserial is a tool from the good old PC times where only 8250/166xx did
exist. Nowadays the ARM based CPUs come with a bunch of re-invented UARTs
which do not conform to the 8250/166xx types.

Ann
How, I can get the configuration state of my Serial Ports?

I have a card OneCom 1035 (But I can't find it On internet), this have DB9
and plug to connect in CON1-CON3 type. Maybe this useful for convert
CON1(or 2, or 3) to Serial RS232.

Thank you.

seema
How to generate a interrupt in SAC1

Sharan
Hello,

i connected my mini240 board to my PC through rs232 and USB cable .in PC  
Ubuntu 12.10LTS is running .I couldn't able to find my ttyUSB in /dev ,
what is the wrong going with me device ? please some one help me .thank you
in advance .