Thanks for asking your question. I will try and help you out.
Yes it's possible to have a faulty ECM. But often a bad ECM is not the problem.
The ECM will turn on the cooling fan, if any of the following conditions are detected by the Engine ECM:
The engine coolant temperature is greater than 102 °C (216 °F).
There is an active diagnostic code for the coolant temperature sensor.
There is an active diagnostic code for the intake manifold air temperature sensor and boost pressure is greater than 70 kPa (10 psi).
The intake manifold air temperature is greater than 87 °C (189 °F).
The intake manifold air temperature is greater than 72 °C (162 °F) while the boost pressure is greater than 70 kPa (10 psi).
The "Fan with Engine Retarder in High Mode" is programmed to "YES" and the retarder has been on at least two seconds.
The "A/C Switch Fan On-Time" is programmed to a value above 0 and the A/C high pressure switch is Open.
The manual fan override switch is on.
If you do not notice any of these conditions occurring, one of the items above may be faulty and causing the fan to stay on. For example, you could have a faulty AC high pressure switch, manual over ride switch, or the wiring to one of these items could also be faulty. The tough part is if one of these is faulty, there will not be a check engine light or fault code.
The best way to determine what is causing the engine fan to stay on is to connect a service tool like Cat ET software and monitor the fan and all of the switches that are connected to it. If one of the above is keeping the fan on, it will be easy to see. For example, if you have a bad AC high pressure switch, it will say that the AC switch is wanting the fan on.
If nothing can be seen with the service tool, you most likely have a faulty fan control solenoid, fan hub, or broken fan control wire that runs from the engine ECM. It is on pin 11. Basically, the ECM sends out 12 volts on pin 11 whenever the ECM wants the fan off. When the ECM wants the fan on, it removes the 12 volts from pin 11.
If your fan is on and you have NO POWER coming out of pin 11, one of the items I first mentioned is making the ECM want to keep the fan ON.
If your fan is on and you have POWER coming out of pin 11, you have a faulty fan control solenoid, fan hub, or broken fan control wire.
Please reply back if you need more help or have more questions. I am happy to assist.