If you put a command into Reported speech there are only the person and the expressions of time that have to be adapted. There is no backshift of tenses.
The form is mostly: form of to tell + to + infinitive.
|Affirmative commands||Negative commands|
|Father: "Do your homework."||Teacher. "Don't talk to your neighbour."|
|Father told me to do my homework.||The teacher told me not to talk to my neighbour.|