Fujitsu Series 3 Manual
Here you can view all the pages of manual Fujitsu Series 3 Manual. The Fujitsu manuals for Controller are available online for free. You can easily download all the documents as PDF.
Page 511
9. Descriptions of base timer functions [bit 2] TGIR: Trigger interrupt request bit When a software trigger or trigger input is detected, the TGIR bit is set to 1. The TGIR bit is cleared by writing 0. Even if 1 is written to the TGIR bit, the bit value is not affected. The read value of read-modify-write instructions is 1 regardless of the bit value. Bit Description 0 Clears an interrupt cause. 1 Detects an interrupt cause. [bit 1] res: Reserved bit The read value is 0....
Page 512
9. Descriptions of base timer functions 9.3.4. PWM Cycle Set Register (PCSR) The PWM Cycle Set Register (PCSR) is a register for storing the initial counter value. In 32-bit mode and for the even channel, the initial count value of the lower 16 bits is stored. For the odd channel, the initial count value of the upper 16 bits is stored. The initial value after a reset is undefined. Be sure to use the 16-bit data transfer instruction to access this register. bit 15 0 Field PCSR [15:0]...
Page 513
9. Descriptions of base timer functions 9.3.5. Timer Register (TMR) The Timer Register (TMR) is a register that reads the count value of a timer. In 32-bit mode and for the even channel, the count value of the lower 16 bits is read. For the odd channel, the count value of the upper 16 bits is read. The initial value is undefined. Be sure to use the 16-bit data transfer instruction to read this register. bit 15 0 Field TMR [15:0] Attribute R Initial value 0xXXXX The value of the...
Page 514
9. Descriptions of base timer functions 9.4. PWC timer function The function of the base timer can be set to either the 16-bit PWM timer, 16-bit PPG timer, 16/32-bit reload timer, or 16/32-bit PWC timer using the FMD2, 1, and 0 bits in the Timer Control Register. This section explains the timer functions available when PWC is set. 1. Operations of the PWC timer 2. Timer Control Registers (TMCR and TMCR2) and Status Control Register (STC) used when the PWC timer is selected 3. Data Buf f...
Page 515
9. Descriptions of base timer functions 9.4.1. Operations of the PWC timer The PWC timer has the pulse width measurement function. Five types of count clock are available for measuring the time and cycle between any input pulse events. This section explains the basic functions and operations of the pulse width measurement function. Pulse width measurement function Count operation is not performed until the counter is started and cleared to 0x0000 and the specified measurement start edge is...
Page 516
9. Descriptions of base timer functions Selection of count clock The count clock of the counter can be selected from eight types by setting bit 8: CKS3 in the TMCR2 register and bit 14 to 12: CKS2, CKS1, and CKS0 in the TMCR register. The selectable count clocks are as follows: TMCR2 and TMCR registers CKS3, CKS2, CKS1, and CKS0 bits Internal count clock to be selected 0b0000 Machine clock [Initial value] 0b0001 1/4 frequency of the machine clock 0b0010 1/16 frequency of the machine...
Page 517
9. Descriptions of base timer functions Starting and stopping pulse width measurement Set bit 1: CTEN bit in the TMCR to start, restart, or st op forcibly each operation. The pulse width measurement is started or restarted by writing 1 to the CTEN bit, and it is stopped forcibly by writing 0 to the CTEN bit. CTEN Function 1 Starts or restarts the pulse width measurement. 0 Forcibly stops the pulse width measurement. Operation after a restart After the counter is restarted in pulse...
Page 518
9. Descriptions of base timer functions Details on pulse width measurement operations One-shot measurement and continuous measurement Pulse width measurement can be performed in two modes: one for performing measurement only one time and the other for performing it continuously. Each mode is selected with the MDSE bit in the TMCR (see Selection of operation mode ).Differences between these modes are as follows: One -shot m easurem ent mode: When the first measurement end edge is...
Page 519
9. Descriptions of base timer functions Measurement modes and count operations The measurement mode can be selected from five types, differing in which part of the input pulse is measured. The following are explanations: Measurement mode EGS2, 1, and 0 Item to be measured (W: Pulse width to be measured) HIGH pulse width measurement 0b000 The width of the HIGH period is measured. Count (measurement) start: At detection of a rising edge Count (measurement) end: At detection of...
Page 520
9. Descriptions of base timer functions Pulse width/cycle calculation method After completion of measurement, the measured pulse width/cycle can be calcu lated as follows from the measurement result data stored in the DTBF: T W = n x t TW : Measured pulse width/cycle n : Measurement result data stored in the DTBF t : Count clock cycle Generation of interrupt requests Two interrupt requests can be generated. Interrupt request due to a counter overflow When count-up causes...
All Fujitsu manuals