Timer in CTC mode to generate 1MHz pulse

That may work. I have not used inverted output.