Hi All,
Looking for some suggestions here... I have a program that is pretty large. It's running pretty well actually but every now and then the main loop just stops...
I'm not sure what has caused it to crash... There are 5 seperate loops spinning outside the main loop. these other loops are not very labor intensive and have been running fine for awhile. The main loop is not doing much either except reading CAN messages from two CAN-Buses and shuttling them into a Queue... Each bus is at a different speed... But I do not think that is the issue either. I say this because that part of the program has been in place for over a month and has been running fine. In the last week or so the main loop "Freezes" from time to time... It's not very often tht it does this... maybe once every hour or two...
Here are some direct questions...
1.) Is there any way to do error trapping to try and find what's going wrong?
2.) Is this a reason why I might ant to install a watchdog? Could a WD rest the PIC if it see's the main loop has stopped?
3.) Can a process on another loop stop the main loop?
4.) Could the posting of a CAN message (TX) cause an error in the main loop while it's reading messages? That is a change I just added in the last week... I do have a bool that I'm using to interrupt the read line of code while it transmits however...
Any other thoughts / suggections?
-
Hi All,
Looking for some suggestions here... I have a program that is pretty large. It's running pretty well actually but every now and then the main loop just stops...
I'm not sure what has caused it to crash... There are 5 seperate loops spinning outside the main loop. these other loops are not very labor intensive and have been running fine for awhile. The main loop is not doing much either except reading CAN messages from two CAN-Buses and shuttling them into a Queue... Each bus is at a different speed... But I do not think that is the issue either. I say this because that part of the program has been in place for over a month and has been running fine. In the last week or so the main loop "Freezes" from time to time... It's not very often tht it does this... maybe once every hour or two...
Here are some direct questions...
1.) Is there any way to do error trapping to try and find what's going wrong?
2.) Is this a reason why I might ant to install a watchdog? Could a WD rest the PIC if it see's the main loop has stopped?
3.) Can a process on another loop stop the main loop?
4.) Could the posting of a CAN message (TX) cause an error in the main loop while it's reading messages? That is a change I just added in the last week... I do have a bool that I'm using to interrupt the read line of code while it transmits however...
Any other thoughts / suggections?
-