Software emulation and hardware emulation

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.