AnsweredAssumed Answered

timer interrupt does not work when FRZ bit is set

Question asked by adrian onea on Jun 1, 2017
Latest reply on Jun 11, 2017 by adrian onea

I have a simple board based on S32R247. I am trying to get a timer interrupt working and I find that if PIT_0.MCR.B.FRZ is set the interrupt service routine is not called.

the way I test it is to let the program run and then pause after a while and check that the timer ticks have been incremented.

I have started with the sample code from MPC5775k. The board does not have an external oscilator so modified the code to run on the internal one. As the frequencies is 16Mhz instead of 40 everything will take 2.5 time longer as I did not modify the divider values. I have modified the interrupt vector table as well. Attached are the two files I have modified. The rest is as generated by S32DS

To put the FRZ bit in/out I uncomment/comment the following lines. I tried as a bit and as a register. I also tried in DRUN mode. same behaviour

 void timer_isr_init(void){
//PIT_0.MCR.R=0x0001; /*freeze on debug*/
//PIT_0.MCR.B.FRZ=0x0001;
PIT_0.MCR.B.MDIS = 0; /* Enable PIT */
 

Original Attachment has been moved to: main_Z4.c.zip

Original Attachment has been moved to: intc_SW_mode_isr_vectors_S32R274.c.zip

Outcomes