Hello,
I want to put my custom board to sleep mode after writing some data through NFC and wake up from sleep through NFC. I have successfully write data through nfc. To wake up from system off mode I have referred https://devzone.nordicsemi.com/f/nordic-q-a/25712/sending-via-nfc-after-nfc-wake-up-on-sd132 and wake_up_nfc example from sdk library. I have used SDK 15.2.0 and softdevice s132 V6.1.0. My custom board went to sleep mode but it didn't wake up from sleep when i kept nfc reader(SmartPhone) near to custom board.
my snippet of code as follows. This is not complete code.
void nfc_init() { uint32_t err_code; /* Initialize FDS. */ err_code = ndef_file_setup(); APP_ERROR_CHECK(err_code); /* Set up NFC */ err_code = nfc_t4t_setup(nfc_callback, NULL); APP_ERROR_CHECK(err_code); /* Run Read-Write mode for Type 4 Tag platform */ err_code = nfc_t4t_ndef_rwpayload_set(m_ndef_msg_buf, sizeof(m_ndef_msg_buf)); APP_ERROR_CHECK(err_code); /* Start sensing NFC field */ err_code = nfc_t4t_emulation_start(); APP_ERROR_CHECK(err_code); } static void initial_setup(void) { // Initialize. uint32_t err_code; // Initialize NFC nfc_init(); //read data from fds ndef_file_read(); ble_stack_init(); gap_params_init(); timers_init(); power_management_init(); advertising_update(); timers_start(); // Start execution. advertising_start(); } main() { initial_setup(); for (;; ) { if (m_system_off_mode_on) { m_system_off_mode_on = false; // Set NFC as wake up Source NRF_NFCT->TASKS_SENSE = 1; nrf_delay_ms(100); // Enter System OFF mode. sd_power_system_off(); } idle_state_handle(); // power_manage(); } }
Thanks in Advance