kopia lustrzana https://github.com/SP8EBC/ParaTNC
PLL configuration corrected for L476_Parameteo target
rodzic
e0cf17200f
commit
31ac5c9874
11
src/io.c
11
src/io.c
|
@ -58,7 +58,7 @@ void io_ext_watchdog_config(void) {
|
|||
#ifdef STM32L471xx
|
||||
GPIO_InitTypeDef.Mode = LL_GPIO_MODE_OUTPUT;
|
||||
GPIO_InitTypeDef.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
|
||||
GPIO_InitTypeDef.Pin = LL_GPIO_PIN_12;
|
||||
GPIO_InitTypeDef.Pin = LL_GPIO_PIN_1;
|
||||
GPIO_InitTypeDef.Pull = LL_GPIO_PULL_NO;
|
||||
GPIO_InitTypeDef.Speed = LL_GPIO_SPEED_FREQ_MEDIUM;
|
||||
GPIO_InitTypeDef.Alternate = LL_GPIO_AF_7;
|
||||
|
@ -72,7 +72,14 @@ void io_ext_watchdog_service(void) {
|
|||
#endif
|
||||
|
||||
#ifdef STM32L471xx
|
||||
|
||||
if ((GPIOA->ODR & GPIO_ODR_OD1) == 0) {
|
||||
// set high
|
||||
GPIOA->BSRR |= GPIO_BSRR_BS1;
|
||||
}
|
||||
else {
|
||||
// set low
|
||||
GPIOA->BSRR |= GPIO_BSRR_BR1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "LedConfig.h"
|
||||
//#include "afsk.h"
|
||||
#include "diag/Trace.h"
|
||||
#include "io.h"
|
||||
|
||||
#include "station_config.h"
|
||||
|
||||
|
@ -183,6 +184,7 @@ void TIM7_IRQHandler(void) {
|
|||
#define ASC2 adc_sample_c2
|
||||
AdcBuffer[ASC] = ADC1->DR;
|
||||
if(ASC == 3) {
|
||||
// io_ext_watchdog_service();
|
||||
AdcValue = (short int)(( AdcBuffer[0] + AdcBuffer[1] + AdcBuffer[2] + AdcBuffer[3]) >> 1);
|
||||
AFSK_ADC_ISR(&main_afsk, (AdcValue - 4095) );
|
||||
led_control_led1_upper(main_ax25.dcd);
|
||||
|
|
|
@ -367,6 +367,9 @@ int SystemClock_Config_L4(void)
|
|||
// be sure that PLL is not running
|
||||
while ((RCC->CR & RCC_CR_PLLRDY) != 0);
|
||||
|
||||
// reset PLLCFGR register
|
||||
RCC->PLLCFGR = 0;
|
||||
|
||||
// set the clock source for PLL
|
||||
RCC->PLLCFGR |= RCC_PLLCFGR_PLLSRC_HSE;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue