跳转至

HRCAP外设

1.HRCAP_isBaseValid(uint32_t base)

函数说明:检查给定的基地址是否有效。

参数说明: - 输入参数: - base: 要检查的基地址(uint32_t类型)。 - 输出参数: - 返回值**: - true(如果基地址有效,即等于HRCAP6_BASEHRCAP7_BASE) - false(如果基地址无效)


2. HRCAP_enableHighResolution(uint32_t base)

函数说明: 启用高分辨率计时。

参数说明: - 输入参数: - base: 基地址(uint32_t类型)。 - 输出参数: 无返回值。


3. HRCAP_enableHighResolutionClock(uint32_t base)

函数说明: 启用高分辨率时钟。

参数说明: - 输入参数: - base: 基地址(uint32_t类型)。 - 输出参数: 无返回值。


4. HRCAP_disableHighResolutionClock(uint32_t base)

函数说明: 禁用高分辨率时钟。

参数说明: - 输入参数: - base: 基地址(uint32_t类型)。 - 输出参数: 无返回值。


5. HRCAP_startCalibration(uint32_t base)

函数说明: 启动校准过程。

参数说明: - 输入参数: - base: 基地址(uint32_t类型)。 - 输出参数: 无返回值。


6. HRCAP_setCalibrationMode(uint32_t base)

函数说明: 设置校准模式。

参数说明: - 输入参数: - base: 基地址(uint32_t类型)。 - 输出参数: 无返回值。


7. HRCAP_enableCalibrationInterrupt(uint32_t base, uint16_t intFlags)

函数说明: 启用校准中断。

参数说明: - 输入参数: - base: 基地址(uint32_t类型)。 - intFlags: 中断标志(uint16_t类型)。 - 输出参数: 无返回值。


8. HRCAP_disableCalibrationInterrupt(uint32_t base, uint16_t intFlags)

函数说明: 禁用校准中断。

参数说明: - 输入参数: - base: 基地址(uint32_t类型)。 - intFlags: 中断标志(uint16_t类型)。 - 输出参数: 无返回值。


9. HRCAP_getCalibrationFlags(uint32_t base)

函数说明: 获取当前校准标志。

参数说明: - 输入参数: - base: 基地址(uint32_t类型)。 - 输出参数: - 返回值: 返回校准标志(uint16_t类型)。


10. HRCAP_clearCalibrationFlags(uint32_t base, uint16_t flags)

函数说明: 清除指定的校准标志。

参数说明: - 输入参数: - base: 基地址(uint32_t类型)。 - flags: 要清除的标志(uint16_t类型)。 - 输出参数: 无返回值。


11. HRCAP_isCalibrationBusy(uint32_t base)

函数说明: 检查校准是否正在进行。

参数说明: - 输入参数: - base: 基地址(uint32_t类型)。 - 输出参数: - 返回值: - true(校准正在进行) - false(校准未进行)


12. HRCAP_forceCalibrationFlags(uint32_t base, uint16_t flag)

函数说明: 强制设置校准标志。

参数说明: - 输入参数: - base: 基地址(uint32_t类型)。 - flag: 要设置的标志(uint16_t类型)。 - 输出参数: 无返回值。


13. HRCAP_setCalibrationPeriod(uint32_t base, uint32_t sysclkHz)

函数说明: 设置校准周期。

参数说明: - 输入参数: - base: 基地址(uint32_t类型)。 - sysclkHz: 系统时钟频率(uint32_t类型)。 - 输出参数: 无返回值。


14. HRCAP_configCalibrationPeriod(uint32_t base, uint32_t sysclkHz, float periodInMs)

函数说明: 配置校准周期。

参数说明: - 输入参数: - base: 基地址(uint32_t类型)。 - sysclkHz: 系统时钟频率(uint32_t类型)。 - periodInMs: 周期(毫秒,float类型)。 - 输出参数: 无返回值。


15. HRCAP_getCalibrationClockPeriod(uint32_t base, HRCAP_CalibrationClockSource clockSource)

函数说明: 获取校准时钟周期。

参数说明: - 输入参数: - base: 基地址(uint32_t类型)。 - clockSource: 校准时钟源(HRCAP_CalibrationClockSource类型)。 - 输出参数: - 返回值: 返回校准时钟周期(uint32_t类型)。


16. HRCAP_getScaleFactor(uint32_t base)

函数说明: 计算并返回缩放因子。

参数说明: - 输入参数: - base: 基地址(uint32_t类型)。 - 输出参数: - 返回值: 返回缩放因子(float32_t类型)。


17. HRCAP_convertEventTimeStampNanoseconds(uint32_t timeStamp, float32_t scaleFactor)

函数说明: 将原始时间戳值转换为纳秒。

参数说明: - 输入参数: - timeStamp: 原始时间戳(uint32_t类型)。 - scaleFactor: 缩放因子(float32_t类型)。 - 输出参数: - 返回值: 返回转换后的时间(纳秒,float32_t类型)。