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

how to change beacon data when push the button with Sleep mode?

[SDK 12.3.0 / nrf52 DK / Keil tool / beacon example code]

Hello. i am a novice developer.

  1. Power On - Beacon data transmit and enter to sleep mode after 10 sec
  2. Button_1 Push - Beacon data Change and transmit(after 10 Sec, go to sleep)
  3. Button_2 Push - Beacon data Change and transmit(after 10 Sec, go to sleep)

I want to amke a this beacon system so add to this code.

void in_pin_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action){
			advertising_stop();
			m_beacon_info[8] = 0x11; // random data
			advertising_init();
			advertising_start();  }

this code is working but i added the code for enter to sleep mode on main() and it did not work.

for (;; )
{
 __WFE();
        __SEV();
        __WFE();
      //  power_manage();
}

plz give the answer. and what is the problem?

thanks.

Related