请教CC3200 GPIO时钟频率问题
(1)CC3200 GPIO时钟频率最大能到多少?是否有设置GPIO 时钟频率的函数?
GPIO 设置为高,然后GPIO设置为低,用示波器测得GPIO翻转周期为600多KHZ,请问理论上最大能到多少?
(2) MAP_UtilsDelay API的解释为3 cycles/loop ,MAP_UtilsDelay(n) 延时函数的时间计算方法为:3*n/(80*1000000) 秒 还是 3*n * 2 / (80*1000000) 秒
谢谢。
这个手册上没有找到,一般IO的应用也不会超过500KHz吧,都是uS的应用而已。
关于MAP_UtilsDelay API函数延时计算
MAP_UtilsDelay(80000); for delay about 0.5sec
< CC3200: Delay in seconds/msec/microsecond >
In http: processors.wiki.ti.com/index.php/CC32xx_Power_Management_Framework, it said:
- Clock tick at 80 Mhz.
So MAP_Utilsdelay(8000000) may delay ~0.3sec or ~0.5sec as you mean.
But in oob example, Why MAP_UtilsDelay(8000000) is mean ~10sec?
Wait ~10 sec to check if connection to specifed AP succeeds
while(!(IS_CONNECTED(g_ulStatus)) || !(IS_IP_ACQUIRED(g_ulStatus)))
{
#ifndef SL_PLATFORM_MULTI_THREADED
_SlNonOsMainLoopTask();
#endif
MAP_UtilsDelay(8000000);
if(g_usConnectIndex >= usConnTimeout)
{
break;
}
g_usConnectIndex++;
}
"Clock tick at 80 Mhz" is correct information.
Further, in the OOB example you will find that there is a retry count and then timeout. So it means that the loop will execute usConnTimeout number of times. Hence the time it takes is actually - (usConnTimeout * MAP_UtilsDelay(8000000)). This may have been approximated and mentioned in the comment.
I am using following macro. Its not exact but close enough (at least for my application)
#define SEC_TO_LOOP(x) ((80000000/5)*x)