Re: Debugging in exception handlers
alex shulman <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <[email protected]> |
Hi, Please, read exception chapter of the RCPU UM for more details, especially 6.5.2. THe main point is that the RCPU has only one pair of the registers (SRR0/1) to save the machine state and any break point is also exception so if the processor gets an exception in an exception handler before it saves SRR0/1, the machine state will be lost and there is no way to recover to the main code. The possibility of recovering from exception is indicated by the MSR[RI] bit, which is cleared any time the RCPU gets exception. Typical exception handler to be preemtive needs to save the SRR0/SRR1 and set the MSR[RI] bit. By default the hardware breakpoints are not recognized if the MSR[RI] bit is zero, that's why you can not get the break point at address 0xc00, or trace it. To overcome this you may set LCTRL2[BRKNOMASK] bit, but then you will not be able to return to your main code automatically, and most likely will need to reset the chip. Hope this will help Alex. --- prashanth_feb9 <[email protected]> wrote: > Hi All, > I am working on Phycore MPC565 board with > single step debugger. > In the configuration file of single step the DER > register value was > 0x73e67c0f. Whenever an exception was generated the > debugger used to > display popup messages. To avoid the popup i have > reset the bits in > the DER register. > > As an example, I have reset the system call > exception bit in DER to > check that whenever the exception occurs it branches > to the exception > handler (Address 0xC00) > > But when I generate a system call exception using a > sc instruction and > apply a breakpoint at 0xC00 it does not stop at the > breakpoint (This > address is in the internal Flash). > Please let me know why the breakpoint is not > activated at 0xC00 and > debug the exception handler code. > > Thanks and Regards, > Prashanth > > > > > > __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/dN_tlB/TM --------------------------------------------------------------------~-> ----------------------------------------------------------- To learn more about Freescale Microcontrollers, please visit http://www.freescale.com/mcu Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/MPC500/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/