Not applicable
Feb 01, 2013
05:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 01, 2013
05:20 AM
Hi Friends,
I:Dn watchdog example when i run it after counter becomes five it does not reset the program but jumps to the following code...of startup_xmc4500.s
file at line no labeled 2 and does not goes away from the instruction...please tell the solution....
/**************startup_xmc4500.s******************* ***/
/* ================== START OF VECTOR ROUTINES ============================= */
.thumb
/* ================================================== ====================== */
/* Reset Handler */
.thumb_func
.globl __Xmc4500_reset_cortex_m
.type __Xmc4500_reset_cortex_m, %function
__Xmc4500_reset_cortex_m:
.fnstart
1. /* Disable Branch prediction */
2. LDR R0,=PREF_PCON
3. LDR R1,[R0]
4. ORR R1,R1,#0x00010000
5. STR R1,[R0]
........
.............
..........
....................
I:Dn watchdog example when i run it after counter becomes five it does not reset the program but jumps to the following code...of startup_xmc4500.s
file at line no labeled 2 and does not goes away from the instruction...please tell the solution....
/**************startup_xmc4500.s******************* ***/
/* ================== START OF VECTOR ROUTINES ============================= */
.thumb
/* ================================================== ====================== */
/* Reset Handler */
.thumb_func
.globl __Xmc4500_reset_cortex_m
.type __Xmc4500_reset_cortex_m, %function
__Xmc4500_reset_cortex_m:
.fnstart
1. /* Disable Branch prediction */
2. LDR R0,=PREF_PCON
3. LDR R1,[R0]
4. ORR R1,R1,#0x00010000
5. STR R1,[R0]
........
.............
..........
....................
- Tags:
- IFX
2 Replies
Feb 18, 2013
06:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 18, 2013
06:40 AM
Hello mohan,
We analyzed the topic. In fact what you see is a WDT Reset. The CPU do not jump, you can check the register RSTSTAT and you will see that the flag for the WDT Reset is set. Be aware the bitfield shows the accumulated reset status. This means you will find as well a PORST Reset.
You are using the Segger J Link right. One way to run the code is to do some single Step and the go back to run mode after the reset happen. This behavior is currently checked with the debugger vendor. Other debugger not behave like that so we think it's a debugger issue.
The second way is to clear the reset status bits. To do so include the following line inside the code:
...
DAVE_Init();
RESETn = RESET001_GetResetInfo(); //To get the information of the last reset
RESETn &=WDT_RESET; //Mask for WDT reset
SCU_RESET->RSTCLR |= 0x1; // clear reset info if(!(RESETn))
{
WDT001_Enable();
...
This will change the behavior in the way that the CPU will not halt anymore at the reset handler. you can put a breakpoint on the included line and you will see that the WDT reset happen.
Ron
We analyzed the topic. In fact what you see is a WDT Reset. The CPU do not jump, you can check the register RSTSTAT and you will see that the flag for the WDT Reset is set. Be aware the bitfield shows the accumulated reset status. This means you will find as well a PORST Reset.
You are using the Segger J Link right. One way to run the code is to do some single Step and the go back to run mode after the reset happen. This behavior is currently checked with the debugger vendor. Other debugger not behave like that so we think it's a debugger issue.
The second way is to clear the reset status bits. To do so include the following line inside the code:
...
DAVE_Init();
RESETn = RESET001_GetResetInfo(); //To get the information of the last reset
RESETn &=WDT_RESET; //Mask for WDT reset
SCU_RESET->RSTCLR |= 0x1; // clear reset info if(!(RESETn))
{
WDT001_Enable();
...
This will change the behavior in the way that the CPU will not halt anymore at the reset handler. you can put a breakpoint on the included line and you will see that the WDT reset happen.
Ron
Not applicable
Feb 25, 2014
09:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 25, 2014
09:01 AM
ron wrote:
You are using the Segger J Link right. One way to run the code is to do some single Step and the go back to run mode after the reset happen. This behavior is currently checked with the debugger vendor. Other debugger not behave like that so we think it's a debugger issue.
Do you have any news on that?