A code 41 from my experience is generally related to a failing alternator. Be aware that the quick test of your alternator could possibly show it as good when it isn't, especially if the alternator is in a state of failing and is not totally dead yet. The code 12 means that direct battery input to the PCM was disconnected within the last 50 key on cycles.
Another thing for your symptoms is to be sure that your battery is up to the job. Have it "load tested". This is very important. The alternator and the battery work in concert and both need to be happy and working well together. And yes, you can have a battery that is strong enough to start the engine, but marginal enough to give your engine management system fits.
Don't replace your ECM. Computer diagnosis is a "diagnosis of exclusion" which means that everything else must be ruled out and you're not there. Can the ECM fail? Of course, but they fail less than people think.
Good luck and keep us updated!
Another thing for your symptoms is to be sure that your battery is up to the job. Have it "load tested". This is very important. The alternator and the battery work in concert and both need to be happy and working well together. And yes, you can have a battery that is strong enough to start the engine, but marginal enough to give your engine management system fits.
Don't replace your ECM. Computer diagnosis is a "diagnosis of exclusion" which means that everything else must be ruled out and you're not there. Can the ECM fail? Of course, but they fail less than people think.
Good luck and keep us updated!