readme.txt 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. /*!
  2. \file readme.txt
  3. \brief description of the TIMER2 PWM input capture demo
  4. */
  5. /*
  6. Copyright (C) 2017 GigaDevice
  7. 2017-06-06, V1.0.0, firmware for GD32F3x0
  8. */
  9. This demo is based on the GD32350R-EVAL board, it shows how to
  10. use the TIMER peripheral to measure the frequency and duty cycle of an external
  11. signal.
  12. The TIMxCLK frequency is set to systemcoreclock 84MHz(GD32F330) or 108MHz(GD32F350),
  13. the prescaler is 42000(GD32F330) or 54000(GD32F350) so the TIMER2 counter clock is 2KHz.
  14. The external signal is connected to TIMER2 CH0 pin (PB4).
  15. The rising edge is used as active edge.
  16. The TIMER2 CH0CV is used to compute the frequency value.
  17. The TIMER3 CH1CV is used to compute the duty cycle value.
  18. The available frequence of the input signal is ranging from 0.03Hz to 2KHz.
  19. You can use USART to watch the frequency and duty cycle of the input signal.
  20. The USART is configured as follow:
  21. - BaudRate = 115200 baud
  22. - Word Length = 8 Bits
  23. - One Stop Bit
  24. - No parity
  25. - Hardware flow control disabled (RTS and CTS signals)
  26. - Receive and transmit enabled