This should be configured by the user.
Macros | |
#define | CLASSB_TC_MOD D1 |
TC module selection. More... | |
#define | CLASSB_TC_PRESCALER 64 |
TC prescaler. More... | |
#define | CLASSB_TC_TOLERANCE 25UL |
Tolerance for the CPU frequency deviation. More... | |
#define | F_CPU <value> |
The system frequency. More... | |
#define CLASSB_TC_MOD D1 |
TC module selection.
This is the specifier of the TC module that should be used for the CPU frequency test, e.g., C0 -> TCC0.
#define CLASSB_TC_PRESCALER 64 |
TC prescaler.
The TC runs on the system clock scaled down by this parameter. Possible values are 1, 2, 4, 8, 64, 256 or 1024.
#define CLASSB_TC_TOLERANCE 25UL |
Tolerance for the CPU frequency deviation.
This value defines the tolerance (an integer, %) for the deviation between the measured and expected CPU frequency, e.g., 25 -> 25%.
#define F_CPU <value> |
The system frequency.
MCU Clock Frequency (Hertz)
This is the expected frequency (Hz) of the CPU. This value has to be defined at the compiler level and it is only used to compute the TC count reference, i.e., not to set the system clock. Therefore, this value should be consistent with the system clock settings in the main application. However, this constant could be used to test the self-diagnostic routine, i.e., a wrong value could be set to check whether the failure is detected.