2022-01-27 10:27 AM
Hello,
I have a question regarding several timers which are confiugred in PWM input mode (CCR1 is used to measure the PWM period and CCR2 is used to measure the PWM Width). So far when I plug a user signal on the evalution board, I can see the correct values captured in both registers. When I switch off the user signal, I see that the CCR1/2 registers are holding the last captured value, even if nothing is connected to this pin. I was expecting to read a 0 once I disconnect the user signal in order to perform a reset of the registers.
Is there a way to take advantage of the internal status registers (SR) or Event generation registers ( e.g. CC1IF) in order to poll flags to check if new updates have occured? I would like to avoid to use additional compare registers e.g. CCR3 or CCR4 and create unnecessary interrupt overhead. Moreover, this pattern is only applicable on advanced timer, not on basic timers which only have two compare registers CCR1 and CCR2.
I was thinking in case internal registers can be used for this purpose to use an internal timestamp and to check that everytime.
Is there a method available ?
Solved! Go to Solution.
2022-02-01 05:44 AM
@mpen.1 Create a new thread instead of posting on an unrelated one.
Look at "SWJ debug port pins" here:
ST boards have a debugger on them already which you can use.
2022-02-01 06:07 AM
I know what do you mean! the thing I ve done it already!They didn't replay me yet.Do you thing there s a way to work wireless in the maintime?
2022-02-01 08:08 AM
2022-02-01 08:11 AM
2022-02-01 08:12 AM
2022-02-01 10:00 AM
FYI: For your future boards: The MIPI14 on many ST Demo boards matches the cables included with the STLINK-V3MINI, and connects the STLINK UART for diagnostics.
Making your own cables for the tiny connectors on STLINK isn't fun.
The STLINK-V3SET has more connector options.
Paul
2022-11-23 11:05 AM
Hi @Floki.1 ,
I'd like to do exactly the same as you with little overhead. Could you describe more precisely how you used the flags in the SR in order to know if the signal stopped or not? A code snippet as an example will be much appreciated.
Thank you!