Using the debugger

uVision5 provides a debugger that allows us to suspend execution (by inserting a breakpoint), and examine/change values of variables used in our program.

How to do it…

  1. Download and run the previous project, debug_ADC.
  2. Use the debug menu to insert a breakpoint on line 96 of our program (that is, at the statement ADC_StartConversion ( );.
    How to do it…
  3. Select debugStart/Stop Debug session to start a debug session.
  4. Observe that execution stops at main. This is because the default project debug options are set to "Run to main".
    How to do it…
  5. Selecting Run (F5) will ...

Get ARM® Cortex® M4 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.