TI中文支持网
TI专业的中文技术问题搜集分享网站

C5517如何实现1us的延时

目前我使用TMS320C5517的定时器定了一个2.5us周期中断,2.5us后我进去中断将某个GPIO拉高,但是在这2.5us内,我需要在1us的时候将GPIO再拉低。目前想着是在定时器中断函数内部拉高GPIO后延时1us再拉低GPIO。但是目前不清楚该如何实现延时1us 。使用for循环的话,时间好像远大于2.5us。想使用nop,但是好像不支持这个指令。请问该怎么实现。  (其实这个问题类似如何调整信号的占空比)

Nancy Wang:

支持NOP。
www.ti.com/…/spru280i.pdf
实现方法可参考:
e2e.ti.com/…/277456

user5213382:

回复 Nancy Wang:

Only labels and comments may begin in the first column. Make surethat the label name is not a reserved keyword.NOP
编译提示这个,好像不识别NOP

user5213382:

回复 Nancy Wang:

interrupt void gpt0Isr(void)
{IRQ_clear(TINT_EVENT);/* Clear Timer Interrupt Aggregation Flag Register (TIAFR) */CSL_SYSCTRL_REGS->TIAFR = 0x01;GPIO_write(hGpio, CSL_GPIO_PIN13, 1);
//asm("rpt#32000");asm("NOP");GPIO_write(hGpio, CSL_GPIO_PIN13,0);
}
我在定时器中断内部写的,但是提示Only labels and comments may begin in the first column. Make surethat the label name is not a reserved keyword.NOP

赞(0)
未经允许不得转载:TI中文支持网 » C5517如何实现1us的延时
分享到: 更多 (0)