Analysis of PWM wave at IO Port using Logic Analyzer in MDK4

Source: Internet
Author: User

1, first set up software simulation, you can see the STM32 not complete manual of the 2.4 software simulation chapter



(Original file name: 1.jpg)

Example functionality:
-Clock Settings:
-XTAL = 8.00 MHz
-SYSCLK = 72.00 MHz
-HCLK = SYSCLK = 72.00 MHz
-PCLK1 = HCLK/2 = 36.00 MHz
-PCLK2 = HCLK = 72.00 MHz
-ADCLK = PCLK2/6 = 12.00 MHz
-SYSTICK = HCLK/8 = 9.00 MHz

-TIM4 is running at 100Hz.
LEDs PB8, PB9 is dimmed using the PWM function of TIM4 channel3, Channel4

The Timer program was available in different targets:
Simulator:-configured for Software Simulator
MCBSTM32:-Runs from Internal Flash located on chip
(used for production or target debugging)



Second, select Software simulation


(Original file name: 2.jpg)





Third, compile the program, if the program is not wrong, will appear the following wireframe compilation information, and then go to debug, point out the Red "D" press, as shown in


(Original file name: 3.jpg)



Fourth step, the Software Logic Analyzer, and the waveform signal to be observed to pull into the logic Analyzer, if you enter the debug state without the "Sysbols" tab, click on the "View" menu pop out, from the "peripheral Register" to be observed (gpiob_ The PWM signal from the IDR output is reflected from this register) to the logic analysis, or directly to the portx.x pin view.




(Original file name: 4.jpg)



The fifth step, the unused bit is screened out, and is displayed in bit form, configuration


(Original file name: 5.jpg)



Sixth step, click "Go" button to enter full speed operation, OK,PWM waveform out, with in and out can be adjusted scan time, such as



(Original file name: 6.jpg)

Analysis of PWM wave at IO Port using Logic Analyzer in MDK4

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.