Supervisor Mode vs Users Mode

First of all I'm using STR735

The start-up code enters the Supervisor Mode, sets up the stack pointer followed by the User Mode seting up the stack pointer; then jumps to main.

Im my application I need to disable interrupts during critical memcpy's and also during Maxim 1-wire communication. This is a lengthy process in user mode but quit straight forward in supervisor mode.

My question is WHY the start-up code is entering user mode for my single user embedded processor? If I comment out switching to User Mode, what issues would I encounter? I am not using any OS.

Barry

Parents
  • EIC->ICR &= ~0x0001;
    

    should disable all IRQ interrupts. Make it ~0x0003 if you also want FIQ interrupts. That is not what I would call lengthy. (you may need to add a few NOP's if EIC is running on a slower clock than the CPU, but it is probably not)

    If you really want to you should be able to run in Supervisor Mode (Or System mode, which I beleive the STR73X has), but I don't think there is much need.

Reply
  • EIC->ICR &= ~0x0001;
    

    should disable all IRQ interrupts. Make it ~0x0003 if you also want FIQ interrupts. That is not what I would call lengthy. (you may need to add a few NOP's if EIC is running on a slower clock than the CPU, but it is probably not)

    If you really want to you should be able to run in Supervisor Mode (Or System mode, which I beleive the STR73X has), but I don't think there is much need.

Children
More questions in this forum