C Mencsik

Lock Up Problem with 9S12A64 Part

Discussion created by C Mencsik on Dec 22, 2006
Latest reply on Feb 27, 2007 by Guest
I am using a 9S12A64 part on a custom board to control all aspects of a commercial dishwasher. I have been experiencing a non-cyclic repeating, but intermittent, problem where the control seems to lock up for no apparent reason. By “lock up”, I mean that no processing _seems_ to be occurring, any outputs that were high stay high; any that were low stay low; there is no communication out the SCI ports; other scheduled events do not seem to occur. (It is analogous to what would happen if you removed the clock completely; though the problem does not seem to be loss of clock, as an oscilloscope shows both the 4.1MHz crystal and 24.6MHz PLL waveforms.)

I am using the internal COP and it does not always reset the processor. Sometimes, I’ve gotten reports from the field that the machine “turned itself off” (which is what would happen after a COP reset). But much more often, I receive the complaint that system and screen froze with no way to continue without shutting off main power at the wall.

Furthermore, the problem seems to occur at random intervals; though, it does repeat at all of the field sites that we are currently testing. The longest time we’ve seen between failures in the field is approx. 25 days. The shortest was just under 1/2 hour. The mean seems to be between 12 and 14 days. We have not been able to find any way to repeat the failure in the lab, save for just running a machine continuously for some amount of time (typically, the 12-14 days). Once the failure occurs, the only way to continue is to toggle the micro’s /RESET line low or completely remove power to the machine.

We have been and still are in communication with Freescale AEs, but would like your input, too. We have tried most of the basic things without being able to repeat the problem(including physically removing the crystal and external PLL circuitry, forcing an infinite software loop, etc.). We would appreciate any feedback you might have, be it vanilla or exotic.
Also, we do not know if the problem is hardware or software. All of our standard hardware tests (EMI/RFI, UL, etc.) have passed without incident.

Has anyone heard of a lock-up problem like this? Does anyone have any suggestions on a possible cause or solution? This is the first time we’ve used any of the S12 parts and we don’t have any experience with it. (We have extensive knowledge of some of Freescale’s 8-bit parts, however).

To give a little more detail:

I am using several of the A/D channels, both SCI ports, the PLL set to 24.576MHz (using a 4.096MHz crystal), and the internal watchdog/COP (set to a 4.096second timeout period) on the microcontroller. I also use the onboard EEPROM to hold some system setup parameters and a log of recent error that have occurred in the system. The machine itself uses a variable frequency inverter drive (VFD) as part of its operation. There is 1 RS232 serial display connected to the control (via 1 of the SCI ports) and 1 RS485 communication line connected to the VFD through an RS232/RS485 transceiver connected to the other SCI port.
I am using a 10ms real-time interrupt to schedule tasks in a super-loop. I use the PLL lock interrupt to begin (or stop) using the PLL upon a lock. I use both SCI interrupts to asynchronously control the flow of data into/out of the ports. All of the other unused interrupts cause the control to reset by loading the reset vector location into the index register X and jumping to that location:

Finally, I have been authorized to bring in outside help. If anyone has specific knowledge with the 9S12 series (and, ideally, the A family) and would be willing to contract some time to us for pay, please PM me with your E-mail address and/or phone number to discuss more details. We are located in southwest Ohio and would prefer someone in the vicinity, but are prepared to pay for travel.

Thanks for any help you can give on the forum!!