在keil MDK中软件逻辑剖析仪很强的功用,能够剖析数字信号,模仿化的信号,CPU的总线(UART、IIC等全部有输出的管脚),供给调试函数机制,用于发生自界说的信号,如Sin,三角波、澡声信号等,这些都能够界说。
以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
– SYST%&&&&&%K = 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)