Here is a list of the resources and configurations required by NiceMon:
A 0x300 byte block of flash on a page boundary. NiceMon will search for an available block and locate the stub there.
15 bytes of stack space. (interrupt vector overhead + registers saved on stack + ISP function overhead)
The software interrupt vector. NiceMon will overwrite it.
The Microwire interrupt vector. NiceMon will overwrite it.
The Microwire SI/SO/SK PORTG configuration and pins. If the user changes these settings NiceMon will lose control of the application.
The Microwire peripheral must be left enabled.
The FLEX bit in the OPTION flash register must be left clear.
The ISP registers get modified. This means NiceMon can't be used to debug portions of an application that use the ISP registers. NiceMon does not affect the ISP registers while the application is running but will scramble them once a break point is reached.
|PORTGC||x001 xxxx||leave the clock and data-in as inputs and data-out as output|
|PORTGD||xx1x xxxx||leave the Microwire clock idle state high|
|ICNTRL||xxxx 01xx||leave the Microwire interrupt pending flag (uWPND) clear and Microwire enable bit (uWEN) set|
|CNTRL||xxxx 1xxx||leave (MSEL) Microwire pins activated|
|PSW||xxxx x1x1||leave both BUSY and GIE set|
|OPTION||xxxx xxx0||leave FLEX clear|