ts-7000
[Top] [All Lists]

[ts-7000] Problem interfacing custom PC/104 device

To:
Subject: [ts-7000] Problem interfacing custom PC/104 device
From: "Damian" <>
Date: Sat, 05 May 2012 00:48:22 -0000
Hello:
 I am using the TS-7260 and a custom PC/104 device. This device contains a UART 
in which you set the BASE(0x300) with rotatory switches and  the IO  and IRQ 
dynamically. So lets say you set them to 0x300. This means at 0x300 you then 
need to write the upper Most Significant Bye (MSB) of the Serial port IO 
address and at 0x301 you need to write the Least Significant Byte (LSB) of the 
Serial Port IO address, like this:
0x300 0x03(msb)
0x301 0xf8(lsb)
0x302 0x06(irq=6 in board)

Now i created a device in the /dev directory for it,using 
mknod /dev/pc_104 c 4 64

Which is performed sucesfully since I can see it in the /dev directory.
Then I set the port using setserial as follow
setserial /dev/pc_104 port 0x11e0_0000 baud_base 115200 irq 33
However when my program tries to manage  IO dinamically using mmap it 
crashes.This is how the code looks like:

int fd;
void *pc_104;
fd = open(/dev/pc_104, O_RDWR | O_SYNC)
if(fd <=0)perror("fd error");
pc_104 = mmap(0,getpagesize(),PROT_READ|PROT_WRITE, MAP_SHARED,
fd, 0x11E00000);
if(pc_104 == MAP_FAILED)
perror("pc_104");

And i get, once I run the executable:
pc_104: No such device.

I do not know what to do now in order to get this board working, so any help 
will be preciated. Sorry is the post is too long but I tried to be specific on 
it.
Thanks in advance
Damian Miralles



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
  • [ts-7000] Problem interfacing custom PC/104 device, Damian <=
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU