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?
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:
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.