Hello
I know that ERET (exception return) and change of CPSR.M can be used for switching mode from high to low. Which way is recommended and why ?
BR, Grace
Hi Martin
Thanks for your reply. Is there any reason for the recommendation ?
I'd argue it's cleaner. Typically you want to keep privileged vs non-privileged code separate, and have different permissions applied to each. An exception return instruction performs a change of Mode and a branch. That allows you to cleanly switch between running privileged code from a higher privileged Exception level to running unprivileged/less-privileged code from a less privileged Exception level.