Mange ISA Hardware...

qnx.com/developers/articles/ … rintable=1

in here I found how to work with a PCI device which have no driver.
I read that Different buses have different mechanisms for determining which resources have been assigned to the device. On some buses, such as the ISA bus, there's no such mechanism. How do you determine whether an ISA device is present in the system and how it's configured? The answer is card-dependent (with the exception of "PnP" ISA devices).

so my question is: there is a similar guide but referencing to ISA busses?

thanks…

In referencing ISA buses, if it is not a PnP device, then there must be a memory location in the ISA card which you can read and write to. It is this memory address (which should be in the ISA bus memory address range) that you need to map using mmap_device_io() and the pointer returned by this function is used in the in() or out() function to communicate with the device. Hope this help.

I solved it just mapping the region (0xD0000) using mmap_device_memory and so using the mapped register as a vector…

it is the only way I found in which it work…

using in/out it access an unknown memory area because it read the same value with the board installed or not…

by the way,I want to know how to support isa buses in qnx,which command should I add in build file?

Nothing is required to support ISA (I don’t think QNX support ISA Pnp). It’s just there, just like RAM.

in/out instructions provide access to a different space then using normal address. This is not a QNX concept, this is x86 stuff. One could argue that today in/out are not necessary anymore. In the “old” days, the in/out were very usefull, given CPU could only access 1Meg of ram These IO instruction provide another set of address space outside of normal memory space.

but there is a way, knowing only the base address, to know the port registers? (or maybe, just the offset for tx and rx or something?)…
in the user manual there’s no references to something similar…

There is no standard way, it’s up to each board to map register as they see fit. You need the documentation.

ok…the documentation I can use don’t have othing similar…I contact the technical support and they sayd that is useful to use the API function for load the board.
I sayd that I’ve already do this but it not work (“Board not found” error);
they replyes:


The CEI-x20 API communicates with the hardware exclusively via direct pointer access relative to the base board address. None of the CEI-x20 boards use i/o ports.

All that the low-level implementation needs to do is pass the mapped address of the board back to the API (via vbtMapBoardAddresses). All board accesses are performed by the API relative to that address, so no API modifications should be necessary.

but I’ve already try to do this mmapping the real address and passing it to the function but the result is the same (“board not found”)

“but I’ve already try to do this mmapping the real address and passing it to the function but the result is the same”,

maybe you are doing it wrong.

Here is sample code for doing mmap_io. you need to do ThreadCtl() first for permission purpose.

ok = ThreadCtl(_NTO_TCTL_IO, 0);
if (ok==-1)
{
printf(“You do not have permission to start this process\n”);
exit(1);
}
io_ptr=mmap_device_io(2,0x1EA);
out8(io_ptr,0x0F);

I solved Everything!! chenging every mmap with mmap_device_memory (with right args) and forcing some addresses at my address (0xD0000)…

now I’ve got only one problem(I don’t know the size of the mappe area, so I can’t correctly manage the addresses) but the technichal support will help me (I hope)

I think that is hardware dependent. You should see your hardware spec.

yes it was an hardware problem…I have only +12V and +5V and I need -12V too…now is all right

[color=brown]Hi! Can I run below line? because I have not yet receive the card but my teamleader ask me to still write the driver.

 i=  in16(io_ptr+0x10);

[color=brown] 0x1EA+0x10 still is a port of the card
Thanks!
I’m sorry! I don’t know why color of texr is similar. I try to use many colors to…

No problem, just make sure there is no hardware that lives at 0x1EA and above and you’ll be ok.

You should read 0xffff I beleive.

:slight_smile: Thanks mario! :slight_smile: