sounds like a power loss to ecu or a bad ecu.
with key on the check engine light should be on until still. I think flashing signals something in codes or history delete, something like that, but with the key on, you have communication if it lights up.
If the light is out on key on, then the ecu is either not powering up or the ecu is bad.