11-12-2008 04:43 AM
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
Solved! Go to Solution.
11-19-2008 01:09 PM
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-
11-21-2008 03:21 AM
Hello Tom,
Thanks for your answer, but I found the solutions.
It had nothing to do with DDK.
Best regards
Heiko
11-21-2008 09:57 AM
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-
11-21-2008 10:04 AM
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