Machine check trap when write ETIMER registers in User mode

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

Machine check trap when write ETIMER registers in User mode

跳至解决方案
592 次查看
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 项奖励
1 解答
550 次查看
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 项奖励
2 回复数
550 次查看
phuong_nguyenle
Contributor II

Thanks for your guide. It solved my issue

0 项奖励
551 次查看
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 项奖励