This should be configured by the user.
Macros | |
| #define | F_CPU <value> |
| The system frequency. | |
| #define | CLASSB_TC_MOD 0 |
| TC module selection. | |
| #define | CLASSB_TC_PRESCALER 8 |
| TC prescaler. | |
| #define | CLASSB_TOLERANCE 25UL |
| Tolerance for the CPU frequency deviation. | |
| #define F_CPU <value> |
The system frequency.
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.
Definition at line 109 of file classb_freq.h.
| #define CLASSB_TC_MOD 0 |
TC module selection.
This is the number of the TC module that should be used for the CPU frequency test, e.g. 0 -> TCC0.
Definition at line 116 of file classb_freq.h.
| #define CLASSB_TC_PRESCALER 8 |
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.
Definition at line 122 of file classb_freq.h.
| #define CLASSB_TOLERANCE 25UL |
Tolerance for the CPU frequency deviation.
This value defines the tolerance (an integer, %) for the deviation between the measured and expected CPU, e.g. 25 -> 25%.
Definition at line 128 of file classb_freq.h.