How to add a breakpoint to stop program execution in the Keil development environment when a register or an address in RAM is changed or read?

, Nov 28, 2024|
0
5
0

Please follow the steps below to add a breakpoint in Debug mode:

  1. Use Ctrl+B to open the Breakpoints dialog box.
  2. Enter a register address or an address in RAM into the “Expression” field of the Breakpoints dialog box.
  3. Enable the “Read” or “Write” option, specify the “Size” as 4 for a register, and enable “Bytes” in the “Access” section.
  4. Click the “Define” button to add a new breakpoint.


Taking the M051 series for example, to see if the value of the UA_THR register of UART0 is written, follow the steps as shown in the figure below:


Note1: The “Count” setting could not be changed to control the hit count of breakpoints.

Note2: Up to two breakpoints can be set for a register.

Products:Microcontrollers ,Arm Cortex-M0 MCUs ,M051 Base Series ,M0518 Series ,M0519 Series ,Mini51 Base Series ,Nano100/102 Base Series ,Nano110/112 LCD Series ,Nano120 USB Series ,Nano130 Advanced Series ,NUC029 Series ,NUC100/200 Advanced Series ,NUC120/122/123/220 USB Series ,NUC130/230 CAN Series ,NUC131/NUC1311 CAN Series ,NUC140/240 Connectivity Series ,Arm Cortex-M4 MCUs ,M451 Base Series ,M451M Series ,M452 USB Series ,M453 CAN Series ,NUC442/472 Series ,NUC505 Series
Applications:
Function:Software and Tools,Development-Environment,Keil