stephanschulz - How 'resety' do you need?
There has been a thread here about it, but IIRC, it doesn't achieve everything that a hard reset achieves.
The RM0008 manual says, in "section 7.1 Reset":
There are three types of reset, defined as system reset, power reset and backup domain reset.
7.1.1 System reset
A system reset sets all registers to their reset values except the reset flags in the clock controller CSR register and the registers in the Backup domain (see Figure 4).
A system reset is generated when one of the following events occurs:
1. A low level on the NRST pin (external reset)
2. Window watchdog end of count condition (WWDG reset)
3. Independent watchdog end of count condition (IWDG reset)
4. A software reset (SW reset) (see Software reset)
5. Low-power management reset (see Low-power management reset)
The reset source can be identified by checking the reset flags in the Control/Status register, RCC_CSR (see Section 7.3.10: Control/status register (RCC_CSR))."
So you could force a Software Reset.
The manual goes on to say:
"Software reset
The SYSRESETREQ bit in Cortex™-M3 Application Interrupt and Reset Control Register must be set to force a software reset on the device. Refer to the STM32F10xxx Cortex-M3 programming manual (see Related documents on page 1) for more details."
In PM0056, it says the SYSRESETREQ bit is in the SCB_AIRCR register ("4.4.5 Application interrupt and reset control register (SCB_AIRCR)"
So it looks like setting
*(SCB_AIRCR) |= SCB_AIRCR_SYSRESETREQ
might do the trick
#define SCB_AIRCR ((uint32*) 0xE000ED00 + 0x0C)
#define SCB_AIRCR_SYSRESETREQ (1 << 2)
I think ala42, and a few others might be more definitive; I haven't tried it.
LeafLabs say Maple resets via SCB_AIRCR: http://forums.leaflabs.com/topic.php?id=1691#post-10593