Hi !
Is there a possibility to do a reset by software which is the same
as a reset per hardware ?
I work with following statements but i'm not shure if it realy resets Core&Peripheral - take from page 1001 of hardwareReference Manual
Watchdog reset is not possible because this is handled specialy on startup
*pSWRST=SYSTEM_RESET; //0x0007 ...trigger softw.reset
for(i=0;i<100;i++) cmdHistIdx++; //only a pseudo loop to wait for sysreset
*pSWRST=0x0000;
raise(1); //force a machine reset
while(1);
Table 19-2. Resets in the HRM will give you an overview of the available reset events, tha actions to be taken and the result. The result of a system software reset (Writing 0x0007 to bits [2:0] in SWRST) is: Resets only the peripherals, excluding the RTC (Real-Time Clock) block and most of the DPMC. The system software reset clears bit 4 (no boot on software reset) in the SYSCR register. Does not reset the core. Does not initiate a boot sequence. If you want to trigger a real hardware reset (/RESET pin), you can use a free GPIO pin. Connect it to the reset generator input and connect a pull-up resistor as well.
thanks ! currently i have no option to change the hardware.
i have a workaround for a watchdog reboot that is maybe the solution.
but if you look at my code (taken from HR-Manual 19-9) - this should reset core&system(no rtc and dpmc)
the code works but sometimes the reset is done and my code seems to hang in a very early state(before init).
After a while a watchdog reset is triggered. (see topic BF537 software reboot troubles)
regards chris