Skip to content

FT: EVSYS peripheral implementation and pulse counting #839

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

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

rnd-ash
Copy link
Contributor

@rnd-ash rnd-ash commented Apr 11, 2025

Summary

This PR is a Work in progress!

This adds a basic channel based implementation for the EVSYS peripheral found on SAMx controllers. Along with a new PulseCounter struct that utilizes the EVSYS, TC and EIC peripheral to count pulses on an EIC channel without any CPU intervention. I had created this in order to monitor hall effect speed sensors.

A huge benefit here is that you can use any TC to monitor any EIC Extint with this method, so the monitored pins do not have to actually be connected to a TC peripheral, making it a lot more flexible.

Apologies for some overlap with #837, as that was needed to get EIC working, but I think this PR should be aimed at reviewing the EVSYS implementation and PulseCounter.

There is still a fair bit more to add to the evsys system (Automatic path type configuration, multiple channels from 1 generator, ...)

Future plans with this

  • Pulse-width and period monitoring using TC for more accurate signal monitoring features

@jbeaurivage jbeaurivage marked this pull request as draft April 16, 2025 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant