@Edward Karpicz ,@iggi
After I debug, found out the problem.Please refer to my attached example.
If the program does not open the COP, after entering the WAIT mode, PE4 output is normal,And through external interrupt( PIN->PP2) awakening,PE4 can switch level and keep it.
But,When I open the COP, after the program is run into the waiting mode, Program is abnormal(Program crashes, and not to boot),And PE4 output of about 2.5V level,And the external interrupt doesn't wake up.What is the problem? Thanks!
Note: the test is not BDM connection.because PE4 is also called ECLK and so it has two functions. One is GPIO (PE4), and the other is a free-running clock (ECLK).
Regards,
xjc