This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

When is hardware reset ignored on the 51822?

I ran into this last night and curiously, James appears to have posted about it yesterday (devzone.nordicsemi.com/.../trouble-with-system-halted,but-cannot-reset-nrf51822-chip)

Here is my code: it generates a square wave of increasing period on GPIO 0.11 that you can watch on a scope. Presumably, when you short pin 23 (SWDIO/nRESET) to ground, the chip should reboot and this will be evident by the period collapsing back to 10us and increasing again.

int main(void)
{
uint16_t x = 1;

	nrf_gpio_cfg_output(11);

	while(1)
	{
                for(int i=0; i<x; i++)
		    nrf_delay_us(10);
                x++;
		nrf_gpio_pin_toggle(11);
	}
}

However, here is what I see: after I use SWD to download the program via the Segger, I can short SWDIO/nRESET for seconds without resetting the chip. If I power cycle the CPU, everything works as expected.

This is with a G0 step of a 51822-QFAA and I have tried it both ways with respect to PAN 7 (12K pull-down on SWDCLK installed and omitted). I've also isolated the chip from the SWD interface without change.

How can the the J-Flash util leave the core in a state that even a hardware reset doesn't work? I am downloading the code through Keil 4.73, J-Flash 4.72A at 100kHz.

Thanks, Dan

Parents
  • Hi,

    After J-Link has downloaded the firmware to the nRF-device, the debugger interface is still active, and the RESET pin cannot be used. Doing a power-cycle detaches this interface, and therefore nRESET works as a reset-pin again.

    You can do this from the PC side by calling: nrfjprog --pinreset

    Best regards Håkon

Reply
  • Hi,

    After J-Link has downloaded the firmware to the nRF-device, the debugger interface is still active, and the RESET pin cannot be used. Doing a power-cycle detaches this interface, and therefore nRESET works as a reset-pin again.

    You can do this from the PC side by calling: nrfjprog --pinreset

    Best regards Håkon

Children
No Data
Related