They don't always need to go bad to trigger a light.
You could have something like a plugged catalytic convertor. Bad turbo. Gas leak. Plugged air filter. Bad tires. Poor quality gas. Not all stations give the same results. I get 3 miles less with costco over chevron.
How's the oil?
I tried the free dealer oil change and my mileage dropped from 36 to 28.
It's more then likely not the ecm. It's a problem somewhere else.
I've got only 15k miles on it. Averaging 17MPG. This started after a front end collison repair. Changed plugs, engine oil & filter, air filters I have good tires and I use premium fuel...had my mechanic check and they can't figure out what's wrong with it as everything seems intact. I was thinking resetting ECM may help.