| View previous topic :: View next topic |
| Author |
Message |
cnrs-insu
Joined: 05 May 2009 Posts: 19
|
Posted: Wed May 13, 2009 8:27 am Post subject: INIT Failed PROG |
|
|
Hi,
it's me again,
Now my Multithread console application is running.
But sometimes after sveral closing and executing my program I am unable to pass through the LoadLogic function which always returns me :
Thread Acquisition : -----------------------------------------------
Thread Acquisition : Parsing Module logic file
Thread Acquisition : Parse completed ok
Thread Acquisition : INIT failed to assert following PROG --
I tried to modify gently LogicLoadThread_Mb.cpp as I found in forum like this :
bool IsInit = Fpga.IsInit();
double Then = Rtc.Now() + 0.1; // in secs
Fpga.Program(true);
do {
IsInit = Fpga.IsInit();
Rtc.uS(1);
} while (!IsInit && (Rtc.Now() < Then));
but I have always the same behaviour.
With Snap, I get the same problem !
The only way to clear the problem is to reboot , but I have to do it several times a day, I don't think this is best way to resolve the problem.
Any advice would be appreciated
Regards |
|
| Back to top |
|
 |
jhenderson Site Admin
Joined: 07 Mar 2006 Posts: 1178 Location: So. Cal. USA
|
Posted: Wed May 13, 2009 10:13 am Post subject: |
|
|
You mention that this failure mode seems to occur after repeatedly opening and closing the application. Are you certain that when the logic load operation fails, that the driver successfully opened? Are you able to read other module registers, temperature, etc?
There is no need to repeatedly reload the logic, unless you are actually changing its behavior. Does the application exhibit other failure modes even if you skip the logic reprogramming cycle? |
|
| Back to top |
|
 |
cnrs-insu
Joined: 05 May 2009 Posts: 19
|
Posted: Wed May 13, 2009 10:46 am Post subject: X3-25M |
|
|
Yes it opens successufly (snap and my program), the stream is created and seems to be ok, but I can't tell at this moment if I can read rom values from the card , I will try tomoroww.
but after thoses operations, the program fails at LoadLogic
Is there anyway to know if the card is initialized with its logic already loaded, because in this case it won't be necessary to reload at execution of the program. |
|
| Back to top |
|
 |
jhenderson Site Admin
Joined: 07 Mar 2006 Posts: 1178 Location: So. Cal. USA
|
Posted: Wed May 13, 2009 12:40 pm Post subject: |
|
|
| Use the Module.Logic().IsConfigured() method to determine if the FPGA is already configured. But, I think we will ultimately need to understand why this LoadLogic method is failing. |
|
| Back to top |
|
 |
cnrs-insu
Joined: 05 May 2009 Posts: 19
|
Posted: Wed May 13, 2009 11:49 pm Post subject: |
|
|
Code :
Io->Open();
unsigned char nbre_carte_trouves = Io->Module.BoardCount();
if(nbre_carte_trouves>0)
{
//Chargement configuration si besoin
if(!(Io->Module.Logic().IsConfigured()))
{
Io->Settings.ExoFile = "d:\\lng\\x3_25m_r1.bit";
Io->LoadLogic();
}
else
{
fprintf(stderr,"Carte X3 Deja Initialisee\r\n");
}
fprintf(stderr,"Module Temperature %f\r\n",Io->Temperature());
.....
Result :
Open is OK , Module.BoardCount() returns 1...
and LoadLogic gives always the error if I don't put the test above.
with this test :
Io->Module.Logic().IsConfigured() returns true even if the led (second led) is not on (after switching off/on for exemple X3-25M).
Result for temperature :
Module Temperature 4095.937500
It seems to have a problem of dialog.
When this problem appears, there is nothing else to do than rebooting the PC !
Thanks for your help |
|
| Back to top |
|
 |
jhenderson Site Admin
Joined: 07 Mar 2006 Posts: 1178 Location: So. Cal. USA
|
Posted: Thu May 14, 2009 3:12 pm Post subject: Re-enumeration |
|
|
| If the X3-25M is installed into a DAQ-Node enclosure, rebooting the PC is required after power-cycling. This is because the operating system loads configuration information into the module registers during the enumeration process, which occurs at boot time. Power-cycling erases that configuration information and it can only be recovered by re-enumeration (reboot). |
|
| Back to top |
|
 |
|