01.06.2014 Views

STM32W108C8

STM32W108C8

STM32W108C8

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

General-purpose timers<br />

<strong>STM32W108C8</strong><br />

Table 86.<br />

Timer signal descriptions (continued)<br />

Signal Internal/external Description<br />

ICyPS<br />

ITR0<br />

OCy<br />

OCyREF<br />

PCLK<br />

Internal<br />

Internal<br />

External<br />

Internal<br />

External<br />

Input capture signal after filtering, edge detection and<br />

prescaling: input to the capture register.<br />

Internal trigger input: connected to the other timer's output,<br />

TRGO.<br />

Output compare: TIMxCy when used as an output. Same as<br />

OCyREF but includes possible polarity inversion.<br />

Output compare reference: always active high, but may be<br />

inverted to produce OCy.<br />

Peripheral clock connects to CK_INT and used to clock input<br />

filtering. Its frequency is 12MHz if using the 24MHz crystal<br />

oscillator and 6Mhz if using the 12MHz RC oscillator.<br />

TIy Internal Timer input: TIMxCy when used as a timer input.<br />

TIyFPy Internal Timer input after filtering and polarity selection.<br />

TIMxCy<br />

Internal<br />

Timer channel at a GPIO pin: can be a capture input (ICy) or<br />

a compare output (OCy).<br />

TIMxCLK External Clock input (if selected) to the external trigger signal (ETR).<br />

TIMxMSK<br />

External<br />

Clock mask (if enabled) AND'ed with the other timer's<br />

TIMxCLK signal.<br />

TRGI Internal Trigger input for slave mode controller.<br />

10.2 Interrupts<br />

Each timer has its own ARM® Cortex-M3 vectored interrupt with programmable priority.<br />

Writing 1 to the INT_TIMx bit in the INT_CFGSET register enables the TIMx interrupt, and<br />

writing 1 to the INT_TIMx bit in the INT_CFGCLR register disables it. Section 12: Interrupts<br />

on page 174 describes the interrupt system in detail.<br />

Several kinds of timer events can generate a timer interrupt, and each has a status flag in<br />

the INT_TIMxFLAG register to identify the reason(s) for the interrupt:<br />

● INT_TIMTIF - set by a rising edge on an external trigger, either edge in gated mode<br />

● INT_TIMCCRyIF -set by a channel y input capture or output compare event<br />

● INT_TIMUIF - set by an update event<br />

Clear bits in INT_TIMxFLAG by writing a 1 to their bit position. When a channel is in capture<br />

mode, reading the TIMx_CCRy register will also clear the INT_TIMCCRyIF bit.<br />

The INT_TIMxCFG register controls whether or not the INT_TIMxFLAG bits actually request<br />

an ARM® Cortex-M3 timer interrupt. Only the events whose bits are set to 1 in<br />

INT_TIMxCFG can do so.<br />

If an input capture or output compare event occurs and its INT_TIMMISSCCyIF is already<br />

set, the corresponding capture/compare missed flag is set in the INT_TMRxMISS register.<br />

Clear a bit in the INT_TMRxMISS register by writing a 1 to it.<br />

141/215 Doc ID 018587 Rev 2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!