You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DeveloperAlpha 48b48663ce -u origin main 3 months ago
..
EIDE -u origin main 3 months ago
EWARM -u origin main 3 months ago
Inc -u origin main 3 months ago
MDK-ARM -u origin main 3 months ago
Src -u origin main 3 months ago
readme.txt -u origin main 3 months ago

readme.txt

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

================================================================================
                                样例使用说明
                                Sample Description
================================================================================
功能描述:
此样例演示了TIM1的单脉冲模式CH2(PA09)引脚上的上升沿,触发计数器开始计数,当计数
值与CCR1匹配时CH1(PA08)输出高电平直到计数器溢出CH1再次输出低电平计数器溢
出后,定时器停止工作。

Function descriptions:
This sample demonstrates the one pulse mode of TIM1.The rising edge on the 
CH2(PA09) pin triggers the counter to start counting. when the count value 
matches CCR1,CH1(PA08) outputs a high level. When the counter overflows ,CH1 
outputs the low level again. After the counter overflows, the timer stops 
working.
================================================================================
测试环境:
测试用板PY32F403_STK
MDK版本 5.28
IAR版本 9.20
GCC版本GNU Arm Embedded Toolchain 10.3-2021.10

Test environment:
Test board: PY32F403_STK
MDK Version: 5.28
IAR Version: 9.20
GCC Version: GNU Arm Embedded Toolchain 10.3-2021.10
================================================================================
使用步骤:
1. 编译下载程序到MCU并运行
2. 在PA09上产生一个上升沿
3. 通过示波器监测PA09和PA08引脚可监测到波形;

Example execution steps:
1. compile and download the program to MCU and run it;
2. Create a rising edge on PA09;
3. Through the oscilloscope monitoring PA09 and PA08 pins, waveform can be 
observed;
================================================================================
注意事项:
1. 输出效果见下图:
                                ____
                                |   |
   CH2 _________________________|   |_________________________________________
   
                                              ___________________________
                                             |                           |
   CH1 ______________________________________|                           |____
                                <---Delay----><------Pulse--------------->

2. 本例程脉冲宽度计算 (TIM1_ARR-TI1_CCR1)/CLK=65535-16383/8000000= 6.144ms

Notes:
1. The output effect is shown below:
                                ____
                                |   |
   CH2 _________________________|   |_________________________________________
   
                                              ___________________________
                                             |                           |
   CH1 ______________________________________|                           |____
                                <---Delay----><------Pulse--------------->
2. This example pulse width calculation 
(TIM1_ARR-TI1_CCR1)/CLK= (65535-16383)/8000,000 =6.144ms
================================================================================