EasyManua.ls Logo

Cypress FM4 Series - Page 136

Cypress FM4 Series
1102 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CHAPTER 2-4: Low-Speed CR Prescaler
136 FM4 Peripheral Manual, Doc. No. 002-04856 Rev. *E
Low-speed CR Correction Example
For the correction example of the Low-speed C, see Figure 3-2.
Figure 3-2 Low-speed CR Correction Example
*1: Above is the example by using dual timer. It is possible to measure by using Base timer or MFT.
Set the watch counter prescaler.
Set “Clock Source” to Low-speed CR.
(SEL_IN[1:0] = “11”)
Set the output clock to the value from 2^4 to 2^1.
(SEL_OUT[2:0] = “010”)
Set the division clock to “Enable”.
(CLK_EN = "1")
Set the watch counter. *1
Set the watch counter reload value to 64 division.
(RLC[4:0] = “00000”)
Select WCCK0.
(CS[1:0] = “00”)
Set an interrupt.
(WCIE, WCEN)
Stop dual timer (TimerEn=”0”)
Calculate the Low-speed CR Prescaler Load value from a
measurement count value.
Set the Low-speed CR Prescaler Load Value
Watch counter interrupt
Obtain the value of measurement
count from dual timer

Table of Contents

Related product manuals