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.

  • this is my main function,i add NRF_POWER->RESET = 1;in main function as follows

    int main(void)
    {
    	nrf_delay_ms(1000);
    	SEGGER_RTT_printf(0,"Build Time:%s-%s\r\n", __DATE__, __TIME__);
    	led_init();
    	nrf_delay_ms(100);
    	nrf_gpio_pin_clear(LED_RED);
        timers_init();
        ble_stack_init();
    	get_my_addr();
    	adv_mac_name(adv_mac_str);
        gap_params_init();
        services_init();
        advertising_init();
        conn_params_init();
        ble_advertising_start(BLE_ADV_MODE_FAST);
    	buttons_init();
    	config_wdt();
    	led_on_off_timers_start();
    	battery_start();	
    	NRF_POWER->RESET=1;
    	SEGGER_RTT_printf(0,"init ok!!!!!!!!!\r\n");
        // Enter main loop.
        for (;;)
        {
            power_manage();
        }
    }
    
Reply
  • this is my main function,i add NRF_POWER->RESET = 1;in main function as follows

    int main(void)
    {
    	nrf_delay_ms(1000);
    	SEGGER_RTT_printf(0,"Build Time:%s-%s\r\n", __DATE__, __TIME__);
    	led_init();
    	nrf_delay_ms(100);
    	nrf_gpio_pin_clear(LED_RED);
        timers_init();
        ble_stack_init();
    	get_my_addr();
    	adv_mac_name(adv_mac_str);
        gap_params_init();
        services_init();
        advertising_init();
        conn_params_init();
        ble_advertising_start(BLE_ADV_MODE_FAST);
    	buttons_init();
    	config_wdt();
    	led_on_off_timers_start();
    	battery_start();	
    	NRF_POWER->RESET=1;
    	SEGGER_RTT_printf(0,"init ok!!!!!!!!!\r\n");
        // Enter main loop.
        for (;;)
        {
            power_manage();
        }
    }
    
Children
No Data
Related