Skip to content

Counting pulses #816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mrguen opened this issue Dec 4, 2019 · 1 comment
Closed

Counting pulses #816

mrguen opened this issue Dec 4, 2019 · 1 comment
Labels
answered question ❓ Usually converted as a discussion

Comments

@mrguen
Copy link
Contributor

mrguen commented Dec 4, 2019

To complement #763

Would it be possible to implement these

  • clocking of timers from an external source i.e. positioning the timer register SMCR with the ECE bit set

  • timers master / slave modes that also allows gating i.e. positioning the timer register SMCR with TIMER_SMCR_SMS_GATED | TIMER_SMCR_TS_ITR0 (old Roger's defines)

  • including prescaling of the external signal (so it could input signal up to around 200 MHz)

  • will also need to set the gating timer's registers CR2 with MMS_ENABLE and possibly SMCR with SMCR_MSM

  • Or all together implementing a mode for setting a timer as clocked by external source, with prescaler, and gated by another timer.

@ABOSTM
Copy link
Contributor

ABOSTM commented Dec 6, 2019

Hi @mrguen,
Humm, this HardwareTimer library aims to provide simple access to basic features of Timer. Thus benefits from hardware capabilities despite very simple API.
Clearly the features you requested are far from this objective, and are for advanced users.
There is already STM32 HAL/LL drivers that give you access to all hardware capabilities and we cannot afford to develop a new arduino library just to do the same thing.
No need to reinvent the wheel, just use HAL/LL . Those API could be called directly from your arduino sketch.

@fpistm fpistm added question ❓ Usually converted as a discussion answered labels Dec 6, 2019
@fpistm fpistm closed this as completed Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered question ❓ Usually converted as a discussion
Projects
None yet
Development

No branches or pull requests

3 participants