Other Parts Discussed in Thread: HALCOGEN
Hi all,
I have to generate timer interrupt at every 1 sec using TMS570LS1224
Actually I tried but I did not understand that where I have to write ISR.
Below is my code
int main(void)
{
/* USER CODE BEGIN (3) */
//INITIALIZE TMS570LS1224
systemInit();
gioInit();
sciInit();
rtiInit();
sciSetBaudrate(sciREG, 1000000);
vimInit();
// _enable_IRQ();
gioSetDirection(hetPORT1, 0x00000000);
rtiSetPeriod(rtiCOUNTER_BLOCK0, 100000);
rtiEnableNotification(rtiNOTIFICATION_COMPARE0);
rtiStopCounter(rtiCOUNTER_BLOCK0);
rtiResetCounter(rtiCOUNTER_BLOCK0);
rtiStartCounter(rtiCOUNTER_BLOCK0);
/* Enable IRQ - Clear I flag in CPS register */
/* Note: This is usually done by the OS or in an svc dispatcher */
_enable_interrupt_();
while(1);
/* USER CODE END */
return 0;
}
/* USER CODE BEGIN (4) */
void rtiNotification( rtiNOTIFICATION_COMPARE0)
{
}
(1) Will ISR be written in void rtiNotification( rtiNOTIFICATION_COMPARE0) I
if yes than how did we can clear interrupt flag in ISR so that new interrupt can be generate
when I try to write ISR in void rtiNotification( rtiNOTIFICATION_COMPARE0) function I am getting error
"../source/sys_main.c", line 192: error #80: expected a type specifier
"../source/sys_main.c", line 192: error #142-D: unnamed prototyped parameters not allowed when body is present
2 errors detected in the compilation of "../source/sys_main.c".
Thanks






