You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.5 KiB

4 years ago
4 years ago
  1. # README
  2. [toc]
  3. ## Release
  4. **Win**
  5. [stm32_pwm_computer.exe](./release/stm32_pwm_computer.exe)
  6. **Linux**
  7. ```bash
  8. cd linux
  9. ./build.sh
  10. ```
  11. ## Usage
  12. **Win**
  13. 1.文件资源管理器打开stm32_pwm_computer.exe所在目录。
  14. ![image-20211227114107011](markdown.assets/README.assets/image-20211227114107011.png)
  15. 2.在目录栏输入cmd
  16. ![image-20211227114136603](markdown.assets/README.assets/image-20211227114136603.png)
  17. 3.在弹出的终端输入 stm32_pwm_computer.exe 168 33
  18. ```
  19. Tip:
  20. stm32_pwm_computer.exe stm32系统时钟(mhz) 期望的PWM频率(khz)
  21. ```
  22. ```powershell
  23. C:\Users\zhaohe\Desktop\stm32_timer_pwm_computer\release>stm32_pwm_computer.exe 168 33
  24. ******************************************************
  25. * author: 赵贺 *
  26. * e-mail: zhaohe@163.net *
  27. ******************************************************
  28. *
  29. * systemclk : 168.000000 mhz
  30. * expect freq: 33.000000 khz
  31. *
  32. ******************************************************
  33. * APB1: TIM2 TIM3 TIM4 TIM5 TIM6 TIM7
  34. * TIM12 TIM13 TIM14
  35. *
  36. * timer_module_clk: 84.000000 mhz
  37. * freq : 33.005895 khz
  38. * period : 0.030298 ms
  39. * prescaler : 0
  40. * autoreload : 2544
  41. *
  42. * APB2: TIM1 TIM8 TIM9 TIM10 TIM11
  43. *
  44. * timer_module_clk: 168.000000 mhz
  45. * freq : 33.005895 khz
  46. * period : 0.030298 ms
  47. * prescaler : 0
  48. * autoreload : 5089
  49. ******************************************************
  50. ```