Type: Answers
Area: Embedded, Tools

Last Modified: September 11, 2012

Can I perform a software reset on a Nios<SUP>&reg;</SUP> II embedded processor?


Yes, you can reset a Nios II processor within your software application by using a function pointer set to the reset address of your processor. A software reset is illustrated in the code segment shown below:

#include <stdio.h>

#include "system.h"

#include "nios2.h"

  ((void (*) (void)) NIOS2_RESET_ADDR) ()

int main()


  printf("Hello from Nios II!\n");


  return 0;


The HAL_PLATFORM_RESET macro disables interrupts and then calls a pointer to a function set to the reset address. This causes the processor to jump to the hardware reset address.

Find more KDB articles