09-08-2009 04:30 PM
our device has memory at bar space 2. when i try to write and read back offsets 0x0 to 0x0FFFFF, i get all FF's. if i start at offset 0x100000, i read back what i wrote correctly. the calls to viOut32 and viIn32 do not return any errors. any ideas? here's a code snippet. this works, but if i use 0 for the offset, i get all FF's in aViInt. could there be a problem with my inf file.
/* initialize varible, write it out, check the return for an error and print if error */
aViInt = 1234;
aviStatus = viOut32(pE2maDev->hViSession, VI_PXI_BAR2_SPACE, (ViBusAddress)0x100000,(ViUInt32)aViInt);
if (aviStatus != VI_SUCCESS)
printf("viOut32 Failed\n");
printf("aViInt = 0x%08X\n",aViInt);
/* zero out variable. */
aViInt = 0;
printf("aViInt = 0x%08X\n",aViInt);
/* read in value from memory, check for error, print out results. */
aviStatus = viIn32(pE2maDev->hViSession, VI_PXI_BAR2_SPACE, (ViBusAddress)0x100000, (ViPUInt32) &aViInt);
if (aviStatus != VI_SUCCESS)
printf("viIn32 Failed\n");
printf("aViInt = 0x%08X\n",aViInt);
09-09-2009 12:55 PM
09-09-2009 01:13 PM
09-10-2009 10:09 AM
i might add that reading/writing at offset 0x100000 and above is ok.
also, i have a different model card with memory at the same bar space and i can't read any offsets. all FF's.
09-10-2009 04:08 PM
Chucky,
On your second card, you can't read anything at ANY offset, or just the 0x0 to 0x0FFFFF? In looking at your ini and inf files, it seems like you have interrupts setup on BAR3... is this what you're trying to access? There's nothing in the ini or inf files that I saw that indicate you have memory in BAR2 space. Is this something specific to your device?
09-10-2009 04:13 PM
on the second card, i can not write to any offset.
the interrupt stuff in the inf file may not be correct.
how do i specify in the inf file that bar space 2 is memory? the driver wizzard did not indicate that it had to be specified.
09-11-2009 03:20 PM
Chucky,
This driver looks like it was developed using the VISA Driver Development Wizard. If the inf file is incorrect, you'll have to go back through and re-create it using that Wizard for the appropriate interrupts and the appropriate locations. In there you can set where the interrupts are in memory.