05-24-2006 03:04 PM
05-24-2006 06:01 PM
05-25-2006 09:21 AM
05-31-2006 09:05 AM
06-05-2006 03:16 PM
It is unclear from your description if the board is even being recognized by the OS upon insertion. If it is being recognized, it's possible that the DAQ board is not being powered up properly by the device. If this is the case, a soft reset of the DAQ board may suffice. Below is information on how to perform this soft reset using the Configuration Option Register. The soft reset sequence has to be implemented in nirlpdriver.dll, where you have access to the device. You could add the soft reset in the driver initialization function (RLP_Init) which gets called after the driver is loaded (after the device plugged in or after suspend). I hope this helps.
Configuration Option Register
The configuration Option register contains a bit to do soft reset to the board, as well as other bits required by PCMCIA. This register is located in configuration space.
Address: Base address + 0 (hex), Configuration Space (Memory Interface)
Type: Write/Read
Word Size: 8-bit
Bit Map:
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
SRESET |
LevIRQ |
FCI5 |
FCI4 |
FCI3 |
FCI2 |
FCI1 |
FCI0 |
7 SRESET This bit resets the board when set to 1. It resets all the functions and registers of the board, except for this bit. To exit the reset state, a 0 needs to be written to this bit.
6 LevIRQ This bit is implemented but is not functional. It can be written and read back but will have no effect on how the interrupts work. Its intended function is to select between level and pulse interrupts. The board works on level mode only.
5-0 FCI(5:0) The Function Configuration Index bits are intended to set the board in a certain configuration mode. When the bits are all set to 0 either by the user or by a reset, the board will ignore all accesses to the I/O interface. The default is 0, so before doing any I/O access to the board a value different than 0 must be written to the board. The value itself does not have any effect.
06-05-2006 03:17 PM
The function to access the configuration registers is 'CardAccessConfigurationRegister'. In nirlpdriver this function is accessed using 'pfnAccessConfigurationRegister'. Here's how to reset.
unsigned char cor_data = 0;
cerr = pfnAccessConfigurationRegister(hPcmcia,hSock,CARD_FCR_READ,FCR_OFFSET_COR ,&cor_data);
cor_data |= FCR_COR_SRESET;
cerr = pfnAccessConfigurationRegister(hPcmcia,hSock,CARD_FCR_WRITE,FCR_OFFSET_COR ,&cor_data);
cor_data &= ~FCR_COR_SRESET;
cerr = pfnAccessConfigurationRegister(hPcmcia,hSock,CARD_FCR_WRITE,FCR_OFFSET_COR ,&cor_data);