The problem i having seems to be tricky and i spent hours trying to figure out whats happening.
So, i will try to put all details possible. Im two days with this issue and i cant go past it.
Im developing in a nRF52810 in a MS50SFB2 module from minew (just some minimal parts like oscilators caps and resistors in the board).
Also nRF5_SDK_17.1.0_ddde560 (already tried the 15.3) and segger studio 6.30 on windows 10.
I tried to start the BLE and it seems to be impossible because of some wierd error that keeps happening. At this point i belive its some configuration missing and i hope someone here can give me a light on whats happening, preety please? <3
So, i just got the example in: ble_app_blinky\pca10040e\s112\ses open and tried to upload. So far so good it compiled but i had to remove SEGGER_RTT_Syscalls_SES.c.
Thats the only change i made.
When i try to debug, i keep getting the same crash:
The code is:
err_code = sd_ble_gap_device_name_set(&sec_mode,
(const uint8_t *)DEVICE_NAME,
strlen(DEVICE_NAME));
APP_ERROR_CHECK(err_code);
I kept like, 8 hours trying to change defines, looking for simuilar errors, combinations of DEVICE_NAME... Nothing!
Then i decided to move to another thing (twi), and when i came back, i started to get the same error in a few line bellow:
err_code = sd_ble_gap_ppcp_set(&gap_conn_params);
APP_ERROR_CHECK(err_code);
Just to put here the whole funcion:
/**@brief Function for the GAP initialization.
*
* @details This function sets up all the necessary GAP (Generic Access Profile) parameters of the
* device including the device name, appearance, and the preferred connection parameters.
*/
static void gap_params_init(void)
{
ret_code_t err_code;
ble_gap_conn_params_t gap_conn_params;
ble_gap_conn_sec_mode_t sec_mode;
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode);
err_code = sd_ble_gap_device_name_set(&sec_mode,
(const uint8_t *)DEVICE_NAME,
strlen(DEVICE_NAME));
APP_ERROR_CHECK(err_code);
memset(&gap_conn_params, 0, sizeof(gap_conn_params));
gap_conn_params.min_conn_interval = MIN_CONN_INTERVAL;
gap_conn_params.max_conn_interval = MAX_CONN_INTERVAL;
gap_conn_params.slave_latency = SLAVE_LATENCY;
gap_conn_params.conn_sup_timeout = CONN_SUP_TIMEOUT;
err_code = sd_ble_gap_ppcp_set(&gap_conn_params);
APP_ERROR_CHECK(err_code);
}
What made me sure its some kind of misconfiguration is if i remove the sd_ble_gap_ppcp_set at the end of the function, i start to get the error back in the sd_ble_gap_device_name_set.
So put it simple:
- sd_ble_gap_device_name_set at line 475
- sd_ble_gap_ppcp_set at line 487
- I get an error 0x7 at sd_ble_gap_ppcp_set
- i remove the call of sd_ble_gap_ppcp_set at 487
- sd_ble_gap_device_name_set start to return error 0x7
Yes i tried any combination for parameters to the sd_ble_gap_device_name_set AND sd_ble_gap_device_name_set.
Yes i tried calling nothing but those functions alone, i get the same error.
Additional info:
Memmory Segment: FLASH1 RX 0x0 0x30000;RAM1 RWX 0x20000000 0x5FFF
Preprocessor:
APP_TIMER_V2
APP_TIMER_V2_RTC1_ENABLED
BOARD_PCA10040
CONFIG_GPIO_AS_PINRESET
FLOAT_ABI_SOFT
INITIALIZE_USER_SECTIONS
NO_VTOR_CONFIG
NRF52810_XXAA
NRF52_PAN_74
NRF_SD_BLE_API_VERSION=4
S112
SOFTDEVICE_PRESENT
Section placement macro:
FLASH_PH_START=0x0
FLASH_PH_SIZE=0x30000
RAM_PH_START=0x20000000
RAM_PH_SIZE=0x6000
FLASH_START=0x19000
FLASH_SIZE=0x17000
RAM_START=0x200026a0
RAM_SIZE=0x3960
Follows my sdk_config.h
Andd maybe its something hardware related? Here's the circuit:
(No extra components, just wires to connected directly on the gpio to read buttons and turn on LED's)