2014-06-09 11:26 AM
Hi,
I use a stm8a-discovery board and IAR workbench for STM8 1.42 to developp a project.I try to DEBUG my application but I have a problem when I use breakpoint or break the application execution because the MCU stop when it is on the breakpoint. For example, if I use output PWM, I see PWM on oscilloscope until I break the execution and I see it again when I execute from the current statement.How can I change it to don't stop the MCU when I break the application execution ?Thank you2014-06-10 03:10 AM
Hi
''I try to DEBUG my application but I have a problem when I use breakpoint or break the application execution because the MCU stop when it is on the breakpoint. For example, if I use output PWM, I see PWM on oscilloscope until I break the execution and I see it again when I execute from the current statement. How can I change it to don't stop the MCU when I break the application execution ?'' I think you miss-understand. The point of a break point is to stop the processor executing. ''How can I change it to don't stop the MCU when I break the application execution ?'' You cannot. The whole reason for a break point is to stop and examine what the processor is doing. If you want to debug without stopping, 'instrument the code' eg Put printf in (if you have support for it eg through serial port) Toggle spare IOport pin at certain points in the code.2014-06-20 09:10 AM
Don't use a breakpoint. They are used to stop execution so you can examine registers and lines.
Often I use either a debug pin to capture output signals states, or install an infinite wait loop. The problem with the loop is that if interrupts are still enabled (timers and such), they will still be active so may change things on you.