This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK10, SD 110 and nRF51822 on Segger Embedded Studio slow initialization

Hi,

We have an application built using sdk10 and sd110 on a nRF51822 chip using Segger Embedded Studio. The application works but it takes to long to start.

We have bootloader + application + sd!

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**@brief Function for application main entry.
*/
int main(void) {
uint32_t err_code;
NRF_POWER->RESET = 1;
// Initialize.
app_timer_init();
app_bluetooth_ble_stack_init();
app_memory_init(); //External Memory init (SPI)
bool first_init = app_memory_system_on_first_time();
app_bluetooth_device_manager_init(first_init);
app_bluetooth_gap_params_init();
app_bluetooth_advertising_init();
app_bluetooth_services_init();
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

As we can see on my main()  after all init sequence the vibration motor vibrates two times and goes off. The motor uses PWM and the Display uses a 8bit interface (nrf_gpio...)

The problem is that after the final vibration the application takes few seconds to realy work. If I wait few seconds (around 5 seconds) every thing works fine. Touch (I2C with a RDY pin) only works after few seconds.

If I request a screen just after the app_motor_notify(INIT_MODE); (see the code bellow), the screen function works but the motor does not vibrate.

Fullscreen
1
2
app_motor_notify(INIT_MODE);
app_ui_flow_start(MAIN_SCREEN_VERTICE);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Does anyone have an idea about how to fix this slow initialization?