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 Reply Children
Related