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

nRF52 Thingy with power profile kit

Hi, i want to connect nRF52 Thingy with nRF6707 power profile kit to measure the current acquire by thingy.

How to connect the thingy to power profile kit

And also i have one more external device with battery . i want to calculate the how much current taken by the device from that battery

battery volt                 (2.8 V - 4.2V)

Device operating volt (3V)

  • Hi Sunil

    System OFF means that the device is turned off, and nothing at all is running, which means it needs an external source to awaken the chip again. It will not wake up by a timer when it is in system OFF.

    Sleep mode is a more general term for when the nRF52 is in an idle mode, either system ON or OFF. You can read more on System ON and OFF mode in section 18.2 and 18.3 of the PS.

    Best regards,

    Simon

  • Hi Simonr,

    Let me take an example of BLE_UART code

    there

    i found  nrf_pwr_mgnt_init(); and nrf_pwr_mgmt_run();

    ret_code_t nrf_pwr_mgmt_init(void)
    {
        NRF_LOG_INFO("Init");
    
        m_shutdown_started = false;
        nrf_mtx_init(&m_sysoff_mtx);
        nrf_section_iter_init(&m_handlers_iter, &pwr_mgmt_data);
    
        PWR_MGMT_SLEEP_INIT();
        PWR_MGMT_DEBUG_PINS_INIT();
        PWR_MGMT_STANDBY_TIMEOUT_INIT();
        PWR_MGMT_CPU_USAGE_MONITOR_INIT();
    
        return PWR_MGMT_TIMER_CREATE();
    }
    
    void nrf_pwr_mgmt_run(void)
    {
        PWR_MGMT_FPU_SLEEP_PREPARE();
        PWR_MGMT_SLEEP_LOCK_ACQUIRE();
        PWR_MGMT_CPU_USAGE_MONITOR_SECTION_ENTER();
        PWR_MGMT_DEBUG_PIN_SET();
    
        // Wait for an event.
    #ifdef SOFTDEVICE_PRESENT
        if (nrf_sdh_is_enabled())
        {
            ret_code_t ret_code = sd_app_evt_wait();
            ASSERT((ret_code == NRF_SUCCESS) || (ret_code == NRF_ERROR_SOFTDEVICE_NOT_ENABLED));
            UNUSED_VARIABLE(ret_code);
        }
        else
    #endif // SOFTDEVICE_PRESENT
        {
            // Wait for an event.
            __WFE();
            // Clear the internal event register.
            __SEV();
            __WFE();
        }
    
        PWR_MGMT_DEBUG_PIN_CLEAR();
        PWR_MGMT_CPU_USAGE_MONITOR_SECTION_EXIT();
        PWR_MGMT_SLEEP_LOCK_RELEASE();
    }
    

    these function will work like "SLEEP MODE" or system is alive with low power

    i need some clarification about

    // Wait for an event.
            __WFE();
            // Clear the internal event register.
            __SEV();
            __WFE();

    and in code there is sleep mode enter, where it enable the wakeup button and doing system_off

    static void sleep_mode_enter(void)
    {
        uint32_t err_code = bsp_indication_set(BSP_INDICATE_IDLE);
        APP_ERROR_CHECK(err_code);
    
        // Prepare wakeup buttons.
        err_code = bsp_btn_ble_sleep_mode_prepare();
        APP_ERROR_CHECK(err_code);
    
        // Go to system-off mode (this function will not return; wakeup will cause a reset).
        err_code = sd_power_system_off();
        APP_ERROR_CHECK(err_code);
    }
    

    1. This is the case. entire device get into system_off and while pressing button only it will wakeup . or by analog wake up source . isn't it right?

    2. my custom application need to enter sleep mode rather than enter into system_off.

    3. I want to do counter operation to wakeup the device and also enter into sleep mode.

    is there any example related to that.

    4. is there any example related to wakeup with timer?

  • Hi Sunil

    When an application is in the _WFE(); state, it is in system ON low power mode. 

    1. When the device is in system OFF mode you need to set the wake-up conditions before you go into system OFF mode. By default, the SDK examples set the press of a button as the wake-up source, but this can be set to be, for example a timer from an external MCU or similar.

    2. If you want to enter sleep mode System ON, you can call the nrf_pwr_mgmt_run() function.

    3 & 4. You can check out our RTC example for how to set up a counter and implement that in your sleep function.

    Best regards,

    Simon

Related