I think Castile was just too high.
I think Castile was trying to show the ID as instructed. If he was intending to use the weapon on the cop the last thing he would have done would be to notify the police that he had a legal gun on him.