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.

LAUNCHXL-CC2640R2: program gets stuck in GATT_Notification

Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: CC2640R2F

Hello,

I am using simple_peripheral on cc2640r2f. I tried to send notifications to Master but application was getting stop suddenly. While debugging i came to know that while sending the notification when the program enter 

to following section :

if (GATT_Notification(connHandle, &noti, FALSE) != SUCCESS)
 {
     GATT_bm_free((gattMsg_t *)&noti, ATT_HANDLE_VALUE_NOTI);
 }

if does not come back from the GATT_Notification function. During debugging i step in to it GATT_Notification. The program get stuck in section as shown below in figure:

The debugging log show the following at messages:

Tue Oct 24, 2017 11:49:43: The stack pointer for stack 'CSTACK' (currently 0x20001DB8) is outside the stack range (0x20003B70 to 0x20003F70)
Tue Oct 24, 2017 11:49:49: The stack pointer for stack 'CSTACK' (currently 0x20001D98) is outside the stack range (0x20003B70 to 0x20003F70)
Tue Oct 24, 2017 11:49:51: The stack pointer for stack 'CSTACK' (currently 0x20001D98) is outside the stack range (0x20003B70 to 0x20003F70)
Tue Oct 24, 2017 11:49:51: The stack pointer for stack 'CSTACK' (currently 0x20001D98) is outside the stack range (0x20003B70 to 0x20003F70)
Tue Oct 24, 2017 11:49:52: The stack pointer for stack 'CSTACK' (currently 0x20001D98) is outside the stack range (0x20003B70 to 0x20003F70)
Tue Oct 24, 2017 11:49:54: The stack pointer for stack 'CSTACK' (currently 0x20001D90) is outside the stack range (0x20003B70 to 0x20003F70)
Tue Oct 24, 2017 11:49:54: The stack pointer for stack 'CSTACK' (currently 0x20001D90) is outside the stack range (0x20003B70 to 0x20003F70)
Tue Oct 24, 2017 11:49:55: The stack pointer for stack 'CSTACK' (currently 0x20001D90) is outside the stack range (0x20003B70 to 0x20003F70)
Tue Oct 24, 2017 11:49:56: The stack pointer for stack 'CSTACK' (currently 0x20001D90) is outside the stack range (0x20003B70 to 0x20003F70)
Tue Oct 24, 2017 11:49:57: The stack pointer for stack 'CSTACK' (currently 0x20001D90) is outside the stack range (0x20003B70 to 0x20003F70)
Tue Oct 24, 2017 11:50:03: The stack pointer for stack 'CSTACK' (currently 0x20001D90) is outside the stack range (0x20003B70 to 0x20003F70)

It means that stack is not big enough. Am i right? or is there any other issue?

How i will come to know about the stack memory required by the task ?

I am using the simple_peripheral with

 #define SBP_TASK_STACK_SIZE                   644

How much maximum stack size i can allocate to a task?

Please help me to figure it out.

I will be waiting for your kind help.

Regards

MAbbas

  • Hello MAbbas,

    Have you checked the stack utilization in the ROV? The CSTACK (Program Stack) can be checked according to procedure in Debugging section of hte BLE SW User Guide "Viewing the State of Each Task".

    Best wishes