The Federal Rules of Criminal Procedure, which are codified in U.S. Code, guarantee a criminal defendant’s constitutional rights. States have their own rules of criminal procedure but all are modeled after the federal rules and cannot provide less protection than the rights guaranteed by the U.S. Constitution.
The trial judge is responsible for ensuring that the rules of criminal procedure are followed. Since a defendant has a 5th Amendment right not to incriminate himself, the trial judge must ensure that the defendant knows his constitutional rights and is exercising those rights of his own free will. (i.e. not threatened or bribed, etc.)
So, the answer to both of your questions is yes. It is both statutory law (enacted to ensure constitutional rights are afforded through state criminal procedure) and SOP.
Thanks......