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.

cc2640使用PIN_open这个函数就卡死

最近我使用了ble_sdk_2_02_02_25这个版本的SDK,使用PIN_open这个函数的时候发现程序总是卡死这个函数里面,编译的时候没有报错,而且我也排除了重复使用同一个引脚的可能;但是以前使用旧版本的sdk调用这个函数是没有任何问题的。希望各位帮我看一看怎么回事,谢谢。

程序如下:

#define LED IOID_8
static PIN_State ledPins;
static PIN_Handle hledPins = NULL;
PIN_Config ledPinsCfg[] =
{
LED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX,
PIN_TERMINATE
};

void led_flash(int count, int time)
{
if(hledPins == NULL)
{
hledPins = PIN_open(&ledPins, ledPinsCfg);
}
for(int i = 0; i < count; i ++)
{
PIN_setOutputValue(hledPins, LED, 1);
Task_sleep(time*1000/Clock_tickPeriod);
PIN_setOutputValue(hledPins, LED, 0);
Task_sleep(time*1000/Clock_tickPeriod);
}

}