Jump to content
LIndigo

System hangs with SWIRQ

Recommended Posts

Nothing is working for the External interrupts.  I have exhausted every possible means I am aware to get this to work.  Having to spend 50 hours on something that is supposed to work out of the box, I think is a great disappointment.  To get customers of the pcDuino to perform a "try this, or try that, or try something else", does not instill a tremendous amount of confidence in my assessment of the product.

 

Those of you who have provided me guidance and support on this board -- I cannot thank you enough.  You certainly have done your best to provide me support, thoughts, and hope in attempting to get this system to function in a stable environment.

 

My conclusion is the pcDuino external interrupts just do not work (for an extended length of time).  If anyone has been able to get the pcDuino to run a simple ISR program (like the one I have attached in this thread), for more then 8 hours, I would be very interested to hear from them.

 

I did not start this thread, however, I think it can be closed.

 

Thanks,

HH

Share this post


Link to post
Share on other sites

Looking at your test code you are printing to the terminal screen 50 times per second. Its possible that you are over running the screen buffer over time.

 

Try using a counter and only print once per second and reset the counter and see if that changes things.

Share this post


Link to post
Share on other sites

HI CW:

Looking at my code, you will see I am only printing to the screen once every 4 seconds.

 

I am running the ISR 5 times per sec (ie: 200 mSec per ISR), and there is an IF statement that says PRINT once every 20 times -- Hence 20 * 200 mSec = 4000 msec.  Therefore, I am only printing to the screen once every 4 seconds.

 

I am only using the Oscillator, not the PartPulse for the testing.  I cannot get to my Part Testing until the Oscillator is working.

 

Thanks,

HH

Share this post


Link to post
Share on other sites

Please comment out the time functions and make it more simple.

  if (iPulse == 20)
  {
    iPulse = 0;
    //time ( &rawtime );
    //timeinfo = localtime ( &rawtime );
    //printf ( "Oscillator: %s", asctime (timeinfo) );
    printf("Pulse");
  }

See if that changes anything.

Share this post


Link to post
Share on other sites

No, that does not change the issue.

 

The way you show the code is the originally method (actually, the original method had no printing at all, but just some basic math statements)

 

I placed the date/time stamp in the ISR so I could tell when the unit locked up.  Without the time/date stamp, I could never tell how long it would run.

Share this post


Link to post
Share on other sites

I pulled the plug on the external trigger so that I could test your request.

 

I also added this software into the main loop so I could see if the software was still running;

time ( &rawtime );

timeinfo = localtime ( &rawtime );

printf ( "MainLoop: %s", asctime (timeinfo) );

Delay(1000);

 

And, every 1 second I would get the time and date.  This ran for about 10 minutes.

 

I then plugged in the external 5 hz (5 times per second) trigger back into/onto the pcDuino

 

(Edit) Should have said 5 hz

 

The system now updates the screen 5 times a second with the

 

MainLoop Sun Aug 2 .......  String.

 

So, I went from displaying the MainLoop Sun Aug 2.... Every 1 second (without the external trigger).

 

To, Displaying MainLoop Sun Aug 2.... 5 times a second (plus, my once a second Oscillator message).

 

It appears when an external interrupt occurs, it kills the main loop Delay(1000) timer, and moves onto the next line of code.  No big deal, for my software does not care about this.

 

The Interrupt timer is still timing, however, it will die soon.

Share this post


Link to post
Share on other sites

This weekend I purchased a NetDuino (interpretive) and a Arduino Uno (compiled).  Installed my 10 lines of ISR logic into both, and they both have been running the External Interrupt software for over 20 hours without fail.

Share this post


Link to post
Share on other sites

I picked up a Arduino YUN yesterday -- the external interrupts also work just fine.

 

So, not sure where to go from here -- I think the pcDuino External Interrupts do not work.  I have done as much empirical research as I can possible do on this subject -- and, I do not know how to contact the pcDuino factory (if a factory even exists?).  So, I think my next step is to abandon the pcDuino for our product and go with the YUN.

 

Thanks,

HH

Share this post


Link to post
Share on other sites

Hi CW:

 

Me too.  The pcDuino has everything I want/need.  Ethernet, HDMI, 4 GB ram (plus SD), great foot print (Nano), low cost, plus it is a Linux Computer with Arduino IO with Desktop GUI to boot.  WOW! what an awesome system, however, without the ability to have an external interrupt to have consistent readings of the Inputs at 20 mSec samples, I am hosed.

 

There is one possible approach that could save this which I have not explored (nor I am not sure how to do).  This would be to create some type of a bridge between our Arduino Real Time Sketch, and the Mono C# Business Logic sides of our application(s).  I may be able to make the somewhat inaccurate Arduino Sketch Software Timer Interrupt to work if and only if, the Mono C# business logic does not cause the Software Timer Interrupt to fail its ISR call (in the event the Mono C# app is busy hanging on a instruction that takes more than 20 mSec.).  PLUS, I would need some type of Bridge to send small snippets of data back and forth between the Arduino Sketch and Mono C# Business logic sides.  (Note: I cannot use TCP, for we never found a simple effective Client TCP code for the Arduino Sketch side.  I cannot use the Server example that is available on these sites for it is a blocking call -- I think we talked about this several months ago).

 

If you have any thoughts, please let me know.

Thanks,

HH

Share this post


Link to post
Share on other sites

I have started the torture test. Using your code compiled and running on pcDuino3B. My test is torture because I am using pcDuino to create a 195hz pulse to the pin 3 input. Will update if/when it dies.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×