Machine check trap when write ETIMER registers in User mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Machine check trap when write ETIMER registers in User mode

Jump to solution
559 Views
phuong_nguyenle
Contributor II

I'm using MPC5744C for my project. Currently, I'm trying to write data to ETIMER in user mode:

        ETIMER_0.CH[0].CNTR.R = 1000; //My code

But Machine trap is fired (status is below pic):

pastedImage_3.png

I turned off all MPU mechanism and check AIPS configuration and it is OK. But Trap still happen.

So, Can you help me to find out trap's source?

Which reason can fired this trap?

Thanks!

0 Kudos
1 Solution
517 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

did you also enable User access in the Register Protection module? Set UAA bit of REG_PROT_GCR resister.

Below macro can be used

#define REGPROT_GCR 0x3FFC

#define USER_ACCESS_ALLOWED(modulebaseaddress) (*(volatile uint32_t*)((uint32_t)modulebaseaddress+REGPROT_GCR)|=(uint32_t)(0x00800000))

BR, Petr

View solution in original post

0 Kudos
2 Replies
517 Views
phuong_nguyenle
Contributor II

Thanks for your guide. It solved my issue

0 Kudos
518 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

did you also enable User access in the Register Protection module? Set UAA bit of REG_PROT_GCR resister.

Below macro can be used

#define REGPROT_GCR 0x3FFC

#define USER_ACCESS_ALLOWED(modulebaseaddress) (*(volatile uint32_t*)((uint32_t)modulebaseaddress+REGPROT_GCR)|=(uint32_t)(0x00800000))

BR, Petr

0 Kudos