#include <common/p33c_pral/p33c_osc.h>
Data Fields | |
volatile uint32_t | frc |
volatile uint32_t | fpri |
volatile uint32_t | fclk |
volatile uint32_t | fosc |
volatile uint32_t | fcy |
volatile uint32_t | fp |
volatile uint32_t | fpllo |
volatile uint32_t | fvco |
volatile float | tp |
volatile float | tcy |
volatile uint32_t | afpllo |
volatile uint32_t | afvco |
System OSCILLATOR_SYSTEM_FREQUENCIES_t
Summary: Global data structure holding system frequencies of different clock domains
Description: The data structure "system_frequencies" of type OSCILLATOR_SYSTEM_FREQUENCIES_t is used to broadcast most recent system frequencies of multiple clock domains. Contents of this data structure are NOT updated automatically.
The function osc_get_frequencies() must be called from user code to update/refresh the contents of this data structure every time a oscillator configuration has been changed.
Example: The following code lines initialize the internal FRC oscillator for 100 MIPS operation and the auxiliary PLL for 500 MHz to support 250ps resolution of the PWM module. After both configurations have been set, the function 'osc_get_frequencies()' is used to update the most recent frequencies of multiple clock domains.
init_FRCCLK_Defaults(CPU_SPEED_100_MIPS); // Initialize FRC for 100 MIPS operation init_AUXCLK_500MHz(); // Initialize AuxPLL for 500 MHz clock output osc_get_frequencies(0); // Update system frequencies data structure
Please note: When an external oscillator is used, the function osc_get_frequencies() must be called to set the external frequency value in [Hz] and update all related frequencies accordingly. If only the internal FRC oscillator is used, this parameter should be set = 0.
Definition at line 125 of file p33c_osc.h.
volatile uint32_t afpllo |
Definition at line 136 of file p33c_osc.h.
volatile uint32_t afvco |
Definition at line 137 of file p33c_osc.h.
volatile uint32_t fclk |
Definition at line 128 of file p33c_osc.h.
volatile uint32_t fcy |
Definition at line 130 of file p33c_osc.h.
volatile uint32_t fosc |
Definition at line 129 of file p33c_osc.h.
volatile uint32_t fp |
Definition at line 131 of file p33c_osc.h.
volatile uint32_t fpllo |
Definition at line 132 of file p33c_osc.h.
volatile uint32_t fpri |
Definition at line 127 of file p33c_osc.h.
volatile uint32_t frc |
Definition at line 126 of file p33c_osc.h.
volatile uint32_t fvco |
Definition at line 133 of file p33c_osc.h.
volatile float tcy |
Definition at line 135 of file p33c_osc.h.
volatile float tp |
Definition at line 134 of file p33c_osc.h.