Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

issue with the AdressSpace

Solved!
Go to solution

Hello,

 

I write a PWM-Signal (low=0V, High=5V and Periode: <10ms) with a PCI6229 and the AO Example in the DDK-Drivers.

The PWM-Signal looks very good, but after approximately 15-20 seconds, I get always a runtime error: Page Fault.

 

Code:

for(;;){

        board->DAC_Direct_Data[channel].writeRegister(0.0);

        RtSleep(1);
       board->DAC_Direct_Data[channel].writeRegister(5.0);

        RtSleep(1);

 

I found the failure In the tAdressSpace::write32 function (osibus.h): The void*-Pointer "theSpace" is no longer valid.

Have somebody an idea, what I do wrong?

 

 kind regards

Heiko Mayer 

0 Kudos
Message 1 of 5
(8,108 Views)

Hi Heiko-

 

Which OSinterface are you using (or did you write your own)?  Which host environment (PC, OS, etc) are you using?  Can you share your code built from the AO example, paring it down to only include configuration and register writes/reads as shown in the MHDDK if possible?

 

Thanks-

Tom W
National Instruments
0 Kudos
Message 2 of 5
(8,059 Views)

Hello Tom,

 

Thanks for your answer, but I found the solutions.

It had nothing to do with DDK.

 

Best regards

Heiko

 

0 Kudos
Message 3 of 5
(8,046 Views)

Hi Heiko-

 

Thanks for letting us know.  Can you please describe the cause of the failure just in case anyone else runs into the same problem?

 

Thanks in advance-

Tom W
National Instruments
0 Kudos
Message 4 of 5
(8,041 Views)
Solution
Accepted by topic author HeikoM

Hello Tom,

 

My bug was a simple C/C++ error:

I have the "__stdcall" instruction for my timerfunction forgotten.

That was the cause for the "page fault".

 

Best regards

Heiko Mayer 

Message 5 of 5
(8,037 Views)