cancel
Showing results for 
Search instead for 
Did you mean: 

RM-Mini-Error (... not sure...): Timer Reset Mode Edge Polarity

flyer31
Senior

Thanks for the nice possibility for "PWM input mode" measurement / frequency measurement - works very perfect on TI1 or TI2.

But the register descriptions for SMCR and CCER are somehow contradictory in RM (e. g. 37.4.3 and 37.4.9 ... but concerns also the other timer register descriptions):

  • In SMCR / SMS it says: "0100 Reset Mode: RISING EDGE of the selected triger input (TRGI) reinitialises...".
  • In CCER / CC1P it says: "01 Inverted / falling edge. The circuit is sensitive to TIxFP1 falling edge (capture or trigger operations in RESET, external clock or TRIGGER MODE)... "

I played a bit around with these CC1P/NP & CC2P/NP bits ... but I have the impression that the Trigger Reset edge direction is NOT influenced by them, only the capture edge direction.

... but I am not 100% sure, please excuse me if I am wrong ... thinking too much on this produceds a bit a "knot in the brain" ... better just testing around until it works... (just I could not evaluate an INVERTED pwm signal, as I wanted ... so now finally I just evaluate it as standard PWM, and then negate the duty cyle... also ok of course).

1 REPLY 1

> In SMCR / SMS it says: "0100 Reset Mode: RISING EDGE of the selected triger input (TRGI) reinitialises...".

Note, that it says "rising edge of TRGI"

> In CCER / CC1P it says: [...]

Here, it is said, that (if TI1FP1 is selected as TRGI source in TIMx_SMCR.TS), that TRGI may be connected to either the rising edge detector, or falling edge detector, or both. Note in  Capture/compare channel (example: channel 1 input stage) figure, how TI1FP1 is selected from the already filtered rising or falling edge of the TI1 input signal (after filtering).

JW