58 #include "HL_system.h"
69 #define MCU_RTI_CNT0_CPUC0_REG (0x00000001u)
72 #define MCU_US_WAIT_TIMEOUT (10000u)
103 const uint32_t rti_nrOfCounts_us = (uint32_t)(((float_t)
mcu_frcClock_Hz) / 1e6f);
108 uint32_t timeOut = 0;
116 if ((checkValue - startValue) >= (delay_us * rti_nrOfCounts_us)) {
129 const uint32_t rti_nrOfCounts_us = (uint32_t)(((float_t)
mcu_frcClock_Hz) / 1e6f);
130 return count / rti_nrOfCounts_us;
137 if (timeDifference_us < timeout_us) {
146 #ifdef UNITY_UNIT_TEST
uint32_t MCU_GetFreeRunningCount(void)
Get the current value of the Free Running Counter 0 (FRC0)
uint32_t MCU_ConvertFrcDifferenceToTimespan_us(uint32_t count)
Convert the counter value FRC0 to a time in microseconds.
void MCU_Delay_us(uint32_t delay_us)
Wait blocking a certain time in microseconds.
#define MCU_US_WAIT_TIMEOUT
#define MCU_RTI_CNT0_CPUC0_REG
static const uint32_t mcu_frcClock_Hz
frequency of the FRC0 counter
bool MCU_IsTimeElapsed(uint32_t startCounter, uint32_t timeout_us)
Checks if a timeout in microseconds has elapsed.
Headers for the driver for the MCU module.
#define MCU_RTI_CNT0_FRC0_REG