SAN DIEGO (AP) — A homeless man charged with beating an El Cajon police officer unconscious has pleaded not guilty to attempted murder, robbery and drug charges.

Daniel Moses Cook entered pleas Thursday.

Police say Cook was high on methamphetamine when he allegedly robbed a Dollar Tree store on Monday and then stole soda at a KFC restaurant.

Police say when Officer Jose Sioson arrived to investigate, Cook knocked him down and kept punching him after he lost consciousness.

A bus driver used the officer's radio to call for help.

Cook was later found, subdued with a Taser and arrested.

Sioson, a 28-year law enforcement veteran, is recovering at home.

Cook, who has previous convictions for violent crimes, recently was released from prison.

He could face 62 years to life in prison if convicted.