Can not using function contain while loop in setup

Hi, I'm facing an weird problem when I use an function that is contain while loop

void GPS_init_usingWhile(char* configCommand, char *expectedResponse) {
    NRF_LOG_INFO("call GPS init using while");
    while(1){
        NRF_LOG_INFO("in while loop");
    }
}

int main(void){
 
  bool erase_bonds;
  log_init();
  NRF_LOG_INFO("Debug logging for UART over RTT started.");
  timers_init();
  timer_uarte_init();
  uarte_init();
  app_timer_start(m_app_timer_id, CONFIG_UART_INTERVAL, NULL);
  buttons_leds_init(&erase_bonds);
  power_management_init();
  ble_stack_init();
  gap_params_init();
  gatt_init();
  services_init();
  advertising_init();
  conn_params_init();
  advertising_start();

  ret_code_t err_code;
  app_pwm_config_t pwm1_cfg = APP_PWM_DEFAULT_CONFIG_1CH(500, LED_2);
  pwm1_cfg.pin_polarity[1] = APP_PWM_POLARITY_ACTIVE_HIGH;
  err_code = app_pwm_init(&PWM1, &pwm1_cfg, pwm_ready_callback);
  APP_ERROR_CHECK(err_code);
  app_pwm_enable(&PWM1);
  firstInit = true;
  uarteInit_status = true;
  uarteUninit_status = false;
  firstUninit = false;
  timerTimeout_flag = false;
  //GPS_init_usingWhile(GPS_RMC,RMC_response);

  for (;;) {
    idle_state_handle();
    }
}

When I uncommented the 35th line => call GPS_init_usingWhile(GPS_RMC,RMC_response);  => here is my debug terminal

Here is when I commented the 35th => don't call GPS_init_usingWhile(GPS_RMC,RMC_response); => here is my debug terminal

=> so why I can not call the while loop GPS_init_usingWhile(GPS_RMC,RMC_response) ???

Parents Reply Children
No Data
Related