|
static void | blinkandwait (void) |
| Wait for a button-press while blinking the LEDs. More...
|
|
static void | ece_486_deinit (void) |
|
static void | SystemClock_Config_MSI (void) |
| System Clock Configuration. More...
|
|
static void | SystemClock_Config_HSE (void) |
| Hummels Config to give 80 MHz SYSCLK, with PLL48M1CLK=48 MHz The system Clock is configured as follows : System Clock source = PLL (HSE) SYSCLK(Hz) = 80000000 HCLK(Hz) = 80000000 AHB Prescaler = 1 APB1 Prescaler = 1 APB2 Prescaler = 1 HSE Frequency(Hz) = 8000000 (8 MHz external reference expected) PLL_M = 1 PLL_N = 20 PLL_R = 2 ( SYSCLK = PLLCLK = (8MHz)*N/M/R = 80 MHz ) PLL_P = 7 (No reason for this...) PLL_Q = 5 ( PLL48M1CLK = (16MHz)(N/M/Q) = 32 MHz !?! ) Flash Latency(WS) = 4. More...
|
|
static void | init_dac (uint16_t fs, enum Num_Channels_Out chanout) |
|
static void | init_adc (uint16_t fs, enum Num_Channels_In chanin) |
|
static void | TIM4_Config (uint16_t fs) |
|
static void | config_digital_io (void) |
| Configure a digital output pin. More...
|
|
static void | config_pushbutton (void) |
| Configure PA6 (Joystic Center) generate an interrupt. More...
|
|
static HAL_StatusTypeDef | Hacked_HAL_DAC_DualStart_DMA (DAC_HandleTypeDef *hdac, uint32_t *pData, uint32_t Length) |
|
void | initialize (uint16_t fs, enum Num_Channels_In chanin, enum Num_Channels_Out chanout) |
| Wrapper function to perform all processor initialization for ECE 486. More...
|
|
void | initialize_ece486 (uint16_t fs, enum Num_Channels_In chanin, enum Num_Channels_Out chanout, enum Clock_Reference clkref) |
| Wrapper function to perform all processor initialization for ECE 486. More...
|
|
float | getsamplingfrequency (void) |
| Simple function to return the best guess at the actual sampling frequency. More...
|
|
void | HAL_DAC_MspInit (DAC_HandleTypeDef *hdac) |
|
void | HAL_DAC_MspDeInit (DAC_HandleTypeDef *hdac) |
|
void | HAL_TIM_Base_MspInit (TIM_HandleTypeDef *htim) |
|
void | HAL_TIM_Base_MspDeInit (TIM_HandleTypeDef *htim) |
|
void | HAL_ADC_MspInit (ADC_HandleTypeDef *hadc) |
|
void | HAL_ADC_MspDeInit (ADC_HandleTypeDef *hadc) |
|
void | DMA2_Channel5_IRQHandler (void) |
|
void | TIM6_DAC_IRQHandler (void) |
|
void | ADC1_2_IRQHandler (void) |
|
void | DMA1_Channel1_IRQHandler (void) |
|
void | SysTick_Handler (void) |
|
void | EXTI0_IRQHandler (void) |
|
void | EXTI1_IRQHandler (void) |
|
void | EXTI2_IRQHandler (void) |
|
void | EXTI3_IRQHandler (void) |
|
void | EXTI9_5_IRQHandler (void) |
|
void | HAL_GPIO_EXTI_Callback (uint16_t GPIO_Pin) |
|
Processor configuration routines to support ECE 486.
- Author
- Don Hummels
- Date
- Jan 2016
Definition in file init486.c.
void SystemClock_Config_HSE |
( |
void |
| ) |
|
|
static |
Hummels Config to give 80 MHz SYSCLK, with PLL48M1CLK=48 MHz The system Clock is configured as follows : System Clock source = PLL (HSE) SYSCLK(Hz) = 80000000 HCLK(Hz) = 80000000 AHB Prescaler = 1 APB1 Prescaler = 1 APB2 Prescaler = 1 HSE Frequency(Hz) = 8000000 (8 MHz external reference expected) PLL_M = 1 PLL_N = 20 PLL_R = 2 ( SYSCLK = PLLCLK = (8MHz)*N/M/R = 80 MHz ) PLL_P = 7 (No reason for this...) PLL_Q = 5 ( PLL48M1CLK = (16MHz)(N/M/Q) = 32 MHz !?! ) Flash Latency(WS) = 4.
HSE: Driven by 8 MHz ref clock (Requires jumper changes on STM32L476G-Discovery) MSI: Not configured here HSI: 16 MHz (Fixed frequency high speed internal Oscillator) LSI: 32.768 kHz (Low freq internal oscillator) ( PLL Input = HSE*N/M = 160 MHz ) SYSCLK: 80 MHz (= 160/R) HCLK (AHB Bus, Core, Memory, and DMA): 80 MHz (Max value) PCLK1 (APB1 Periferals, some USARTs and Timers): 80 MHz (Max value) PCLK2 (APB2 Periferals, some USARTs and Timers): 80 MHz (Max value)
- Return values
-
Definition at line 293 of file init486.c.
void SystemClock_Config_MSI |
( |
void |
| ) |
|
|
static |
System Clock Configuration.
Hummels Config to give 80 MHz SYSCLK, with PLL48M1CLK=48 MHz The system Clock is configured as follows : System Clock source = PLL (MSI) SYSCLK(Hz) = 80000000 HCLK(Hz) = 80000000 AHB Prescaler = 1 APB1 Prescaler = 1 APB2 Prescaler = 1 MSI Frequency(Hz) = 16000000 (MSI Range=8) PLL_M = 2 PLL_N = 20 PLL_R = 2 ( SYSCLK = PLLCLK = (16MHz)*N/M/R = 80 MHz ) PLL_P = 7 (No reason for this...) PLL_Q = 5 ( PLL48M1CLK = (16MHz)(N/M/Q) = 32 MHz ?! ) Flash Latency(WS) = 4
HSE: Not assumed active (xtal not populated on STM32L476G-Discovery) MSI: 16 MHz (multiple speed internal RC Oscillator, configured using Range=8) HSI: 16 MHz (Fixed frequency high speed internal Oscillator) LSI: 32.768 kHz (Low freq internal oscillator) ( MSI *N/M = 160 MHz ) SYSCLK: 80 MHz (= 160/R) HCLK (AHB Bus, Core, Memory, and DMA): 80 MHz (Max value) PCLK1 (APB1 Periferals, some USARTs and Timers): 80 MHz (Max value) PCLK2 (APB2 Periferals, some USARTs and Timers): 80 MHz (Max value)
(ALTERNATIVE??? Use the HSI as the reference oscillator. Change N to 15.)
- Parameters
-
- Return values
-
Definition at line 226 of file init486.c.