AnsweredAssumed Answered

In MQX  are all the threads in privileged  mode ? or do we need to enable them in privilege mode

Question asked by josephxavier on May 28, 2015
Latest reply on May 28, 2015 by David E Seymour

In MQX  are all the threads in privileged  mode ? or do we need to enable them in privileged mode using the following steps

 

#define THREAD_PRIVILEGED                (0ul << 0)

#define THREAD_UNPRIVILEGED              (1ul << 0)

 

#define TSTACK_MAIN                     (0ul << 1)

#define TSTACK_PROCESS                  (1ul << 1)

__set_PSP(__get_MSP());

     
__set_CONTROL(THREAD_PRIVILEGED| TSTACK_PROCESS);

 

 

Before " _mqx( (MQX_INITIALIZATION_STRUCT_PTR)&MQX_init_struct );"

Outcomes