As I understand it, under US criminal law, a defendant may decline to testify in their own trial.
Suppose a defendant elects to testify in their own trial but decides that it is no longer in their best interest to continue. Can they leave the witness box at a whim. For example mid-question by either defence or prosecution. Could they perhaps say to the judge, "I no longer wish to testify, may I step down?" and the judge allow this?
Conversely, if the trial is going badly and, at the last moment, they decide that they do want to testify in order to bolster their position, can they request this and it be granted, even at the last minute?
Are there any precedents for these actions by a defendant?