AnsweredAssumed Answered

MPC5748G SEMA42 access

Question asked by Ondřej Urban on Dec 10, 2018
Latest reply on Dec 13, 2018 by Ondřej Urban



I'm trying to use shared memory on MPC5748G.

I modified the link descriptors according to examples, and also tried to implement hardware semaphores.


However, once I attempt to write to any SEMA42 register, an IVOR1 exception is triggered.


My code is following:


int main(void)


xcptn_xmpl ();

peri_clock_gating(); /*Allow clk for PIT and FlexCAN*/




SEMA42.RSTGT.W.R = 0xE200; /* IVOR1 exception thrown*/

SEMA42.RSTGT.W.R = 0x1DFF; /* Reset ALL Semaphores Gates 2nd write */

//Other code...

I must have missed something. Is any SEMA42 initialization required?


I also attempted to access the SEMA42 registers in interrupt handler, but still I received IVOR1 exception.

while(status != core_num)


/*Lock the gate*/

SEMA42.GATE[0].R = core_num + 1;//  IVOR1 exception thrown

status = SEMA42.GATE[0].R;



I believe I use supervisor mode (I didn't attempt to switch modes).

Any Ideas what am I doing wrong?



Thank you and best regards, Ondra.