RX Processor Modes

Hi,

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.

  • This kind of got forgotten, sorry about that...
    Had a lot other stuff to do and we first didnt touch it, but now its on the table again.

    So it would not be a probem or big risk to run the system in supervisor mode? Of course an modify of mode-protected registers without knowing what you do would be bad. But if noone touches the registers, there is no problem I guess.
    Im still not sure if there are maybe side effects if we run in supervisor mode...
    Some experience reports would be great
  • In reply to Benjamin:

    Benjamin,

    Has your questtion been answered?

    Mike Clements
    RenesasRulz Moderator
  • In reply to Mike Clements:

    No, no one answered my question.
  • In reply to Benjamin:

    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