Processor Expert 10.4.0 systick ISR and vectors.c not updating

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

Processor Expert 10.4.0 systick ISR and vectors.c not updating

Jump to solution
970 Views
philquinton
Contributor II

Hi,

I hope this isn't a daft question, so here goes...

I'm using Processor Expert for Driver suite 10.4.0 on eclipse Kepler ( Linux ) and I'm trying to understand how to get vectors.c to update when I add the systick component.

Screenshot - PE - systick.png

The systick component does not auto generate the ISR but tells you that you need to implement this yourself in user code, which is fine, except vectors.c does not contain the systick ISR reference:

Screenshot - PE - vectors.png

I cannot add the ISR with an InterruptVector component, as it complains that there is a conflict:

Screenshot - PE - int.png

What is the correct way of doing this? How do I get PE to add the what I can only imagine is a &INT_SysTick entry to vectors.c? My concern is that a manual adjustment to the file will get overwritten the next time I make a change in PE.

Any advice is welcome,

Thanks,

Phil.

Tags (2)
1 Solution
559 Views
BlackNight
NXP Employee
NXP Employee

Hi Phil,

The Init_SysTick() only initializes the Systick timer. If you want you own interrupt, enable timer interrupt and provide your own ISR name:

pastedImage_0.png

This will add your name to the vector table:

(tIsrFunc)&Cpu_Interrupt,      /* 0x0E  0x00000038   -   ivINT_PendableSrvReq      unused by PE */
(tIsrFunc)&MySysTickISR,       /* 0x0F  0x0000003C   0   ivINT_SysTick             used by PE */
(tIsrFunc)&Cpu_Interrupt,      /* 0x10  0x00000040   -   ivINT_DMA0                unused by PE */

to write in your application the handler:

void MySysTickISR(void) { /* systick ISR */

   /* you need to handle everything here, e.g. reset the timer flag, etc! */

}

So you want to have the systick running, and say trigger an interrupt every 10 ms? Then an easier way is to add the TimerInt component to the project, and configure it for say 10 ms:

pastedImage_4.png

This will take care of resetting the interrupt flags/etc. Much easier

I hope this helps,

Erich

View solution in original post

2 Replies
560 Views
BlackNight
NXP Employee
NXP Employee

Hi Phil,

The Init_SysTick() only initializes the Systick timer. If you want you own interrupt, enable timer interrupt and provide your own ISR name:

pastedImage_0.png

This will add your name to the vector table:

(tIsrFunc)&Cpu_Interrupt,      /* 0x0E  0x00000038   -   ivINT_PendableSrvReq      unused by PE */
(tIsrFunc)&MySysTickISR,       /* 0x0F  0x0000003C   0   ivINT_SysTick             used by PE */
(tIsrFunc)&Cpu_Interrupt,      /* 0x10  0x00000040   -   ivINT_DMA0                unused by PE */

to write in your application the handler:

void MySysTickISR(void) { /* systick ISR */

   /* you need to handle everything here, e.g. reset the timer flag, etc! */

}

So you want to have the systick running, and say trigger an interrupt every 10 ms? Then an easier way is to add the TimerInt component to the project, and configure it for say 10 ms:

pastedImage_4.png

This will take care of resetting the interrupt flags/etc. Much easier

I hope this helps,

Erich

559 Views
philquinton
Contributor II

Erich,

Thanks for the reply. Yes that helped. For anyone else who might stumble across this thread, you cannot have BOTH the systick and a TimerInt component (configured for systick) at the same time. They both clash. I recommend following Erich's advice above and just configure a TimerInt component configured to trigger on SYST_RVR ( systick ).

Thanks,

Phil.

0 Kudos