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

sd_app_evt_wait state hardware characteristic

Hi

I am developing nRF52832 wake up solution using LF (Low Frequency).

Initially, I develope it without sd_app_evt_wait . After that, I am used sd_app_evt_wait to reduce current consumption.

When I use sd_app_evt_wait, LF range becomes shorter.

Looking at the oscilloscope, if hi_accuracy of GPIOTE_CONFIG is true, LF reception waveform is not generated, if false, waveform is generated. (At a certain distance)

So, I think the internal hardware status of nrf52832 differs by sd_app_evt_wait.

  nrf_drv_gpiote_out_uninit(LFDataPort);

  nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(false orf true);//GPIOTE_CONFIG_IN_SENSE_HITOLO(true);//GPIOTE_CONFIG_IN_SENSE_LOTOHI(true);
  //in_config.pull = NRF_GPIO_PIN_NOPULL;
  in_config.pull = NRF_GPIO_PIN_PULLUP;

  err_code=nrf_drv_gpiote_in_init(LFDataPort, &in_config, LF_Input);

  //app_uart_put(err_code);
  
  nrf_drv_gpiote_in_event_enable(LFDataPort, true);

The above code is my gpiote setting. (nRF52832, SD13.0.0, SDK12.1.0)

In addition, sd_app_evt_wait must be called twice to enter low-power mode.

for (;; )
{      
  if(sleep_flag)
  {
    sleep_flag = 0;
    //Mcp2030Init();
    nrf_gpio_pin_set(17);  
   
    err_code=sd_app_evt_wait();
    err_code=sd_app_evt_wait();
  }
}

For reference, I am using mcp2030 chip to use LF. And twi communication is done using gpio for config of mcp2030 chip. (making twi communication by gpio)

Thank you for reading the inexperienced question in English.

I wait for your answer. Thank you!

Parents
    1. When I use sd_app_evt_wait, LF range becomes shorter: Given the point above this is strange. sd_app_evt_wait() powers down the CPU and HF clock. So if interference from the HF clock is the problem your LF sensor should perform better when you put the device to sleep with sd_app_evt_wait().

    2. I think the internal hardware status of nrf52832 differs by sd_app_evt_wait. The point of this function is to put the HW to sleep so obviously things change.

    You should check the value of all your 'err_code' variables for errors with APP_ERROR_CHECK(err_code).

Reply
    1. When I use sd_app_evt_wait, LF range becomes shorter: Given the point above this is strange. sd_app_evt_wait() powers down the CPU and HF clock. So if interference from the HF clock is the problem your LF sensor should perform better when you put the device to sleep with sd_app_evt_wait().

    2. I think the internal hardware status of nrf52832 differs by sd_app_evt_wait. The point of this function is to put the HW to sleep so obviously things change.

    You should check the value of all your 'err_code' variables for errors with APP_ERROR_CHECK(err_code).

Children
Related