Other Parts Discussed in Thread: CC2640R2F
CC2540 使用Timer3或Timer4, 定时50 -500微秒中断, 示波器抓取的波形测试, 时间不稳定, 请问这是什么问题?
怎么解决?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我使用的是Down Mode, 其它模式输出异常.
#pragma vector = T3_VECTOR
__interrupt void t3_isr(void)
{
// Clears the module interrupt flag.
T3OVFIF = 0;
switch(outch)
{
case 0:
DIO16(1);
outch = 1;
T3CTL |= 0x10; //开启
break;
case 1:
outch = 2;
T3CTL |= 0x10; //开启
break;
case 2:
DIO16(0);
DIO17(1);
outch = 3;
T3CTL |= 0x10; //开启
break;
case 3:
outch = 4;
T3CTL |= 0x10; //开启
break;
case 4:
DIO17(0);
T3CTL &= ~0x10; //关闭
break;
}
// Clears the CPU interrupt flag.
T3IF = 0;
}
void timus_init(void)
{
CLKCONCMD = (CLKCONCMD & ~(0x07 << 3)); //Timer Hz = 32MHZ
T3CTL = 0x08;
T3IE = 1;
T3CTL |= 0xA0; //32分频
T3CTL |= 0x01;
T3CC0 = us / 2;
EA = 1;
}
void timerus_setstatus(uint8 flag)
{
if(flag)
{
outch = 0;
T3CTL |= 1 << 4;
}
else
{
T3CTL &= (1 << 4);
}
}您好,收到工程师回复:
CC2540 SDK有没有和 CC2640R2F SDK 中int_fast16_t Power_setDependency(uint_fast16_t resourceId); 类似功能?
我们不清楚CC2540有这样的功能。
CC2540 使用Timer3或Timer4, 定时50 -500微秒中断, 示波器抓取的波形测试, 时间不稳定, 请问这是什么问题?
在https://e2echina.ti.com/support/wireless-connectivity/bluetooth/f/bluetooth-forum/615755/cc2540-cc2540-ble-timer中的答复可能与该问题有关,BLE堆栈以最高优先级运行。因此,它可能会影响中断处理的时间。(即延迟处理中断)
您好,
BLE设计之初就是为了尽可能节省能耗,提高处理速度不是特别适合BLE。
是否可以尝试使用BLE5.0的三种不同Physical Layer,1Mbps PHY、2Mbps PHY和coded PHY,PHY的使用会直接影响可以实现的最大数据吞吐量,也可能会对处理速度有所提高。
我们还找到了如下内容您可以参考:https://blog.csdn.net/wenshifang/article/details/109080742