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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,104 次查看
josephxavier
Contributor III

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 );"

0 项奖励
回复
1 解答
934 次查看
DavidS
NXP Employee
NXP Employee

Hi Joseph,

MQX defaults to privileged mode for all threads.

Please review: C:\Freescale\Freescale_MQX_4_1_1\doc\mqx\MQX_User_Guide.pdf  Section 3.12 User Mode Tasks and Memory Protection should you want to change this default setting.

Regards,

David

在原帖中查看解决方案

0 项奖励
回复
1 回复
935 次查看
DavidS
NXP Employee
NXP Employee

Hi Joseph,

MQX defaults to privileged mode for all threads.

Please review: C:\Freescale\Freescale_MQX_4_1_1\doc\mqx\MQX_User_Guide.pdf  Section 3.12 User Mode Tasks and Memory Protection should you want to change this default setting.

Regards,

David

0 项奖励
回复