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

hardware reset

hello all:

my mcu is nrf51822(QFAA), and use it to make a blue device ,i want to use mcu's reset pin to reset it, just use hardware. i add a key to connect the reset pin,when the key is press down, the reset pin is low level,it could be reset system. and i try many times,sometime it can be reset ok,and sometime it can't reset.what should i do to make it reset whenever i press down the key? do you have any ways ? is it need other capacitive resistor?please help me , thanks

Parents
  • FormerMember
    0 FormerMember

    When the reset doesn't work, it is a chance that the chip is accidentally in debug mode. To check if that is the case you can enable reset pin in debug mode: NRF_POWER->RESET = 1;, and then test the reset button, check if the problem is still there or if it is gone.

    If there is a problem with debug mode,it can be useful to have a look at this thread.

  • FormerMember
    0 FormerMember in reply to FormerMember

    When I test here, adding NRF_POWER->RESET = 1 to a nRF51 example, a reset is not continuously triggered. For reference, could you test the same example as I am testing: led_softblink:

    int main(void)
    {
        ret_code_t err_code;
        
        lfclk_init();
    
        // Start APP_TIMER to generate timeouts.
        APP_TIMER_INIT(APP_TIMER_PRESCALER, OP_QUEUES_SIZE, NULL);
    
        const led_sb_init_params_t led_sb_init_param = LED_SB_INIT_DEFAULT_PARAMS(LEDS_MASK);
    
        err_code = led_softblink_init(&led_sb_init_param);
        APP_ERROR_CHECK(err_code);
    	
    		NRF_POWER->RESET = 1;
    
        err_code = led_softblink_start(LEDS_MASK);
        APP_ERROR_CHECK(err_code);
    
        while (true)
        {
            __WFE();
        }
    }
    
Reply
  • FormerMember
    0 FormerMember in reply to FormerMember

    When I test here, adding NRF_POWER->RESET = 1 to a nRF51 example, a reset is not continuously triggered. For reference, could you test the same example as I am testing: led_softblink:

    int main(void)
    {
        ret_code_t err_code;
        
        lfclk_init();
    
        // Start APP_TIMER to generate timeouts.
        APP_TIMER_INIT(APP_TIMER_PRESCALER, OP_QUEUES_SIZE, NULL);
    
        const led_sb_init_params_t led_sb_init_param = LED_SB_INIT_DEFAULT_PARAMS(LEDS_MASK);
    
        err_code = led_softblink_init(&led_sb_init_param);
        APP_ERROR_CHECK(err_code);
    	
    		NRF_POWER->RESET = 1;
    
        err_code = led_softblink_start(LEDS_MASK);
        APP_ERROR_CHECK(err_code);
    
        while (true)
        {
            __WFE();
        }
    }
    
Children
No Data
Related