如主旨所提
使用multi_role sample code
簡單加上SPI_init();
透過手機APP對CC2640 Launchxl pad做連線後發生以下error
>>>STACK ASSERT
***ERROR***
>> DEFAULT SPINLOCK!
修改的代碼如下….
#include <ti/drivers/GPIO.h>
#include <ti/drivers/SPI.h>
…..
…..
static void multi_role_init(void)
{
// ******************************************************************
// N0 STACK API CALLS CAN OCCUR BEFORE THIS CALL TO ICall_registerApp
// ******************************************************************
// Register the current thread as an ICall dispatcher application
// so that the application can send and receive messages.
ICall_registerApp(&selfEntity, &syncEvent);
Display_init();
GPIO_init();
SPI_init();
…..
}
Viki Shi:
怀疑是内存不足引起的,建议加大heap size试试。另外推荐按照下面文档排查内存是否出现问题:
software-dl.ti.com/…/ble-memory_problems.html
edson yen64:
回复 Viki Shi:
想請教SPI_init/SPI_Open/SPI_transfer能直接放在應用層做使用嗎?~比方說放在multi_role.c 內的static void multi_role_init(void) ……做執行