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

ON mode IDLE power >2mA

2mA in ON mode (IDLE) far too much. One timer should running to wake the device up after one minute, to take a measurement before going to sleep.

nRF51422_PS_v2.1

  • 2.6 μA at 3 V ON mode, all blocks IDLE

How do I see what peripherals are ENABLED? I am using the twi_sw_master. But I am not using the adc, or gpiote.

I have set the following to no effect. "just incase it was initized, Is there a function to read enabled peripherals?

NRF_UART0 ->ENABLE = UART_ENABLE_ENABLE_Disabled << UART_ENABLE_ENABLE_POS
NRF_TWI1->ENABLE = TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_POS

The device is not advertising. If the radios are still on, how to I force it off? The jtag is disconnected and SWDCLK is pulled low by a 12k resister.

main loop

while(1)
{
     app_sched_execute();
     power_manage();
}

The state machine is event driven from timers and on_ble_evts

I suspect something is keeping the nrf51422, nrf51822 from going idle

I am looking for a good suggestion to determine what it is, so that I may disable it and allow the nrf51422 to go idle.

I should note, direct debugging through keil is not possible because, devzone.nordicsemi.com/.../ Firmware includes nrf51422, rf51822, s110, bootloader and application. I could add a pin sense to the bootloader to create a state where the bootloader will not proceed until the pin is released. This would keep the nrf51422 from starting ble radio during loading. Is this what should be done? Is keil with jlink debugging the way to find what is keeping the nrf51422 from going idle?

Parents
  • Should I continue the question I have or open a new question.

    I am a little confused, because I am not answer my question. I am further explaining it. And the comment field does not allow full formating

    I am using TWI sw master. I am quite sure I have the TWI disabled. keil shows the twi1 and twi2 enable = 0 and power = 0

    How large should the unused TWI time be, for TWI STOP to be beneficial?

    Are referring to twi_master_transfer(address, &value,len, TWI_ISSUE_STOP) or NRF_TWI1->TASKS_STOP (I assume this is only for twi_hw_master)


    I am using RTC1 to keep track of relative time. Absolute time is not required.

    time = APP_TIMER_MILLISEC(NRF_RTC1->COUNTER, APP_TIMER_PRESCALER);
    

    I am using timers as defined in app_timer.c NRF_RTC1

    I have created disable enable functions.

    void temp_disable(void)
    {
        //not nice or polite, HARD DISABLE without checking
        //must remember to enable when needed
        NRF_TEMP->POWER = 0;
    }
    void temp_enable(void)
    {
        //must remember to enable when needed
        NRF_TEMP->POWER = 1;
    }
    
    void gpiote_disable(void)
    {
        //not nice or polite, HARD DISABLE without checking
        //must remember to enable when needed
        NRF_GPIOTE->INTENSET = 0;
        NRF_GPIOTE->POWER = 0;
    }
    
    
        void twi_master_disable(void)
        {
            //not nice or polite, HARD DISABLE without checking
            //must remember to enable when needed
            NRF_TWI1->ENABLE  = (TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos);
            NRF_TWI1->POWER   = 0;
            NRF_TWI0->ENABLE  = (TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos);
            NRF_TWI0->POWER   = 0;
        }
    
    
    
    
    
        void adc_disable(void)
        {
            //not nice or polite, HARD DISABLE without checking
            //must remember to enable when needed
            NRF_ADC->ENABLE  = (ADC_ENABLE_ENABLE_Disabled << ADC_ENABLE_ENABLE_Pos);
            NRF_ADC->POWER   = 0;
            NRF_ADC->ENABLE  = (ADC_ENABLE_ENABLE_Disabled << ADC_ENABLE_ENABLE_Pos);
            NRF_ADC->POWER   = 0;
        }
    
Reply
  • Should I continue the question I have or open a new question.

    I am a little confused, because I am not answer my question. I am further explaining it. And the comment field does not allow full formating

    I am using TWI sw master. I am quite sure I have the TWI disabled. keil shows the twi1 and twi2 enable = 0 and power = 0

    How large should the unused TWI time be, for TWI STOP to be beneficial?

    Are referring to twi_master_transfer(address, &value,len, TWI_ISSUE_STOP) or NRF_TWI1->TASKS_STOP (I assume this is only for twi_hw_master)


    I am using RTC1 to keep track of relative time. Absolute time is not required.

    time = APP_TIMER_MILLISEC(NRF_RTC1->COUNTER, APP_TIMER_PRESCALER);
    

    I am using timers as defined in app_timer.c NRF_RTC1

    I have created disable enable functions.

    void temp_disable(void)
    {
        //not nice or polite, HARD DISABLE without checking
        //must remember to enable when needed
        NRF_TEMP->POWER = 0;
    }
    void temp_enable(void)
    {
        //must remember to enable when needed
        NRF_TEMP->POWER = 1;
    }
    
    void gpiote_disable(void)
    {
        //not nice or polite, HARD DISABLE without checking
        //must remember to enable when needed
        NRF_GPIOTE->INTENSET = 0;
        NRF_GPIOTE->POWER = 0;
    }
    
    
        void twi_master_disable(void)
        {
            //not nice or polite, HARD DISABLE without checking
            //must remember to enable when needed
            NRF_TWI1->ENABLE  = (TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos);
            NRF_TWI1->POWER   = 0;
            NRF_TWI0->ENABLE  = (TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos);
            NRF_TWI0->POWER   = 0;
        }
    
    
    
    
    
        void adc_disable(void)
        {
            //not nice or polite, HARD DISABLE without checking
            //must remember to enable when needed
            NRF_ADC->ENABLE  = (ADC_ENABLE_ENABLE_Disabled << ADC_ENABLE_ENABLE_Pos);
            NRF_ADC->POWER   = 0;
            NRF_ADC->ENABLE  = (ADC_ENABLE_ENABLE_Disabled << ADC_ENABLE_ENABLE_Pos);
            NRF_ADC->POWER   = 0;
        }
    
Children
No Data
Related