1.5 KiB
1.5 KiB
-
功能描述
演示beeper模块的用法。
-
使用环境
软件开发环境:KEIL MDK-ARM V5.34.0.0 IAR EWARM 8.50.1 硬件环境:基于N32G430C8L7-STB V1.0评估板开发
3.使用说明
1. 时钟源:APB2(64MHz) + PSC(32) + Div(1024)
2. 输出端口:
PA6 AF_PP
PA7 AF_PP
3.测试步骤和现象 a:编译并下载代码,进入调试模式 b:用示波器查看波形,验证结果
-
注意事项
- PA6和PA7的波形互补
- APB2时钟频率选择寄存器BEEPER_CTRL.PSC位是根据主频确定的,这样输出波形不会失真。
-
Function description
This example demonstrates the usage of the beeper module.
-
Use environment
Software development environment: KEIL MDK-ARM V5.34.0.0 IAR EWARM 8.50.1 Hardware environment: Developed based on the evaluation board N32G430C8L7-STB V1.0
-
Instructions for use
-
Clock source: APB2(64MHz) + PSC(32) + Div(1024)
-
Output port: PA6 AF_PP PA7 AF_PP
-
Test steps and phenomena a: Compile and download the code, enter Debug mode b: View the waveform with an oscilloscope to verify the results
-
-
Matters needing attention
- The waveforms of PA6 and PA7 are complementary
- The value of the APB2 clock frequency selection register BEEPER_CTRL.PSC bit is determined according to the main frequency, so that the output waveform will not be distorted.