蓝牙优先级高,是3
另外一个任务优先级是2。无非就是一些串口和SPI操作。
两个任务各自独自运行都是好好的。 同时运行就各种问题。蓝牙搜不到。
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.
发现running sonsor这个例程里面有个Board_InitKeys这个操作,初步定位这里面的key的IO和我另外一个任务的一些IO重叠冲突了。
void Board_initKeys(keysPressedCB_t appKeyCB)
{
// Initialize KEY pins. Enable int after callback registered
hKeyPins = PIN_open(&keyPins, keyPinsCfg);
PIN_registerIntCb(hKeyPins, Board_keyCallback);
#if defined (CC2650_LAUNCHXL) || defined (CC1350_LAUNCHXL)
PIN_setConfig(hKeyPins, PIN_BM_IRQ, Board_BTN1 | PIN_IRQ_NEGEDGE);
PIN_setConfig(hKeyPins, PIN_BM_IRQ, Board_BTN2 | PIN_IRQ_NEGEDGE);
#elif defined (CC2650DK_7ID) || defined (CC1350DK_7XD)
// PIN_setConfig(hKeyPins, PIN_BM_IRQ, Board_KEY_SELECT | PIN_IRQ_NEGEDGE);
//PIN_setConfig(hKeyPins, PIN_BM_IRQ, Board_KEY_UP | PIN_IRQ_NEGEDGE);
//PIN_setConfig(hKeyPins, PIN_BM_IRQ, Board_KEY_DOWN | PIN_IRQ_NEGEDGE);
//PIN_setConfig(hKeyPins, PIN_BM_IRQ, Board_KEY_LEFT | PIN_IRQ_NEGEDGE);
//PIN_setConfig(hKeyPins, PIN_BM_IRQ, Board_KEY_RIGHT | PIN_IRQ_NEGEDGE);
#endif
#ifdef POWER_SAVING
//Enable wakeup
#if defined (CC2650_LAUNCHXL) || defined (CC1350_LAUNCHXL)
PIN_setConfig(hKeyPins, PINCC26XX_BM_WAKEUP, Board_BTN1 | PINCC26XX_WAKEUP_NEGEDGE);
PIN_setConfig(hKeyPins, PINCC26XX_BM_WAKEUP, Board_BTN2 | PINCC26XX_WAKEUP_NEGEDGE);
#elif defined (CC2650DK_7ID) || defined (CC1350DK_7XD)
//PIN_setConfig(hKeyPins, PINCC26XX_BM_WAKEUP, Board_KEY_SELECT | PINCC26XX_WAKEUP_NEGEDGE);
//PIN_setConfig(hKeyPins, PINCC26XX_BM_WAKEUP, Board_KEY_UP | PINCC26XX_WAKEUP_NEGEDGE);
//PIN_setConfig(hKeyPins, PINCC26XX_BM_WAKEUP, Board_KEY_DOWN | PINCC26XX_WAKEUP_NEGEDGE);
//PIN_setConfig(hKeyPins, PINCC26XX_BM_WAKEUP, Board_KEY_LEFT | PINCC26XX_WAKEUP_NEGEDGE);
//PIN_setConfig(hKeyPins, PINCC26XX_BM_WAKEUP, Board_KEY_RIGHT | PINCC26XX_WAKEUP_NEGEDGE);
#endif
#endif //POWER_SAVING
// Setup keycallback for keys
Util_constructClock(&keyChangeClock, Board_keyChangeHandler,
KEY_DEBOUNCE_TIMEOUT, 0, false, 0);
// Set the application callback
appKeyChangeHandler = appKeyCB;
}
1、把这个函数里面关于管教的配置的全部注释掉,还是只能搜到模块,建立连接后无法使能通知接受数据
2、直接把这个函数注释掉,可以搜到模块,建立连接后断开就再也搜不到这个模块了。