Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling Mantis interrupt crashes VME-GPIB board

We are using the 488DDK to write a driver for VxWorks and the VME-GPIB board. Currently the board init code crashes the board when the nivme_probe function writes a 4 to address 2 on the board. We have confirmed that our VME base address for the card is correct (0x60ff2000). This same behavior is seen when we use the monitor to to do the write (m 0x60ff2002,1). Our VME analyser seems to show that a second write is attempted to the next address (2003) which actually causes the crash. Is there any documentation available for the Mantis that would help us to debug this problem. Our Mantisout routine just writes a UINT8 to that address in A16 supervisor space so it's unclear why the second write is attempted. Any help would be appreciated.
 
Thanks 
0 Kudos
Message 1 of 4
(3,498 Views)

Chriso,

In the source code for the DDK is a file called nivme_hw.c.  The nivme_probe, is located in that file .  This makes calls to the function nivme_init_mantis.  I have a couple of additional questions for you:

1.  Have you changed anything in the hardware layer, if so what specifically has been changed?
2.  Are you sending 8 or 16 bit values?

A_Ryan
AES
National Instruments
0 Kudos
Message 2 of 4
(3,442 Views)

I haven't changed anything in the hardware layer but it turns out a 16 bit write was going out instead of an 8 bit write as was intended. This was apparently caused by the compiler doing some "optimizing". When all optimizations were turned off, the exact same code ran as intended, as confirmed by running a VME analyser on the output. Yet another example of why optimizing compilers should not be used for compiling drivers or any code containing hardware interactions.

Anyway, our problem seems to be solved - thanks for your help.

0 Kudos
Message 3 of 4
(3,429 Views)

SO,Chriso ,you just run the souce code form ni in your vxworks?

Or,some work should been done to change the code to adapt vxworks because the source code is for solaris?

My question is ,after i assert the address is 0xfbff2000 of the board,can i modify the registers to implement send gpib code?

0 Kudos
Message 4 of 4
(3,263 Views)