2017-08-10 01:54 AM
Hello!
I made new project only using SPC560Bxx Platform Component in SPC5 studio.
When I add OSAL component, Interrupt does work well.At present, I am trying to enable interrupt without OSAL and any HAL component. But it doesn't work.How do I enable interrupt without the OSAL and any HAL component?Note : ivor.s copy my project folder.
My code is as below.
[Vector.c]
const dword u32_IsrVectorTable_SW_Table[] =
{ ( dword )&Cpu_Interrupt, ( dword )&Cpu_Interrupt, /* ISRs 000 - 001 */ ... ( dword )&STM_Ch0_ISR, ( dword )&Cpu_Interrupt, /* ISRs 030 - 031 */...
( dword )&ADC_Ch0_ISR, ( dword )&Cpu_Interrupt, /* ISRs 062 - 063 */
...
}
[main.c]
void INTC_Init ( void )
{ INTC.MCR.R = 0; INTC.CPR.R = 0; INTC.IACKR.R = ( dword )&u32_IsrVectorTable_SW_Table[ 0 ];return;
}int main ( void )
{...
INTC_Init();
asm('wrteei 1');
for(;;) { .... }return ( ERR_OK );
}Thank you!2017-08-11 01:36 AM
Hello ,
I do not see your ivor.s of your project
Anyway , you can use our ivor.s like inspiration
you have to create a sort of prolog to create the stack frame (Save the context)
and an epilog (Restore the context)
Best regards
Erwan
________________ Attachments : ivor.s : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyWM&d=%2Fa%2F0X0000000b8y%2F1i8GmT10YAId6zh.BqyRwDTxTpbwCgpXHtLcvuK0K.8&asPdf=false2017-08-15 07:49 PM
Hello!
Thank you for your reply.
I attached ivor.s file and my vector file
ivor.s file is copy from SPC5 studio.
Could you provide me example code about the interrupt enable that don't using OSAL and HAL component with my vector table?
2017-08-22 04:20 AM
Hello Hank ,
We have no example on SPC5Studio (without OSAL (HAL))
you have to create your project from scratch
RLA could be a good compromise for you.
Best regards
Erwan