It could most certainly be the ECM but you definitely want too check grounds like Sahein states. I had my ECM go bad after installing a turbo on my 2.4 but it was having a couple issues just before the turbo went on. Flashing them can cause issues but those are generally all or nothing affairs where the ECM bricks itself and the car won't do anything. Check grounds first before ordering more parts but if that is good, then it may be your ECM or harness. Who did the turbo install?