Skip to content

Commit

Permalink
Adding clock measure documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-gillespie committed Jan 16, 2025
1 parent ab477d5 commit 5b692ed
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Libraries/PeriphDrivers/Include/MAX32657/mxc_sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ uint32_t MXC_SYS_RiscVClockRate(void);
int MXC_SYS_LockDAP_Permanent(void);

/**
* @brief Measure the clock frequency.
* @brief Measure the clock frequency, blocking.
*
* @details Assumes that measurement clock and ERFO are enabled.
* Increasing compareClockTicks will provide a more accurate measurement,
Expand All @@ -369,9 +369,25 @@ int MXC_SYS_LockDAP_Permanent(void);
*
* @param clock Enumeration for which clock to measure.
* @param compareClockTicks Number of ticks of the comparison clock to use for measurement.
* @return clock frequency
*/
uint32_t MXC_SYS_ClockMeasure(mxc_sys_compare_clock_t clock, uint32_t compareClockTicks);

/**
* @brief Start clock frequency measurement, non blocking.
*
* @param clock Enumeration for which clock to measure.
* @param compareClockTicks Number of ticks of the comparison clock to use for measurement.
*/
void MXC_SYS_StartClockMeasure(mxc_sys_compare_clock_t clock, uint32_t compareClockTicks);

/**
* @brief Get clock frequency measurement after calling start, non blocking.
*
* @param clock Enumeration for which clock to measure.
* @param compareClockTicks Number of ticks of the comparison clock to use for measurement.
* @return clock frequency, 0 if measurement is unfinished.
*/
uint32_t MXC_SYS_GetClockMeasure(void);

#ifdef __cplusplus
Expand Down

0 comments on commit 5b692ed

Please sign in to comment.