Causes Of CPU Resets

For people running FreeEMS to discuss it and ask any questions about using and adjusting it.
Post Reply
User avatar
Fred
Moderator
Posts: 15432
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Causes Of CPU Resets

Post by Fred »

Hello world,

I was just about to tell someone what the possible causes are, and thought I'd put it here for others' reference, too.

Reset Line Pulled Low

If the reset line is pulled low, even briefly, the CPU will hard reset. On the Jaguar (0.7-alpha), C6 and R5 are responsible for preventing this from occurring due to noise. Therefore this is unlikely to occur.


Power Supply Briefly Removed

This is the same as turning it off completely for a longer time and then back on again. But quicker. Can only really happen with a bad connector or connection or internally broken wire.


Power Supply Quality Issue

A noisy 5V rail can cause the CPU to lockup or reset. Noise can get here in several ways:

1) Sudden load/unload
2) Oscillating regulator
3) Extreme 12V supply variations


Software Initiated Resets

The firmware has a facility to be told to reset by external software over the serial comms line. The chances of this happening due to noise are extremely low indeed. The firmware has many independent mechanisms to reject bogus packets. Accepted packets of all types must be absolutely perfect.


Hardware Initiated Resets

The MCU has a facility to reset the device if it's not functioning properly. I have this in place on my car, however no other car I'm aware of has this. The version I have is not of sufficient quality for general distribution, hence not shared.


System Reset Generation

System reset generation from the following possible sources (My comments in bold):
  • Power on reset - normal behaviour
  • Low voltage reset - Low quality supply, possibly during cranking with bad battery
  • Illegal address reset - Corruption or bad code
  • COP reset - Software controlled or firmware failure (with future fw)
  • Loss of clock reset - We don't meet conditions for this. Instead we self-clock and then recover with tell-tales in the log.
  • External pin reset - First thing in above list

I may have missed some, and reserve the right to edit the above over time. Feedback welcome, comment below!

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15432
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Causes Of CPU Resets

Post by Fred »

I posted this because Josh is experiencing 10 second periodic resets of his CPU with his engine off. His car is devoid of electronics and noisy devices of any kind. The only thing capable of generating noise is the ECU-engine combo, and possibly a few relays which aren't being periodically activated in sync with this issue. Additionally, he says that it's solid/good once running. Any ideas are welcome as the above fails to explain this behaviour.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
DeuceEFI
LQFP144 - On Top Of The Game
Posts: 579
Joined: Thu Feb 25, 2010 3:57 am
Location: Gosport, IN USA
Contact:

Re: Causes Of CPU Resets

Post by DeuceEFI »

Attached is a log created with my SDLogger attached to the Jaguar 0.7-alpha that I use in my S10, while on my bench.

When I look at the tempClock, clockInMilliSeconds and clock8thMSsInMillis with OLV I'm not seeing them fall to zero before rising to the maximum value for the variable.

I have log files created with EMStudio as well, but I only see weirdness with these three values during EMS interrogation when EMStudio is first started. I have also attached one of my recent test drive in the S10 created with EMStudio in which I see the clock "weirdness" during the interrogation process.

Or maybe I'm missing what I should be looking for?

If I can reproduce the conditions in which others are seeing the clock resets I can look further into why they are happening.
Attachments
2014.08.20-19.48.13-S10-Jaguar-0.7-alpha-Test-Drive.bin.zip
Jaguar 0.7-alpha engine startup, warmup and drive down the road and back.
(712.97 KiB) Downloaded 1613 times
LOG00307-Jaguar-0.7-alpha-Check-For-Resets.BIN.zip
Jaguar 0.7-alpha removed from the S10 on my bench.
(197.19 KiB) Downloaded 1646 times
User avatar
Fred
Moderator
Posts: 15432
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Causes Of CPU Resets

Post by Fred »

Very very easy to grab a log of a reset. Just turn off the key mid log for a second, turn it back on, log for a bit more. Then review.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply