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

Problem about power cycle on/off test for mesh communication on NRF52832

Test environment:

Mesh SDK: V2.2.0 example ‘proxy server and ‘serial’

Development kit:PCA10040

Computer: Window 7(X86)

Other tool : Power supply

 

Test Description:

  1. Base on the simple onoff example, we modify it’s to received the serial command the reply one message. That is, we’ve change the simple onoff model to a message communication model.
  2. The serial send command in period and the server supply power by Power supply at the same time. We make the Power supply to supply power in 30 sec then power off it in 5 sec to do a stress test (we need to test the stability of the chip). From the test result we can know that the server will break down after 5 hours test with it.
  3. I’ve checked this problem for two weeks then I figure out the reason why it can’t work after 5 hours test. It seems like that the net_state flash pages has been full written but never recover by it self. Base on this guess, I try to erase the net state flash page by the command line “nrfjprog.exe --erasepage 0x7E000”, it can work again.
  4. With the conclusion on the test result, I search the document about the flash manager and Defragmentation, which say that the flash manager can handle circuit power loss at any time without loss of data.
  5. /**
     * Checks if a defrag was interrupted by a power cycle, and continues where it left off.
     *
     * @returns Whether there's a defrag in progress.
     */
    static bool recover_defrag_progress(void)
    {
        if (mp_recovery_area->p_storage_page != NULL &&
            mp_recovery_area->p_storage_page != (void *) BLANK_FLASH_WORD &&
            IS_PAGE_ALIGNED(mp_recovery_area->p_storage_page))
        {
            m_defrag.p_storage_page = mp_recovery_area->p_storage_page;
            m_defrag.wait_for_idle = false;
            m_defrag.found_all_entries = false;
            m_defrag.state = DEFRAG_STATE_PROCESSING;
            m_defrag.p_manager = NULL; /* Can't know which manager this is. */
            jump_to_step(DEFRAG_RECOVER_STEP);
            mesh_flash_user_callback_set(FLASH_MANAGER_FLASH_USER, on_flash_op_end);
            execute_procedure_step();
            return true;
        }
        else
        {
            return false;
        }
    }
    

But from our test result, it look like that the Defragmentation doesn’t work.

 

In a word, I suspect that the flash manager result in the problem above.Then what should I do to dill with this problem, anyone can give me some suggest?

Best regards!

Related