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
  • There is a lot of things that don't make sense here. The first thing that comes to mind though, is that the HF clock is somehow interfering with your LF sensor.

    1. Let us start with this: if hi_accuracy of GPIOTE_CONFIG is true, LF reception waveform is not generated,: If you turn on high accuracy the HF clock is left running so that the GPIOTE can register and process the input event right away and not having to wait for the clock to start. So it could be the HF clock interferes with your LF sensor. Is your system otherwise working as intended? Is it possible that you just have a bug in your code that stops the LF sensor to even be initialized?
Reply
  • There is a lot of things that don't make sense here. The first thing that comes to mind though, is that the HF clock is somehow interfering with your LF sensor.

    1. Let us start with this: if hi_accuracy of GPIOTE_CONFIG is true, LF reception waveform is not generated,: If you turn on high accuracy the HF clock is left running so that the GPIOTE can register and process the input event right away and not having to wait for the clock to start. So it could be the HF clock interferes with your LF sensor. Is your system otherwise working as intended? Is it possible that you just have a bug in your code that stops the LF sensor to even be initialized?
Children
No Data
Related