diff --git a/README.md b/README.md index 9a47e86..b024bf2 100644 --- a/README.md +++ b/README.md @@ -35,40 +35,20 @@ cd linux ![image-20211227114136603](markdown.assets/README.assets/image-20211227114136603.png) -3.在弹出的终端输入 stm32_pwm_computer.exe 168 33 +3.在弹出的终端输入指令 + +![image-20220607194112890](markdown.assets/README.assets/image-20220607194112890.png) -``` Tip: - stm32_pwm_computer.exe stm32系统时钟(mhz) 期望的PWM频率(khz) -``` -```powershell -C:\Users\zhaohe\Desktop\stm32_timer_pwm_computer\release>stm32_pwm_computer.exe 168 33 -****************************************************** -* author: 赵贺 * -* e-mail: zhaohe@163.net * -****************************************************** -* -* systemclk : 168.000000 mhz -* expect freq: 33.000000 khz -* -****************************************************** -* APB1: TIM2 TIM3 TIM4 TIM5 TIM6 TIM7 -* TIM12 TIM13 TIM14 -* -* timer_module_clk: 84.000000 mhz -* freq : 33.005895 khz -* period : 0.030298 ms -* prescaler : 0 -* autoreload : 2544 -* -* APB2: TIM1 TIM8 TIM9 TIM10 TIM11 -* -* timer_module_clk: 168.000000 mhz -* freq : 33.005895 khz -* period : 0.030298 ms -* prescaler : 0 -* autoreload : 5089 -****************************************************** +​ 1.根据stm32cubeMX中时钟树和定时器序号,确定定时器输入时钟频率 + +![image-20220607193841283](markdown.assets/README.assets/image-20220607193841283.png) + +2.部分频率不能恰好一样,会存在一定的误差 + +``` +这是因为寄存器不能整除导致的,当频率越来越大,这个误差就会越来越大。 ``` +![image-20220607194308252](markdown.assets/README.assets/image-20220607194308252.png) diff --git a/markdown.assets/README.assets/image-20220607193621232.png b/markdown.assets/README.assets/image-20220607193621232.png new file mode 100644 index 0000000..37ef8b1 Binary files /dev/null and b/markdown.assets/README.assets/image-20220607193621232.png differ diff --git a/markdown.assets/README.assets/image-20220607193841283.png b/markdown.assets/README.assets/image-20220607193841283.png new file mode 100644 index 0000000..6431547 Binary files /dev/null and b/markdown.assets/README.assets/image-20220607193841283.png differ diff --git a/markdown.assets/README.assets/image-20220607194112890.png b/markdown.assets/README.assets/image-20220607194112890.png new file mode 100644 index 0000000..4157b8b Binary files /dev/null and b/markdown.assets/README.assets/image-20220607194112890.png differ diff --git a/markdown.assets/README.assets/image-20220607194308252.png b/markdown.assets/README.assets/image-20220607194308252.png new file mode 100644 index 0000000..582cfe9 Binary files /dev/null and b/markdown.assets/README.assets/image-20220607194308252.png differ