The standard CMSIS libraries contain an NVIC_SystemReset() function. This function has the same effect as a hardware pin reset.