Download nRF51822_422_Eval_Kit User Guide.fm

Transcript
nRF51822 Evaluation Kit User Guide v1.2
6.2.2
Shared call stack
The user application shares the call stack with the SoftDevice if the SoftDevice is loaded on the chip. The
application must reserve enough memory for both itself and the SoftDevice in the call stack. The call stack
size required by the SoftDevice varies between devices and protocol stack versions, and is supplied in the
S110 SoftDevice Specification.
The user application sets its call stack size plus the amount needed by the SoftDevice. It then writes the
stack pointer at the first address of the application Reset Vector.
Note: Using Keil with the ARMCC toolchain, the call-stack size can be set using the Stack_Size
definitions in your projects startup file, typically arm_startup_nrf51.s.
Stack_Size
EQU
call-stack size
AREA
Stack_Mem
SPACE
__initial_sp
0x400 ; The application call-stack size + protocol
STACK, NOINIT, READWRITE, ALIGN=3
Stack_Size
Page 32 of 51