用keil提供的邏輯分析不錯
以keil里自帶的stm32的CPU為例,對PWM波形跟蹤觀測,打開C:KeilARMBoardsKeilMCBSTM32PWM_2目錄下的stm32的Dome,第一步:進行仿真配置,如圖:

(原文件名:1.jpg)
The PWM project is a simple program for the STM32F103RBT6
using Keil MCBSTM32 Evaluation Board and demonstrating
the use of PWM (Pulse Width Modulation) with Timer TIM4 .
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 are dimmed using the PWM function of TIM4 channel3, channel4
The Timer program is available in different targets:
Simulator: - configured for software Simulator
MCBSTM32: - runs from Internal Flash located on chip
(used for production or target debugging)
第二、選擇軟件仿真

(原文件名:2.jpg)

(原文件名:3.jpg)

(原文件名:4.jpg)

(原文件名:5.jpg)

(原文件名:6.jpg)
評論