National Instruments PCI-232/4 Tablet User Manual


 
© National Instruments Corporation 13 Using PCI Serial with Linux
Common Questions
What do I do if intenable does not work immediately or causes a
segmentation fault?
Enter the following to recompile
interrupt_enable.c and rerun
intenable. Also, the source code for intenable is available for editing
and viewing at
interrupt_enable.c provided in the PCI-SERIAL
directory.
linux PCI-SERIAL# gcc interrupt_enable.c -o intenable
linux PCI-SERIAL# ./intenable <
PCI memory address found
in lspci
>
Error Code intenable: ERROR: Initial value of interrupt enable register
not equal to 0xC0C
Solution Make sure that you are providing the program with the correct memory address.
Enter the following to check for the memory address:
linux# lspci -v -n -d 1093:*
00:0a.0 Class ff00: 1093:d150 (rev 01)
Flags: medium devsel, IRQ 11
Enter this address! -->Memory at 000dff80
(low-1M,
non-prefetchable)
I/O ports at dff0
I/O ports at dfe0
I/O ports at dfa8
I/O ports at dfa0
linux# ./intenable dff80
Error Code rs485: ERROR: Couldn't write to /dev/ttyS<
port number
>'s
scratch register
Solution Make sure the device was configured correctly in setserial. Enter the
following:
linux# setserial -gv /dev/ttyS<
port number
>
/dev/ttyS4, UART: 16550A, Port: 0xdff0, IRQ: 11
If the port listing does not match the one found by lspci, reconfigure the device
by entering the following:
linux# setserial /dev/ttyS<
port number
> uart 16550a port
<
port
> irq <
irq
> ^fourport