feat(PeriphDrivers): IPO Calibration Support (CFSIO-5118) - #1567
Open
dnguye14-adi wants to merge 2 commits into
Open
feat(PeriphDrivers): IPO Calibration Support (CFSIO-5118)#1567dnguye14-adi wants to merge 2 commits into
dnguye14-adi wants to merge 2 commits into
Conversation
Add Function for System Calibration Clock. Add IPO Calibraion Examples Signed-off-by: dnguye14-adi <dung.nguyen@analog.com>
ttmut
reviewed
Jun 25, 2026
Signed-off-by: dnguye14-adi <dung.nguyen@analog.com>
hfakkiz
requested changes
Jul 20, 2026
| MXC_SETFIELD(MXC_FCR->autocal1, MXC_F_FCR_AUTOCAL1_INITIAL, | ||
| 0x100 << MXC_F_FCR_AUTOCAL1_INITIAL_POS); | ||
| MXC_SETFIELD(MXC_FCR->autocal0, MXC_F_FCR_AUTOCAL0_GAIN, 4 << MXC_F_FCR_AUTOCAL0_GAIN_POS); | ||
| MXC_FCR->autocal0 |= 0x7; |
Contributor
There was a problem hiding this comment.
Suggested change
| MXC_FCR->autocal0 |= 0x7; | |
| MXC_FCR->autocal0 |= MXC_F_FCR_AUTOCAL0_SEL | MXC_F_FCR_AUTOCAL0_EN | MXC_F_FCR_AUTOCAL0_LOAD; |
| // MXC_FCR->autocal0.sel is set to 1 | ||
|
|
||
| MXC_FCR->autocal0 &= ~MXC_F_FCR_AUTOCAL0_EN; // Stop the calibration | ||
| MXC_FCR->autocal0 |= MXC_F_FCR_AUTOCAL0_SEL; // Enable use of calibration value |
Contributor
There was a problem hiding this comment.
Is it necessary? It's already set with MXC_FCR->autocal0 |= 0x7; line.
| MXC_SETFIELD(MXC_FCR->autocal1, MXC_F_FCR_AUTOCAL1_INITIAL, | ||
| 0x100 << MXC_F_FCR_AUTOCAL1_INITIAL_POS); | ||
| MXC_SETFIELD(MXC_FCR->autocal0, MXC_F_FCR_AUTOCAL0_GAIN, 4 << MXC_F_FCR_AUTOCAL0_GAIN_POS); | ||
| MXC_FCR->autocal0 |= 0x7; |
| // MXC_FCR->autocal0.sel is set to 1 | ||
|
|
||
| MXC_FCR->autocal0 &= ~MXC_F_FCR_AUTOCAL0_EN; // Stop the calibration | ||
| MXC_FCR->autocal0 |= MXC_F_FCR_AUTOCAL0_SEL; // Enable use of calibration value |
| } | ||
|
|
||
| int err = E_NO_ERROR; | ||
| // The following section implements section 4.2.2.1 of the MAX32670 UG Rev 4 |
Contributor
There was a problem hiding this comment.
This line should refer to MAX32672 UG instead of MAX32670 UG, but I couldn't find a calibration section for IPO in MAX32672 UG..
| if ((err = MXC_SYS_ClockSourceEnable(MXC_SYS_CLOCK_ERTCO))) | ||
| return err; | ||
|
|
||
| //MXC_Delay(MXC_DELAY_MSEC(10)); |
| if ((err = MXC_SYS_ClockSourceEnable(MXC_SYS_CLOCK_ERTCO))) | ||
| return err; | ||
|
|
||
| //MXC_Delay(MXC_DELAY_MSEC(10)); |
| /** | ||
| * @file main.c | ||
| * @brief IPO Calibration example | ||
| * @details PWM Timers - Outputs a PWM signal (2Hz) on LED0 - ERTCO Clock and P0.1 - IPO_APB Clock |
Contributor
There was a problem hiding this comment.
Please update @details part of all added examples according to their context.
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
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.
Add Function for System Calibration Clock.
Add IPO Calibration Examples
Checklist Before Requesting Review