Hello,
I want to use two RTI notification compare. However, It only interrupts when the 'compare period 0' reaches the specified value (30000). The 'compare period 1' (1000) does not work.
Following, I attach the code of rtiNotification.
void rtiNotification(uint32 notification)
{
uint8_t i,j;
uint16 A2 = 0x00, A1 = 0x00, A0 = 0x00;
uint8 exTime0 = 0, exTime1 = 0;
switch (notification)
{
case rtiNOTIFICATION_COMPARE0:
/* enter user code between the USER CODE BEGIN and USER CODE END. */
/* Toggle HET pin 15 */
gioSetBit(hetPORT1, 15, 1); //0x00100000
gioSetBit(hetPORT1, 20, 1); //0x00100000
for(i = 0; i<10; i++){for(j = 0; j<10; j++){}} // It defines the pulse width
gioSetBit(hetPORT1, 15, 0); //0x00000000
gioSetBit(hetPORT1, 20, 0); //0x00100000
break;
case rtiNOTIFICATION_COMPARE1:
exTime0++;
if(255 < exTime0)
{
exTime0 = 0;
exTime1++;
writeCY15B(A2, A1, (A0+1), exTime1, 0, true); //Write in an external FRAM direction.
}
writeCY15B(A2, A1, A0, exTime0, 0, true); //Write in an external FRAM direction.
}
}
Thanks and regards,
Leandro