-
Notifications
You must be signed in to change notification settings - Fork 108
feat(PeriphDrivers): Add Clock Setter APIs for MAX32690 & MAX78002 Peripherals, Add Dual Mode TMR Support, Add MAX32690 Clock Calibration API for IPO, Add MAX32690 RISCV Clock Setter, CFS Support Functions #1108
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Remove mismatched clock source options - Fix MXC_UART_SetClockSource implementation to actually work - Fix and simplify MXC_UART_SetFrequency - Improve RevB abstraction of clock options. RevB does not have any knowledge of what the top-level clock frequencies are.
- Add MXC_UART_Enable to turn on the peripheral clock. The peripheral clock must be turned on before writing to any of the UART registers is possible. - Add lock/unlock APIs for locking the UART clock source after setting with MXC_UART_SetClockSource. - Add MXC_UART_GetClockSource for retrieving the actual value of the UART clock at run-time. Required to get the initialization working properly with the lockers.
- Prescalar offset was incorrect for bitmode 16B - Disabled automatic start of 16B on Init. TMR_Start now starts 16A and 16B if they are enabled - TMR_Stop now stops both 16A and 16B
- Avoid resetting for 16A/16B modes, since those modes require two separate Init calls. A full peripheral reset would wipe the previous initalizations
This reverts commit b14392b.
This reverts commit 6367da2.
sihyung-maxim
approved these changes
Aug 9, 2024
Comment on lines
+156
to
+157
* @note (Developers): "mxc_usb_clock_t" should be defined as a macro in the top-level "max32xxx.h" file | ||
* so that the pre-processor can check for its existence. Ex: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add this note to the header device files (max32690.h)? Some developers only pull the CMSIS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sihyung-maxim
pushed a commit
to analogdevicesinc/hal_adi
that referenced
this pull request
Aug 9, 2024
4 tasks
ozersa
pushed a commit
to analogdevicesinc/hal_adi
that referenced
this pull request
Sep 11, 2024
ozersa
pushed a commit
to analogdevicesinc/hal_adi
that referenced
this pull request
Sep 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds various APIs and features to support CFS clock config code generation.
Primarily, this includes clock setter APIs.
Since many of the peripheral's Init APIs also configure the clock source, a locking mechanism was developed to allow the CFS config to take precedence. This is a temporary solution until CFS can perform full peripheral configuration, which is in the roadmap.
Additionally, it adds the weak
ClockInit()
function to the system startup code. CFS will override this function.This PR also adds dual-mode TMR support. The process involves initializing the TMR instance twice, once with the
16A
bit-mode config, and once with the16B
bit-mode config.Dual-Mode Example
This RISCV system clock input can now also be set with
MXC_SYS_RISCVClockSelect
.Checklist Before Requesting Review