Machine check trap when write ETIMER registers in User mode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Machine check trap when write ETIMER registers in User mode

ソリューションへジャンプ
589件の閲覧回数
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 解決策
547件の閲覧回数
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 返答(返信)
547件の閲覧回数
phuong_nguyenle
Contributor II

Thanks for your guide. It solved my issue

0 件の賞賛
548件の閲覧回数
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 件の賞賛