I made two different applications based on the same Embedded Artists quickstart board. Everything runs fine on the desk, with or without Jtag cable connected.
But when I install my modules on the motorbike and start the motor, the softwares start, run fine for about 10-30 seconds and then hangs. No reset, just stop running.
At this stage, you will say “check the power supplies, filtering, blah-blah”. I think I made everithing correct, putting capacitors, ferrites, etc where needed. One module is completely stand alone, running on batteries, but same behavior.
My question is: what about the jtag port when it is not used? is it better to disconnect it by firmware (using Pinsel2 reg) ? witch pull-up/pull-down configuration could help on this port.
Another general question: what do you recommend with unused I/O pin: keep it a general input, or configure it as an output ?
It’s one thing to engineer for clean power, and another to actually have it. Put a scope on your power supplies during operation in the noisy environment and make sure no (or sufficiently little) noise is getting through.
There are other ways for noise to get in. Every wire or PCB trace (even bond wires, interconnects, and semiconductor structures on a chip die) is an antenna for the broadband noise coming (through space) from the ignition system. If you’re not shielding (grounded Faraday cage) your control board, you should be. Especially if it is positioned anywhere near any part of the high voltage ignition system. That includes the spark plug(s).
Every signal wire entering your controller is similarly an antenna for that noise. You may need to add cable shielding and/or signal conditioning to them.