1. Using Keil Software Simulation
Pre-simulation configuration
In particular, to learn the serial Print window and local variables to observe these two functions. By right-clicking on the desired variable, add to "Watch 1" adds a local variable to the observation.
expansion: (1) The software simulation--------------of the Lantern experiment to use the Logic Analysis window
Simulation by setting the change of the high and low level of the observation corresponding PIN
Click on the Debug toolbar that looks like the oscilloscope, and setup builds the variable, noting that the observation type is selected BITS,PORTX. Y (x is the pin letter, y is the pin number), such as the mini board porta.8 corresponds to the Led0,portd.2 corresponding to Led1.
Then run the simulation, there will be high and low level pattern changes, can be measured according to the pattern cycle.
(2) Observation of IO port
Peripheral-general Purpose Io-gpiox
The led0=0 (corresponds to PORTA8) is essentially set to the corresponding ODR register bit to 0, the corresponding bit of the tick is not. Porta.8=1 a tick when led0=1.
?
?
2. Hardware emulation (Jlink)
The program is executed directly in the chip, and the routine is observed by the serial debugging assistant .
Software emulation and hardware emulation