Other Parts Discussed in Thread: CC3135
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.
您好,
根据您的描述,似乎添加外部中断程序会按照您的设计进行。
然而在sl_start函数中,程序在等待一个信号量释放,但对于释放该信号量的操作却没有调用,导致程序陷入了死锁或无法执行的状态。
以下是一些建议:
1.检查代码中关于信号量的部分,确保信号量的等待和释放操作是正确的,没有遗漏或者错误。
2.确认信号量何时被获取、使用和释放。确保没有在获取信号量后忘记释放它。
3.确认信号量的释放操作是否被调用,尤其是sl_SyncObjSignal和sl_SyncObjSignalFromIRQ。
您好。我重新梳理了一下,根据您提供的信息,代码运行后出现了死锁的状态,sl_start函数无法正常返回,因为它在等待一个信号量释放。
我将我的建议稍微细化一下,希望能给您一点帮助。
sl_Start是用来打开NWP的,若没有回调函数它应该是阻塞的;若有InitCallBack,它将立即返回。
Sl_Start – This function initializes the communication interface, sets the enable pin of the device, and calls
to the init complete callback. If no callback function is provided, the function is blocking until the device
finishes the initialization process.
_i16 sl_Start(const void* pIfHdl, _i8* pDevName, const P_INIT_CALLBACK pInitCallBack);
所以您可以重点检查一下你是否在 sl_start 提供了回调函数。