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):
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!
已解决! 转到解答。
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
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