Trouble Reading the MPC5748G SEMA42 Registers

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

Trouble Reading the MPC5748G SEMA42 Registers

686 Views
proteusiv
Contributor II

Hi. I can not read the SEMA42 registers on my MPC5748G.

For example:
uint8_t val = SEMA42.GATE[0].R;
vectors to the IVOR1_Vector handler.

I have tried setting the mode to supervisor mode before reading the registers, but this does not work.  Do you know what I might be doing wrong?

Tags (3)
2 Replies

532 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

According to your description I suppose you are in user more, is it so?

Switching for user mode to supervisor must happen is ISR routine and depicted below:

pastedImage_1.png

532 Views
proteusiv
Contributor II

Thanks for your reply. I have tried calling asm("se_sc"); from my code, and then calling

e_li r5, 0xD000
mtspr 27, r5
se_rfi

in an IVOR8_Handler.

However I still jump to the IVOR1_Vector when I try to read any of the SEMA42 registers. Please can you let me know if you know what I am doing wrong.  Many thanks.

0 Kudos