AnsweredAssumed Answered

K60FN1M0VLQ SysTick Generation Question

Question asked by Henry Nguyen on Jan 12, 2017
Latest reply on Jan 12, 2017 by Kerry Zhou

Hello,

 

I can generate the vector mapping for NMI, supervisor call, INT pending interrupt in Vector.c from PE by checking on the appropriate interrupt tab, and then the Event.c has the hook for user to fill in the required function.  This works quite nice from PE.

e.g.

Vector.c file

__attribute__ ((section (".vectortable"))) const tVectorTable __vect_table = { /* Interrupt vector table */

/* ISR name No. Address Pri Name Description */
&__SP_INIT, /* 0x00 0x00000000 - ivINT_Initial_Stack_Pointer used by PE */
{
(tIsrFunc)&__thumb_startup, /* 0x01 0x00000004 - ivINT_Initial_Program_Counter used by PE */
(tIsrFunc)&Cpu_INT_NMIInterrupt, /* 0x02 0x00000008 -2 ivINT_NMI used by PE */
(tIsrFunc)&Cpu_Interrupt, /* 0x03 0x0000000C -1 ivINT_Hard_Fault unused by PE */
(tIsrFunc)&Cpu_Interrupt, /* 0x04 0x00000010 - ivINT_Mem_Manage_Fault unused by PE */
(tIsrFunc)&Cpu_Interrupt, /* 0x05 0x00000014 - ivINT_Bus_Fault unused by PE */
(tIsrFunc)&Cpu_Interrupt, /* 0x06 0x00000018 - ivINT_Usage_Fault unused by PE */
(tIsrFunc)&Cpu_Interrupt, /* 0x07 0x0000001C - ivINT_Reserved7 unused by PE */
(tIsrFunc)&Cpu_Interrupt, /* 0x08 0x00000020 - ivINT_Reserved8 unused by PE */
(tIsrFunc)&Cpu_Interrupt, /* 0x09 0x00000024 - ivINT_Reserved9 unused by PE */
(tIsrFunc)&Cpu_Interrupt, /* 0x0A 0x00000028 - ivINT_Reserved10 unused by PE */
(tIsrFunc)&Cpu_INT_SVCallInterrupt, /* 0x0B 0x0000002C 0 ivINT_SVCall used by PE */
(tIsrFunc)&Cpu_Interrupt, /* 0x0C 0x00000030 - ivINT_DebugMonitor unused by PE */
(tIsrFunc)&Cpu_Interrupt, /* 0x0D 0x00000034 - ivINT_Reserved13 unused by PE */
(tIsrFunc)&Cpu_INT_PendableSrvReqInterrupt, /* 0x0E 0x00000038 0 ivINT_PendableSrvReq used by PE */
(tIsrFunc)&Cpu_Interrupt, /* 0x0F 0x0000003C - ivINT_SysTick unused by PE */
(tIsrFunc)&Cpu_Interrupt, /* 0x10 0x00000040 - ivINT_DMA0_DMA16 unused by PE */

...

Event.c file.

void Cpu_OnNMIINT(void)
{
/* Write your code here ... */
}

void Cpu_OnSupervisorCall(void)
{
/* Write your code here ... */
}

void Cpu_OnPendableService(void)
{
/* Write your code here ... */
}

Now, i have a interrupt function to service the SysTick but i can not generate the appropriate vector table for SysTick even though the Vector.c has the hook for it:

 

(tIsrFunc)&Cpu_Interrupt, /* 0x0F 0x0000003C - ivINT_SysTick unused by PE */

 

Can you please help me on how to get PE to generate a vector table mapping in Vector.c and the call function in Event.c like the NMI, SV call, Int Pending?  

 

i hate to go back to Vector.c to modify every time we happen to generate new code just in case we change some CPU setting.

Attachment is the screen shot on PE of CPU component where i can not find the option for systick. Should i invoke a HWTimer in order to have SysTick vector configured?

 

Thanks,

Henry

Outcomes