请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
部件号:TMS570LS3137 您好,
我想使用 两 个 RTI 通知比较。 但是,只有当“比较期间0”达到指定值(30000)时,它才会中断。 “比较期间1”(1000)不起作用。
随后,我附上了 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.
}
}
谢谢,此致,
莱安德罗