Skip to content
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

Add SAMx7x timer support #956

Merged

Conversation

chris-durand
Copy link
Member

@chris-durand chris-durand commented Feb 5, 2023

  • Add support for SAMx7x devices in SAMG55 Timer / Counter driver
  • Add example
  • Example tested with hardware

@chris-durand chris-durand force-pushed the feature/samx7x_timer_counter branch 3 times, most recently from 4c8f2b2 to 57a5d94 Compare February 5, 2023 15:27
@chris-durand chris-durand added this to the 2023q1 milestone Feb 5, 2023
@chris-durand chris-durand marked this pull request as ready for review February 6, 2023 20:54
Copy link
Member

@salkinium salkinium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@salkinium salkinium added the ci:hal Triggers the exhaustive HAL compile CI jobs label Feb 6, 2023
@chris-durand
Copy link
Member Author

These inconsistent SAM headers are sometimes quite disappointing. Variant "A" devices, of course, are missing the register defines for TC_CMR in waveform mode, just like the G55 headers 😞.

In file included from modm/src/modm/platform.hpp:40,
                 from main.cpp:12:
modm/src/modm/platform/timer/timer_channel_0.hpp: In static member function 'static void modm::platform::TimerChannel0::setWaveformSelection(modm::platform::TimerChannelBase::WavSel)':
modm/src/modm/platform/timer/timer_channel_0.hpp:131:11: error: 'TC_CMR_WAVEFORM_WAVSEL_Msk' was not declared in this scope
  131 |   cmr &= ~TC_CMR_WAVEFORM_WAVSEL_Msk;
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~

@chris-durand chris-durand added ci:hal Triggers the exhaustive HAL compile CI jobs and removed ci:hal Triggers the exhaustive HAL compile CI jobs labels Feb 7, 2023
@chris-durand
Copy link
Member Author

CI is green now. Fixing the header issue was easy since the fix was already there for SAMG5 devices. Should be ready to merge.

@salkinium salkinium merged commit 95713ee into modm-io:develop Feb 7, 2023
@chris-durand chris-durand deleted the feature/samx7x_timer_counter branch February 7, 2023 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:hal Triggers the exhaustive HAL compile CI jobs feature 🚧
Development

Successfully merging this pull request may close these issues.

None yet

2 participants