|
EV Logger
A MSP430 based datalogger for an electric vehicle
|
Handles intrinsic system functionality such as controlling the CPU core clock and ensuring its stability, providing a real time "wall clock" source, etc. More...
Functions | |
| void | clock_init (void) |
| Use timer A0 to set up a system clock ticking at 1ms intervals. | |
| void | sys_clock_init (void) |
| Configure the system core clock to provide a stable clock for the CPU. More... | |
| clock_time_t | clock_time (void) |
| Return the current system time. More... | |
| void | _delay_ms (clock_time_t delay) |
| Delay for the provided number of milliseconds. More... | |
| interrupt (TIMER0_A0_VECTOR) | |
| Interrupt service routine for the system ticks counter. More... | |
Variables | |
| static volatile clock_time_t | ticks |
| Current clock time. | |
Handles intrinsic system functionality such as controlling the CPU core clock and ensuring its stability, providing a real time "wall clock" source, etc.
The core clock is generated using onboard equipment, with the reference being an external 4MHz high precision crystal. Since the core clock frequency is much higher than the reference, a frequency locked loop (FLL) system is paired with a digitally controlled oscillator (DCO) to provide a stabilised source via feedback. This system is fantastically complicated and reading of the datasheet (specific to the F5529) is recommended before attempting to understand what is going on in this module!
1.8.6