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 MAX32xxx counter RTC driver #80040

Merged
merged 4 commits into from
Nov 16, 2024

Conversation

oknshn
Copy link
Contributor

@oknshn oknshn commented Oct 18, 2024

This PR adds counter RTC driver for ADI MAX32xxx series microcontrollers. Counter tests are also enabled.

@zephyrbot zephyrbot added platform: ADI Analog Devices, Inc. area: Counter labels Oct 18, 2024
@oknshn oknshn mentioned this pull request Oct 18, 2024
@oknshn oknshn changed the title Add MAX32xxx RTC driver Add MAX32xxx counter RTC driver Oct 18, 2024
@MaureenHelm MaureenHelm added this to the v4.0.0 milestone Oct 21, 2024
@MaureenHelm
Copy link
Member

Needs rebase

@oknshn
Copy link
Contributor Author

oknshn commented Oct 22, 2024

Needs rebase
Done.

Copy link
Collaborator

@ttmut ttmut left a comment

Choose a reason for hiding this comment

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

Not a hard requirement but you may consider merging commits to boards from same author into a single one to keep commit history brief.

boards/adi/max32655fthr/max32655fthr_max32655_m4.dts Outdated Show resolved Hide resolved
boards/adi/max32655evkit/max32655evkit_max32655_m4.dts Outdated Show resolved Hide resolved
boards/adi/max32662evkit/max32662evkit.dts Outdated Show resolved Hide resolved
boards/adi/max32670evkit/max32670evkit.dts Outdated Show resolved Hide resolved
boards/adi/max32672evkit/max32672evkit.dts Outdated Show resolved Hide resolved
boards/adi/max32672fthr/max32672fthr.dts Outdated Show resolved Hide resolved
@oknshn
Copy link
Contributor Author

oknshn commented Oct 23, 2024

Not a hard requirement but you may consider merging commits to boards from same author into a single one to keep commit history brief.

Done

@oknshn oknshn requested a review from ttmut October 23, 2024 09:05
@oknshn oknshn force-pushed the counter_rtc_max32 branch 3 times, most recently from b14cac6 to 018fd1c Compare October 23, 2024 11:35
oknshn and others added 2 commits October 23, 2024 14:49
This commit instantiates counter RTC on MAX32xxx MCUs.

Co-authored-by: Sadik Ozer <[email protected]>
Signed-off-by: Okan Sahin <[email protected]>
Common RTC counter driver for MAX32xxx MCUs.
Time of day alarm is used to generate interrupt.
The resolution of time of day interrupt is 1Hz.
Subsecond alarm interrupt not works it does not meet
zephyr counter driver requirement, so that not used.

To use as wakeup source wakeup-source parameter shall be
defined as below

&rtc_counter {
    status = "okay";
    wakeup-source;
};

Co-authored-by: Okan Sahin <[email protected]>
Signed-off-by: Sadik Ozer <[email protected]>
@oknshn oknshn force-pushed the counter_rtc_max32 branch 2 times, most recently from 49f5141 to a85edd9 Compare October 23, 2024 12:06
oknshn and others added 2 commits October 23, 2024 15:29
This commit enables counter RTC for following boards

- MAX32662 EVKIT
- MAX32655 EVKIT
- MAX32655 FTHR
- MAX32666 FTHR
- MAX32666 EVKIT
- MAX32670 EVKIT
- MAX32672 FTHR
- MAX32672 EVKIT
- MAX32690 EVKIT

Co-authored-by: Sadik Ozer <[email protected]>
Co-authored-by: Maureen Helm <[email protected]>
Signed-off-by: Okan Sahin <[email protected]>
This commit enables counter RTC test for MAX32 MCUs.

Co-authored-by: Okan Sahin <[email protected]>
Signed-off-by: Sadik Ozer <[email protected]>
Copy link
Collaborator

@bjarki-andreasen bjarki-andreasen left a comment

Choose a reason for hiding this comment

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

looks good, I like the rtc_counter name, its always confusing with RTC, is it real time clock, is it real time counter, or RTCC, is that real time clock calendar or real time clock counter :D

@oknshn
Copy link
Contributor Author

oknshn commented Oct 25, 2024

Hello @nordic-krch,
Could you take a look?

@oknshn
Copy link
Contributor Author

oknshn commented Oct 25, 2024

looks good, I like the rtc_counter name, its always confusing with RTC, is it real time clock, is it real time counter, or RTCC, is that real time clock calendar or real time clock counter :D
Thanks, It is real time counter, I can create follow-up PR for it.

@oknshn
Copy link
Contributor Author

oknshn commented Oct 30, 2024

Hello @nordic-krch, Could you take a look?
Hello @nordic-krch,
Waiting for your review.

@MaureenHelm MaureenHelm modified the milestones: v4.0.0, v4.1.0 Oct 30, 2024
@nashif nashif merged commit 18853d0 into zephyrproject-rtos:main Nov 16, 2024
33 checks passed
Copy link

Hi @oknshn!
Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a fantastic achievement, and we're thrilled to have you as part of our community!

To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge.

Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Counter platform: ADI Analog Devices, Inc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants