i came across the Processor Modes of the RX62.
I was wondering, what the Usecase of the UserMode and Supervisor Mode is? Of cource I understand the different access rights, but how is the recommendation to use it, is it a problem to use the Supervisor Mode in general?
We use no RTOS, just a normal programm execution with some different Interrupt levels. There is now one resource, which will be used by different priority levels. The idea is to define a critical section around the critical code and for that a change of the PSW.IPL could be used, which is only writable in Supervisor Mode. So I would use that mode in general to avoid a switching of the mode all the time.
Any recommendations about that?
The majority of RX systems are run in SupervisorMode...the MPU access rights and a few instructions are cases were mode matters.
In reply to Benjamin:
In reply to Mike Clements:
If you set up user mode correctly and use the memory protection registers as well then debugging problems will be much easier in user mode as you can more easily spot null pointers and other illegal accesses. If you use the MPU to control different accesses to you memory (not executing from data for instance) you can safely handle program runaway. If you are less bothered about this and its not a particularly safety critical system then running is supervisor mode should be just fine. Paul