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.
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:
I cannot add the ISR with an InterruptVector component, as it complains that there is a conflict:
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.
Solved! Go to Solution.
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:
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:
This will take care of resetting the interrupt flags/etc. Much easier
I hope this helps,
Erich
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:
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:
This will take care of resetting the interrupt flags/etc. Much easier
I hope this helps,
Erich
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.