I have a Compact PCI card in a PXI chassis; it has 2 BARs of memory which should be accessible via National Instruments NiVisa operations. I'm having trouble with Windows 7 changing the command register on the card during its start up sequence so that the card's memory Bars are inaccessible. I ran a Bus analyzer and observe that the command register of the configuration space is set to a desirable value (0x0197) after BIOS runs.
I'd like this value to persist through the Windows start up sequence. It does remain the same when using the Windows XP operating system, but not when running Windows 7. I've set up a dual booting machine with Windows XP and Windows 7 to make sure all the hardware is the same during the comparison. After the Windows 7 start up sequence, the value is 0x0194.
I am able to set the command register to 0x197 to get those last two bits the way I want them from within the program I'm using to talk to the PXI card, and this allows me to use the card as desired, but it is not a stable fix. I get frequent errors when starting new communication sessions (after closing old sessions) that memory allocation can't be performed by the National Instruments libraries.
- Is there a way of preventing Windows 7 from configuring the PXI card?
It seems to be already the way I want it after the BIOS is done. It appears that Windows CE disables card configuration with a NoConfig registry flag. I wasn't able to find a method that worked on Windows 7 or Windows XP.
Windows XP attempts to reconfigure the card's configuration space as well, but leaves it in a usable state. Optionally, as it would increase my understanding, but is probably tangential to getting my problem solved, I'm interested in:
- What difference is the Windows 7 reconfiguration doing that is getting a different outcome in this card than Windows XP gets?