← Back to Pull requests

feat(PeriphDrivers): MSDK-1353: IPO Calibration Support #1627

Open
dnguye14-adi opened this pull request with 6504 lines diff across 84 files
View on GitHub
dnguye14-adi dnguye14-adi commented on Sep 17, 2026 05:35 UTC
Author

Add Function for System Calibration Clock.
Add IPO Calibration Examples.

Checklist Before Requesting Review

  • PR Title follows correct guidelines.

  • Description of changes and all other relevant information.

  • (Optional) Link any related GitHub issues using a keyword

  • (Optional) Provide info on any relevant functional testing/validation. For API changes or significant features, this is not optional.
  • Diff: 6504 lines (+6500 / -4) across 84 files Reviewer: ttmut Review duration: 62485m
    All Vouch review confidence checks passed
    Residual risk 0.13 = Change Risk (0.79) × (1 − Review Confidence (0.84)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.79 · 6504 lines diff across 84 files
    0.79
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.90 · 5 substantive comment(s)
    0.90
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    83%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.400
    Mass File Touch mass_file_touch
    0.080
    Real PR Conversation Timeline
    19 items
    ttmut ttmut commented on code on Oct 11, 2026 11:12 UTC
    Code Review
    Examples/MAX32657/IPO_CALIB/main.c:1
    @@ -0,0 +1,121 @@
    +/******************************************************************************
    + *
    + * Copyright (C) 2026 Analog Devices, Inc.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + *
    + ******************************************************************************/
    +
    +/**
    + * @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

    Description needs to be updated, none of the timers are configured for PWM operation.

    ttmut ttmut commented on code on Oct 11, 2026 11:39 UTC
    Code Review
    Examples/MAX32657/IPO_CALIB/README.md:1
    @@ -0,0 +1,20 @@
    +## Description
    +
    +An example for the IPO Calibration feature to calibrate the IPO clock source by using external crytal source ERTCO.
    +
    +
    +## Software
    +
    +### Project Usage
    +
    +Universal instructions on building, flashing, and debugging this project can be found in the **[MSDK User Guide](https://analogdevicesinc.github.io/msdk/USERGUIDE/)**.
    +
    +### Project-Specific Build Notes
    +
    +* This project comes pre-configured for the MAX32657EVKIT.  See [Board Support Packages](https://analogdevicesinc.github.io/msdk/USERGUIDE/#board-support-packages) in the MSDK User Guide for instructions on changing the target board.
    +
    +## Required Connections
    +
    +## Expected Output
    +
    +After the IPO Calibration function called, The LED0 - ERTCO Clock and P0.1 - IPO_APB Clock outputs same a frequency (2Hz).

    After the IPO Calibration function is called, both LED0 (ERTCO Clock) and P0.1 (IPO_APB Clock) output the same frequency of 2 Hz.
    

    ttmut ttmut commented on code on Oct 11, 2026 11:47 UTC
    Code Review
    Examples/MAX32657/IPO_CALIB/README.md:1
    @@ -0,0 +1,20 @@
    +## Description
    +
    +An example for the IPO Calibration feature to calibrate the IPO clock source by using external crytal source ERTCO.
    +
    +
    +## Software
    +
    +### Project Usage
    +
    +Universal instructions on building, flashing, and debugging this project can be found in the **[MSDK User Guide](https://analogdevicesinc.github.io/msdk/USERGUIDE/)**.
    +
    +### Project-Specific Build Notes
    +
    +* This project comes pre-configured for the MAX32657EVKIT.  See [Board Support Packages](https://analogdevicesinc.github.io/msdk/USERGUIDE/#board-support-packages) in the MSDK User Guide for instructions on changing the target board.
    +
    +## Required Connections
    +

    It should be noted that a 32.768Hz crystal needs to be attached to the board for this example to work.

    ttmut ttmut commented on code on Oct 11, 2026 11:48 UTC
    Code Review
    Examples/MAX32662/IPO_CALIB/README.md:1
    @@ -0,0 +1,20 @@
    +## Description
    +
    +An example for the IPO Calibration feature to calibrate the IPO clock source by using external crytal source ERTCO.
    +
    +
    +## Software
    +
    +### Project Usage
    +
    +Universal instructions on building, flashing, and debugging this project can be found in the **[MSDK User Guide](https://analogdevicesinc.github.io/msdk/USERGUIDE/)**.
    +
    +### Project-Specific Build Notes
    +
    +(None - this project builds as a standard example)
    +
    +## Required Connections
    +
    +## Expected Output
    +
    +After the IPO Calibration function called, The LED0 - ERTCO Clock and P0.4 - IPO_APB Clock outputs same a frequency (2Hz).

    After the IPO Calibration function is called, both LED0 - ERTCO Clock and P0.4 - IPO_APB Clock output the same frequency of 2 Hz.
    

    ttmut ttmut commented on code on Oct 11, 2026 11:48 UTC
    Code Review
    Examples/MAX32670/IPO_CALIB/README.md:1
    @@ -0,0 +1,20 @@
    +## Description
    +
    +An example for the IPO Calibration feature to calibrate the IPO clock source by using external crytal source ERTCO.
    +
    +
    +## Software
    +
    +### Project Usage
    +
    +Universal instructions on building, flashing, and debugging this project can be found in the **[MSDK User Guide](https://analogdevicesinc.github.io/msdk/USERGUIDE/)**.
    +
    +### Project-Specific Build Notes
    +
    +(None - this project builds as a standard example)
    +
    +## Required Connections
    +
    +## Expected Output
    +
    +After the IPO Calibration function called, The LED0 - ERTCO Clock and LED1 - IPO_APB Clock outputs same a frequency (2Hz).

    After the IPO Calibration function is called, both LED0 - ERTCO Clock and LED1 - IPO_APB Clock output the same frequency of 2 Hz.
    

    ttmut ttmut commented on code on Oct 11, 2026 11:49 UTC
    Code Review
    Examples/MAX32672/IPO_CALIB/README.md:1
    @@ -0,0 +1,20 @@
    +## Description
    +
    +An example for the IPO Calibration feature to calibrate the IPO clock source by using external crytal source ERTCO.
    +
    +
    +## Software
    +
    +### Project Usage
    +
    +Universal instructions on building, flashing, and debugging this project can be found in the **[MSDK User Guide](https://analogdevicesinc.github.io/msdk/USERGUIDE/)**.
    +
    +### Project-Specific Build Notes
    +
    +(None - this project builds as a standard example)
    +
    +## Required Connections
    +
    +## Expected Output
    +
    +After the IPO Calibration function called, The LED0 - ERTCO Clock and LED1 - IPO_APB Clock outputs same a frequency (2Hz).

    After the IPO Calibration function is called, both LED0 - ERTCO Clock and LED1 - IPO_APB Clock output the same frequency of 2 Hz.
    

    ttmut ttmut commented on code on Oct 11, 2026 11:49 UTC
    Code Review
    Examples/MAX32690/IPO_CALIB/README.md:1
    @@ -0,0 +1,20 @@
    +## Description
    +
    +An example for the IPO Calibration feature to calibrate the IPO clock source by using external crytal source ERTCO.
    +
    +
    +## Software
    +
    +### Project Usage
    +
    +Universal instructions on building, flashing, and debugging this project can be found in the **[MSDK User Guide](https://analogdevicesinc.github.io/msdk/USERGUIDE/)**.
    +
    +### Project-Specific Build Notes
    +
    +(None - this project builds as a standard example)
    +
    +## Required Connections
    +
    +## Expected Output
    +
    +After the IPO Calibration function called, The LED0 - ERTCO Clock and LED1 - IPO_APB Clock outputs same a frequency (2Hz).

    After the IPO Calibration function is called, both LED0 - ERTCO Clock and LED1 - IPO_APB Clock output the same frequency of 2 Hz.
    

    ttmut ttmut commented on code on Oct 11, 2026 11:52 UTC
    Code Review
    Examples/MAX32657/IPO_CALIB/README.md:1
    @@ -0,0 +1,20 @@
    +## Description
    +
    +An example for the IPO Calibration feature to calibrate the IPO clock source by using external crytal source ERTCO.

    An example demonstrating how to use the IPO Calibration feature to calibrate the Internal Primary Oscillator (IPO) using the External Real-Time Clock Oscillator (ERTCO) as the reference.
    

    ttmut ttmut commented on code on Oct 11, 2026 11:52 UTC
    Code Review
    Examples/MAX32662/IPO_CALIB/README.md:1
    @@ -0,0 +1,20 @@
    +## Description
    +
    +An example for the IPO Calibration feature to calibrate the IPO clock source by using external crytal source ERTCO.

    An example demonstrating how to use the IPO Calibration feature to calibrate the Internal Primary Oscillator (IPO) using the External Real-Time Clock Oscillator (ERTCO) as the reference.
    

    ttmut ttmut commented on code on Oct 11, 2026 11:56 UTC
    Code Review
    Examples/MAX32670/IPO_CALIB/README.md:1
    @@ -0,0 +1,20 @@
    +## Description
    +
    +An example for the IPO Calibration feature to calibrate the IPO clock source by using external crytal source ERTCO.

    An example demonstrating how to use the IPO Calibration feature to calibrate the Internal Primary Oscillator (IPO) using the External Real-Time Clock Oscillator (ERTCO) as the reference.
    

    ttmut ttmut commented on code on Oct 11, 2026 11:56 UTC
    Code Review
    Examples/MAX32672/IPO_CALIB/README.md:1
    @@ -0,0 +1,20 @@
    +## Description
    +
    +An example for the IPO Calibration feature to calibrate the IPO clock source by using external crytal source ERTCO.

    An example demonstrating how to use the IPO Calibration feature to calibrate the Internal Primary Oscillator (IPO) using the External Real-Time Clock Oscillator (ERTCO) as the reference.
    

    ttmut ttmut commented on code on Oct 11, 2026 11:56 UTC
    Code Review
    Examples/MAX32690/IPO_CALIB/README.md:1
    @@ -0,0 +1,20 @@
    +## Description
    +
    +An example for the IPO Calibration feature to calibrate the IPO clock source by using external crytal source ERTCO.

    An example demonstrating how to use the IPO Calibration feature to calibrate the Internal Primary Oscillator (IPO) using the External Real-Time Clock Oscillator (ERTCO) as the reference.
    

    ttmut ttmut commented on code on Oct 11, 2026 11:58 UTC
    Code Review
    Examples/MAX32662/IPO_CALIB/main.c:1
    @@ -0,0 +1,122 @@
    +/******************************************************************************
    + *
    + * Copyright (C) 2026 Analog Devices, Inc.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + *
    + ******************************************************************************/
    +
    +/**
    + * @file    main.c
    + * @brief   IPO Calibration example
    + * @details PWM Timers - Outputs a PWM signal (2Hz) on LED0 - ERTCO Clock and P0.4 - IPO_APB Clock

    Description needs to be updated, none of the timers are configured for PWM operation.

    ttmut ttmut commented on code on Oct 11, 2026 11:58 UTC
    Code Review
    Examples/MAX32670/IPO_CALIB/main.c:1
    @@ -0,0 +1,115 @@
    +/******************************************************************************
    + *
    + * Copyright (C) 2026 Analog Devices, Inc.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + *
    + ******************************************************************************/
    +
    +/**
    + * @file    main.c
    + * @brief   IPO Calibration example
    + * @details PWM Timers - Outputs a PWM signal (2Hz) on LED0 - ERTCO Clock and LED1 - IPO_APB Clock

    Description needs to be updated, none of the timers are configured for PWM operation.

    ttmut ttmut commented on code on Oct 11, 2026 11:58 UTC
    Code Review
    Examples/MAX32672/IPO_CALIB/main.c:1
    @@ -0,0 +1,115 @@
    +/******************************************************************************
    + *
    + * Copyright (C) 2026 Analog Devices, Inc.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + *
    + ******************************************************************************/
    +
    +/**
    + * @file    main.c
    + * @brief   IPO Calibration example
    + * @details PWM Timers - Outputs a PWM signal (2Hz) on LED0 - ERTCO Clock and LED1 - IPO_APB Clock

    Description needs to be updated, none of the timers are configured for PWM operation.

    ttmut ttmut commented on code on Oct 11, 2026 11:59 UTC
    Code Review
    Examples/MAX32690/IPO_CALIB/main.c:1
    @@ -0,0 +1,121 @@
    +/******************************************************************************
    + *
    + * Copyright (C) 2026 Analog Devices, Inc.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + *
    + ******************************************************************************/
    +
    +/**
    + * @file    main.c
    + * @brief   IPO Calibration example
    + * @details PWM Timers - Outputs a PWM signal (2Hz) on LED0 - ERTCO Clock and LED1 - IPO_APB Clock

    Description needs to be updated, none of the timers are configured for PWM operation.

    ttmut ttmut requested changes on Oct 11, 2026 12:07 UTC
    Changes Requested Reviewer

    Thanks, looks fine for the most part. Needs some updates to documentation.

    dnguye14-adi dnguye14-adi commented on Oct 23, 2026 04:05 UTC
    Author

    @ttmut ,
    I've updated README files and Example descriptions, rebased also,
    Please help to review again,

    Thx & Rgds,

    Reviewers
    Assignees
    dnguye14-adi dnguye14-adi
    Labels
    risk: low confidence: 83.9% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 78.5% (HIGH) · Higher = larger blast radius
    78.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 83.9% · Lower = rushed or shallow review
    83.9%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 12.6% · Safe to merge
    12.6%