Reading Registers in User Mode

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Registers in User Mode

239 Views
simple_xie
Contributor I

Hi All:

   I am using MPC5744P and I want to read some registers in user mode,such as XBAR、APIS and CAN. But I found that the manual description can only be read and written in supervisor mode.

   I also used REG_PROT .I found that once I use this, the program goes into machine check.

   I really hope that you can help me solve this problem.Thanks!!!

0 Kudos
2 Replies

165 Views
petervlna
NXP Employee
NXP Employee

hi,

Well, there is a good reason for such registers to be accessible only in supervisor mode.

Surely you don't want user task to cause system critical errors.

Register protection has no influence on read:

The Register Protection (REG_PROT) module offers a mechanism to protect defined memory-mapped address locations in a module under protection from being written.

 I also used REG_PROT .I found that once I use this, the program goes into machine check.

What do the program do to protected registers?

regards,

Peter

0 Kudos

165 Views
simple_xie
Contributor I

Hi,

   We just use these registers when the program in running mode and we need check the value of them in task.It's really thanks for your suggest,We decide to ignore them,because they truely can not read in user mode~

regards,

Simple

0 Kudos