DEVEL activate button B1, correct some line endings

This commit is contained in:
Tom Kuschel 2022-05-27 21:29:56 +02:00
parent 136191111f
commit efdf1e0764
7 changed files with 990 additions and 908 deletions

View File

@ -1,98 +1,100 @@
/* USER CODE BEGIN Header */ /* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* @file : main.h * @file : main.h
* @brief : Header for main.c file. * @brief : Header for main.c file.
* This file contains the common defines of the application. * This file contains the common defines of the application.
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* Copyright (c) 2022 STMicroelectronics. * Copyright (c) 2022 STMicroelectronics.
* All rights reserved. * All rights reserved.
* *
* This software is licensed under terms that can be found in the LICENSE file * This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component. * in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS. * If no LICENSE file comes with this software, it is provided AS-IS.
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */ /* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H #ifndef __MAIN_H
#define __MAIN_H #define __MAIN_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#include "stm32l4xx_hal.h" #include "stm32l4xx_hal.h"
/* Private includes ----------------------------------------------------------*/ /* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */ /* USER CODE BEGIN Includes */
/* USER CODE END Includes */ /* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/ /* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */ /* USER CODE BEGIN ET */
/* USER CODE END ET */ /* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */ /* USER CODE BEGIN EC */
/* USER CODE END EC */ /* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */ /* USER CODE BEGIN EM */
/* USER CODE END EM */ /* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/ /* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void); void Error_Handler(void);
/* USER CODE BEGIN EFP */ /* USER CODE BEGIN EFP */
/* USER CODE END EFP */ /* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/ /* Private defines -----------------------------------------------------------*/
#define LD3_Pin GPIO_PIN_14 #define B1_Pin GPIO_PIN_13
#define LD3_GPIO_Port GPIOB #define B1_GPIO_Port GPIOC
#define USB_OverCurrent_Pin GPIO_PIN_5 #define LD3_Pin GPIO_PIN_14
#define USB_OverCurrent_GPIO_Port GPIOG #define LD3_GPIO_Port GPIOB
#define USB_PowerSwitchOn_Pin GPIO_PIN_6 #define USB_OverCurrent_Pin GPIO_PIN_5
#define USB_PowerSwitchOn_GPIO_Port GPIOG #define USB_OverCurrent_GPIO_Port GPIOG
#define STLK_RX_Pin GPIO_PIN_7 #define USB_PowerSwitchOn_Pin GPIO_PIN_6
#define STLK_RX_GPIO_Port GPIOG #define USB_PowerSwitchOn_GPIO_Port GPIOG
#define STLK_TX_Pin GPIO_PIN_8 #define STLK_RX_Pin GPIO_PIN_7
#define STLK_TX_GPIO_Port GPIOG #define STLK_RX_GPIO_Port GPIOG
#define LD1_Pin GPIO_PIN_7 #define STLK_TX_Pin GPIO_PIN_8
#define LD1_GPIO_Port GPIOC #define STLK_TX_GPIO_Port GPIOG
#define USB_SOF_Pin GPIO_PIN_8 #define LD1_Pin GPIO_PIN_7
#define USB_SOF_GPIO_Port GPIOA #define LD1_GPIO_Port GPIOC
#define USB_VBUS_Pin GPIO_PIN_9 #define USB_SOF_Pin GPIO_PIN_8
#define USB_VBUS_GPIO_Port GPIOA #define USB_SOF_GPIO_Port GPIOA
#define USB_ID_Pin GPIO_PIN_10 #define USB_VBUS_Pin GPIO_PIN_9
#define USB_ID_GPIO_Port GPIOA #define USB_VBUS_GPIO_Port GPIOA
#define USB_DM_Pin GPIO_PIN_11 #define USB_ID_Pin GPIO_PIN_10
#define USB_DM_GPIO_Port GPIOA #define USB_ID_GPIO_Port GPIOA
#define USB_DP_Pin GPIO_PIN_12 #define USB_DM_Pin GPIO_PIN_11
#define USB_DP_GPIO_Port GPIOA #define USB_DM_GPIO_Port GPIOA
#define TMS_Pin GPIO_PIN_13 #define USB_DP_Pin GPIO_PIN_12
#define TMS_GPIO_Port GPIOA #define USB_DP_GPIO_Port GPIOA
#define TCK_Pin GPIO_PIN_14 #define TMS_Pin GPIO_PIN_13
#define TCK_GPIO_Port GPIOA #define TMS_GPIO_Port GPIOA
#define SWO_Pin GPIO_PIN_3 #define TCK_Pin GPIO_PIN_14
#define SWO_GPIO_Port GPIOB #define TCK_GPIO_Port GPIOA
#define LD2_Pin GPIO_PIN_7 #define SWO_Pin GPIO_PIN_3
#define LD2_GPIO_Port GPIOB #define SWO_GPIO_Port GPIOB
/* USER CODE BEGIN Private defines */ #define LD2_Pin GPIO_PIN_7
#define LD2_GPIO_Port GPIOB
/* USER CODE END Private defines */ /* USER CODE BEGIN Private defines */
#ifdef __cplusplus /* USER CODE END Private defines */
}
#endif #ifdef __cplusplus
}
#endif /* __MAIN_H */ #endif
#endif /* __MAIN_H */

View File

@ -152,7 +152,6 @@ char * si5351_read_register_debug(si5351_inst_t inst, char *buf, size_t bufsize,
int si5351_write_data(si5351_inst_t inst, void * data); int si5351_write_data(si5351_inst_t inst, void * data);
int si5351_read_data(si5351_inst_t inst, void * data); int si5351_read_data(si5351_inst_t inst, void * data);
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
#endif #endif

View File

@ -1,482 +1,482 @@
/* USER CODE BEGIN Header */ /* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* @file stm32l4xx_hal_conf.h * @file stm32l4xx_hal_conf.h
* @author MCD Application Team * @author MCD Application Team
* @brief HAL configuration template file. * @brief HAL configuration template file.
* This file should be copied to the application folder and renamed * This file should be copied to the application folder and renamed
* to stm32l4xx_hal_conf.h. * to stm32l4xx_hal_conf.h.
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved. * All rights reserved.
* *
* This software is licensed under terms that can be found in the LICENSE file * This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component. * in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS. * If no LICENSE file comes with this software, it is provided AS-IS.
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */ /* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef STM32L4xx_HAL_CONF_H #ifndef STM32L4xx_HAL_CONF_H
#define STM32L4xx_HAL_CONF_H #define STM32L4xx_HAL_CONF_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* Exported types ------------------------------------------------------------*/ /* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/
/* ########################## Module Selection ############################## */ /* ########################## Module Selection ############################## */
/** /**
* @brief This is the list of modules to be used in the HAL driver * @brief This is the list of modules to be used in the HAL driver
*/ */
#define HAL_MODULE_ENABLED #define HAL_MODULE_ENABLED
/*#define HAL_ADC_MODULE_ENABLED */ /*#define HAL_ADC_MODULE_ENABLED */
/*#define HAL_CRYP_MODULE_ENABLED */ /*#define HAL_CRYP_MODULE_ENABLED */
/*#define HAL_CAN_MODULE_ENABLED */ /*#define HAL_CAN_MODULE_ENABLED */
/*#define HAL_COMP_MODULE_ENABLED */ /*#define HAL_COMP_MODULE_ENABLED */
/*#define HAL_CRC_MODULE_ENABLED */ /*#define HAL_CRC_MODULE_ENABLED */
/*#define HAL_CRYP_MODULE_ENABLED */ /*#define HAL_CRYP_MODULE_ENABLED */
/*#define HAL_DAC_MODULE_ENABLED */ /*#define HAL_DAC_MODULE_ENABLED */
/*#define HAL_DCMI_MODULE_ENABLED */ /*#define HAL_DCMI_MODULE_ENABLED */
/*#define HAL_DMA2D_MODULE_ENABLED */ /*#define HAL_DMA2D_MODULE_ENABLED */
/*#define HAL_DFSDM_MODULE_ENABLED */ /*#define HAL_DFSDM_MODULE_ENABLED */
/*#define HAL_DSI_MODULE_ENABLED */ /*#define HAL_DSI_MODULE_ENABLED */
/*#define HAL_FIREWALL_MODULE_ENABLED */ /*#define HAL_FIREWALL_MODULE_ENABLED */
/*#define HAL_GFXMMU_MODULE_ENABLED */ /*#define HAL_GFXMMU_MODULE_ENABLED */
/*#define HAL_HCD_MODULE_ENABLED */ /*#define HAL_HCD_MODULE_ENABLED */
/*#define HAL_HASH_MODULE_ENABLED */ /*#define HAL_HASH_MODULE_ENABLED */
/*#define HAL_I2S_MODULE_ENABLED */ /*#define HAL_I2S_MODULE_ENABLED */
/*#define HAL_IRDA_MODULE_ENABLED */ /*#define HAL_IRDA_MODULE_ENABLED */
/*#define HAL_IWDG_MODULE_ENABLED */ /*#define HAL_IWDG_MODULE_ENABLED */
/*#define HAL_LTDC_MODULE_ENABLED */ /*#define HAL_LTDC_MODULE_ENABLED */
/*#define HAL_LCD_MODULE_ENABLED */ /*#define HAL_LCD_MODULE_ENABLED */
/*#define HAL_LPTIM_MODULE_ENABLED */ /*#define HAL_LPTIM_MODULE_ENABLED */
/*#define HAL_MMC_MODULE_ENABLED */ /*#define HAL_MMC_MODULE_ENABLED */
/*#define HAL_NAND_MODULE_ENABLED */ /*#define HAL_NAND_MODULE_ENABLED */
/*#define HAL_NOR_MODULE_ENABLED */ /*#define HAL_NOR_MODULE_ENABLED */
/*#define HAL_OPAMP_MODULE_ENABLED */ /*#define HAL_OPAMP_MODULE_ENABLED */
/*#define HAL_OSPI_MODULE_ENABLED */ /*#define HAL_OSPI_MODULE_ENABLED */
/*#define HAL_OSPI_MODULE_ENABLED */ /*#define HAL_OSPI_MODULE_ENABLED */
/*#define HAL_PCD_MODULE_ENABLED */ /*#define HAL_PCD_MODULE_ENABLED */
/*#define HAL_PKA_MODULE_ENABLED */ /*#define HAL_PKA_MODULE_ENABLED */
/*#define HAL_QSPI_MODULE_ENABLED */ /*#define HAL_QSPI_MODULE_ENABLED */
/*#define HAL_QSPI_MODULE_ENABLED */ /*#define HAL_QSPI_MODULE_ENABLED */
/*#define HAL_RNG_MODULE_ENABLED */ /*#define HAL_RNG_MODULE_ENABLED */
#define HAL_RTC_MODULE_ENABLED #define HAL_RTC_MODULE_ENABLED
/*#define HAL_SAI_MODULE_ENABLED */ /*#define HAL_SAI_MODULE_ENABLED */
/*#define HAL_SD_MODULE_ENABLED */ /*#define HAL_SD_MODULE_ENABLED */
/*#define HAL_SMBUS_MODULE_ENABLED */ /*#define HAL_SMBUS_MODULE_ENABLED */
/*#define HAL_SMARTCARD_MODULE_ENABLED */ /*#define HAL_SMARTCARD_MODULE_ENABLED */
/*#define HAL_SPI_MODULE_ENABLED */ /*#define HAL_SPI_MODULE_ENABLED */
/*#define HAL_SRAM_MODULE_ENABLED */ /*#define HAL_SRAM_MODULE_ENABLED */
/*#define HAL_SWPMI_MODULE_ENABLED */ /*#define HAL_SWPMI_MODULE_ENABLED */
#define HAL_TIM_MODULE_ENABLED #define HAL_TIM_MODULE_ENABLED
/*#define HAL_TSC_MODULE_ENABLED */ /*#define HAL_TSC_MODULE_ENABLED */
#define HAL_UART_MODULE_ENABLED #define HAL_UART_MODULE_ENABLED
/*#define HAL_USART_MODULE_ENABLED */ /*#define HAL_USART_MODULE_ENABLED */
/*#define HAL_WWDG_MODULE_ENABLED */ /*#define HAL_WWDG_MODULE_ENABLED */
/*#define HAL_EXTI_MODULE_ENABLED */ /*#define HAL_EXTI_MODULE_ENABLED */
/*#define HAL_PSSI_MODULE_ENABLED */ /*#define HAL_PSSI_MODULE_ENABLED */
#define HAL_GPIO_MODULE_ENABLED #define HAL_GPIO_MODULE_ENABLED
#define HAL_EXTI_MODULE_ENABLED #define HAL_EXTI_MODULE_ENABLED
#define HAL_I2C_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED
#define HAL_DMA_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED
#define HAL_RCC_MODULE_ENABLED #define HAL_RCC_MODULE_ENABLED
#define HAL_FLASH_MODULE_ENABLED #define HAL_FLASH_MODULE_ENABLED
#define HAL_PWR_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED
#define HAL_CORTEX_MODULE_ENABLED #define HAL_CORTEX_MODULE_ENABLED
/* ########################## Oscillator Values adaptation ####################*/ /* ########################## Oscillator Values adaptation ####################*/
/** /**
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application. * @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
* This value is used by the RCC HAL module to compute the system frequency * This value is used by the RCC HAL module to compute the system frequency
* (when HSE is used as system clock source, directly or through the PLL). * (when HSE is used as system clock source, directly or through the PLL).
*/ */
#if !defined (HSE_VALUE) #if !defined (HSE_VALUE)
#define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */ #define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */
#endif /* HSE_VALUE */ #endif /* HSE_VALUE */
#if !defined (HSE_STARTUP_TIMEOUT) #if !defined (HSE_STARTUP_TIMEOUT)
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
#endif /* HSE_STARTUP_TIMEOUT */ #endif /* HSE_STARTUP_TIMEOUT */
/** /**
* @brief Internal Multiple Speed oscillator (MSI) default value. * @brief Internal Multiple Speed oscillator (MSI) default value.
* This value is the default MSI range value after Reset. * This value is the default MSI range value after Reset.
*/ */
#if !defined (MSI_VALUE) #if !defined (MSI_VALUE)
#define MSI_VALUE ((uint32_t)4000000U) /*!< Value of the Internal oscillator in Hz*/ #define MSI_VALUE ((uint32_t)4000000U) /*!< Value of the Internal oscillator in Hz*/
#endif /* MSI_VALUE */ #endif /* MSI_VALUE */
/** /**
* @brief Internal High Speed oscillator (HSI) value. * @brief Internal High Speed oscillator (HSI) value.
* This value is used by the RCC HAL module to compute the system frequency * This value is used by the RCC HAL module to compute the system frequency
* (when HSI is used as system clock source, directly or through the PLL). * (when HSI is used as system clock source, directly or through the PLL).
*/ */
#if !defined (HSI_VALUE) #if !defined (HSI_VALUE)
#define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/ #define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/
#endif /* HSI_VALUE */ #endif /* HSI_VALUE */
/** /**
* @brief Internal High Speed oscillator (HSI48) value for USB FS, SDMMC and RNG. * @brief Internal High Speed oscillator (HSI48) value for USB FS, SDMMC and RNG.
* This internal oscillator is mainly dedicated to provide a high precision clock to * This internal oscillator is mainly dedicated to provide a high precision clock to
* the USB peripheral by means of a special Clock Recovery System (CRS) circuitry. * the USB peripheral by means of a special Clock Recovery System (CRS) circuitry.
* When the CRS is not used, the HSI48 RC oscillator runs on it default frequency * When the CRS is not used, the HSI48 RC oscillator runs on it default frequency
* which is subject to manufacturing process variations. * which is subject to manufacturing process variations.
*/ */
#if !defined (HSI48_VALUE) #if !defined (HSI48_VALUE)
#define HSI48_VALUE ((uint32_t)48000000U) /*!< Value of the Internal High Speed oscillator for USB FS/SDMMC/RNG in Hz. #define HSI48_VALUE ((uint32_t)48000000U) /*!< Value of the Internal High Speed oscillator for USB FS/SDMMC/RNG in Hz.
The real value my vary depending on manufacturing process variations.*/ The real value my vary depending on manufacturing process variations.*/
#endif /* HSI48_VALUE */ #endif /* HSI48_VALUE */
/** /**
* @brief Internal Low Speed oscillator (LSI) value. * @brief Internal Low Speed oscillator (LSI) value.
*/ */
#if !defined (LSI_VALUE) #if !defined (LSI_VALUE)
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/ #define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
The real value may vary depending on the variations The real value may vary depending on the variations
in voltage and temperature.*/ in voltage and temperature.*/
/** /**
* @brief External Low Speed oscillator (LSE) value. * @brief External Low Speed oscillator (LSE) value.
* This value is used by the UART, RTC HAL module to compute the system frequency * This value is used by the UART, RTC HAL module to compute the system frequency
*/ */
#if !defined (LSE_VALUE) #if !defined (LSE_VALUE)
#define LSE_VALUE 32768U /*!< Value of the External oscillator in Hz*/ #define LSE_VALUE 32768U /*!< Value of the External oscillator in Hz*/
#endif /* LSE_VALUE */ #endif /* LSE_VALUE */
#if !defined (LSE_STARTUP_TIMEOUT) #if !defined (LSE_STARTUP_TIMEOUT)
#define LSE_STARTUP_TIMEOUT 50000U /*!< Time out for LSE start up, in ms */ #define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */
#endif /* HSE_STARTUP_TIMEOUT */ #endif /* HSE_STARTUP_TIMEOUT */
/** /**
* @brief External clock source for SAI1 peripheral * @brief External clock source for SAI1 peripheral
* This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source * This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source
* frequency. * frequency.
*/ */
#if !defined (EXTERNAL_SAI1_CLOCK_VALUE) #if !defined (EXTERNAL_SAI1_CLOCK_VALUE)
#define EXTERNAL_SAI1_CLOCK_VALUE 2097000U /*!< Value of the SAI1 External clock source in Hz*/ #define EXTERNAL_SAI1_CLOCK_VALUE 2097000U /*!< Value of the SAI1 External clock source in Hz*/
#endif /* EXTERNAL_SAI1_CLOCK_VALUE */ #endif /* EXTERNAL_SAI1_CLOCK_VALUE */
/** /**
* @brief External clock source for SAI2 peripheral * @brief External clock source for SAI2 peripheral
* This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source * This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source
* frequency. * frequency.
*/ */
#if !defined (EXTERNAL_SAI2_CLOCK_VALUE) #if !defined (EXTERNAL_SAI2_CLOCK_VALUE)
#define EXTERNAL_SAI2_CLOCK_VALUE 2097000U /*!< Value of the SAI2 External clock source in Hz*/ #define EXTERNAL_SAI2_CLOCK_VALUE 2097000U /*!< Value of the SAI2 External clock source in Hz*/
#endif /* EXTERNAL_SAI2_CLOCK_VALUE */ #endif /* EXTERNAL_SAI2_CLOCK_VALUE */
/* Tip: To avoid modifying this file each time you need to use different HSE, /* Tip: To avoid modifying this file each time you need to use different HSE,
=== you can define the HSE value in your toolchain compiler preprocessor. */ === you can define the HSE value in your toolchain compiler preprocessor. */
/* ########################### System Configuration ######################### */ /* ########################### System Configuration ######################### */
/** /**
* @brief This is the HAL system configuration section * @brief This is the HAL system configuration section
*/ */
#define VDD_VALUE 3300U /*!< Value of VDD in mv */ #define VDD_VALUE 3300U /*!< Value of VDD in mv */
#define TICK_INT_PRIORITY 15U /*!< tick interrupt priority */ #define TICK_INT_PRIORITY 15U /*!< tick interrupt priority */
#define USE_RTOS 0U #define USE_RTOS 0U
#define PREFETCH_ENABLE 0U #define PREFETCH_ENABLE 0U
#define INSTRUCTION_CACHE_ENABLE 1U #define INSTRUCTION_CACHE_ENABLE 1U
#define DATA_CACHE_ENABLE 1U #define DATA_CACHE_ENABLE 1U
/* ########################## Assert Selection ############################## */ /* ########################## Assert Selection ############################## */
/** /**
* @brief Uncomment the line below to expanse the "assert_param" macro in the * @brief Uncomment the line below to expanse the "assert_param" macro in the
* HAL drivers code * HAL drivers code
*/ */
/* #define USE_FULL_ASSERT 1U */ /* #define USE_FULL_ASSERT 1U */
/* ################## Register callback feature configuration ############### */ /* ################## Register callback feature configuration ############### */
/** /**
* @brief Set below the peripheral configuration to "1U" to add the support * @brief Set below the peripheral configuration to "1U" to add the support
* of HAL callback registration/deregistration feature for the HAL * of HAL callback registration/deregistration feature for the HAL
* driver(s). This allows user application to provide specific callback * driver(s). This allows user application to provide specific callback
* functions thanks to HAL_PPP_RegisterCallback() rather than overwriting * functions thanks to HAL_PPP_RegisterCallback() rather than overwriting
* the default weak callback functions (see each stm32l4xx_hal_ppp.h file * the default weak callback functions (see each stm32l4xx_hal_ppp.h file
* for possible callback identifiers defined in HAL_PPP_CallbackIDTypeDef * for possible callback identifiers defined in HAL_PPP_CallbackIDTypeDef
* for each PPP peripheral). * for each PPP peripheral).
*/ */
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U #define USE_HAL_ADC_REGISTER_CALLBACKS 0U
#define USE_HAL_CAN_REGISTER_CALLBACKS 0U #define USE_HAL_CAN_REGISTER_CALLBACKS 0U
#define USE_HAL_COMP_REGISTER_CALLBACKS 0U #define USE_HAL_COMP_REGISTER_CALLBACKS 0U
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U #define USE_HAL_CRYP_REGISTER_CALLBACKS 0U
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U #define USE_HAL_DAC_REGISTER_CALLBACKS 0U
#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U #define USE_HAL_DCMI_REGISTER_CALLBACKS 0U
#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U #define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U
#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U #define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U
#define USE_HAL_DSI_REGISTER_CALLBACKS 0U #define USE_HAL_DSI_REGISTER_CALLBACKS 0U
#define USE_HAL_GFXMMU_REGISTER_CALLBACKS 0U #define USE_HAL_GFXMMU_REGISTER_CALLBACKS 0U
#define USE_HAL_HASH_REGISTER_CALLBACKS 0U #define USE_HAL_HASH_REGISTER_CALLBACKS 0U
#define USE_HAL_HCD_REGISTER_CALLBACKS 0U #define USE_HAL_HCD_REGISTER_CALLBACKS 0U
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U #define USE_HAL_I2C_REGISTER_CALLBACKS 0U
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U #define USE_HAL_IRDA_REGISTER_CALLBACKS 0U
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U #define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U
#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U #define USE_HAL_LTDC_REGISTER_CALLBACKS 0U
#define USE_HAL_MMC_REGISTER_CALLBACKS 0U #define USE_HAL_MMC_REGISTER_CALLBACKS 0U
#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U #define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U
#define USE_HAL_OSPI_REGISTER_CALLBACKS 0U #define USE_HAL_OSPI_REGISTER_CALLBACKS 0U
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U #define USE_HAL_PCD_REGISTER_CALLBACKS 0U
#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U #define USE_HAL_QSPI_REGISTER_CALLBACKS 0U
#define USE_HAL_RNG_REGISTER_CALLBACKS 0U #define USE_HAL_RNG_REGISTER_CALLBACKS 0U
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U #define USE_HAL_RTC_REGISTER_CALLBACKS 0U
#define USE_HAL_SAI_REGISTER_CALLBACKS 0U #define USE_HAL_SAI_REGISTER_CALLBACKS 0U
#define USE_HAL_SD_REGISTER_CALLBACKS 0U #define USE_HAL_SD_REGISTER_CALLBACKS 0U
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U #define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U #define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U #define USE_HAL_SPI_REGISTER_CALLBACKS 0U
#define USE_HAL_SWPMI_REGISTER_CALLBACKS 0U #define USE_HAL_SWPMI_REGISTER_CALLBACKS 0U
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U #define USE_HAL_TIM_REGISTER_CALLBACKS 0U
#define USE_HAL_TSC_REGISTER_CALLBACKS 0U #define USE_HAL_TSC_REGISTER_CALLBACKS 0U
#define USE_HAL_UART_REGISTER_CALLBACKS 0U #define USE_HAL_UART_REGISTER_CALLBACKS 0U
#define USE_HAL_USART_REGISTER_CALLBACKS 0U #define USE_HAL_USART_REGISTER_CALLBACKS 0U
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U #define USE_HAL_WWDG_REGISTER_CALLBACKS 0U
/* ################## SPI peripheral configuration ########################## */ /* ################## SPI peripheral configuration ########################## */
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver /* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
* Activated: CRC code is present inside driver * Activated: CRC code is present inside driver
* Deactivated: CRC code cleaned from driver * Deactivated: CRC code cleaned from driver
*/ */
#define USE_SPI_CRC 0U #define USE_SPI_CRC 0U
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
/** /**
* @brief Include module's header file * @brief Include module's header file
*/ */
#ifdef HAL_RCC_MODULE_ENABLED #ifdef HAL_RCC_MODULE_ENABLED
#include "stm32l4xx_hal_rcc.h" #include "stm32l4xx_hal_rcc.h"
#endif /* HAL_RCC_MODULE_ENABLED */ #endif /* HAL_RCC_MODULE_ENABLED */
#ifdef HAL_GPIO_MODULE_ENABLED #ifdef HAL_GPIO_MODULE_ENABLED
#include "stm32l4xx_hal_gpio.h" #include "stm32l4xx_hal_gpio.h"
#endif /* HAL_GPIO_MODULE_ENABLED */ #endif /* HAL_GPIO_MODULE_ENABLED */
#ifdef HAL_DMA_MODULE_ENABLED #ifdef HAL_DMA_MODULE_ENABLED
#include "stm32l4xx_hal_dma.h" #include "stm32l4xx_hal_dma.h"
#endif /* HAL_DMA_MODULE_ENABLED */ #endif /* HAL_DMA_MODULE_ENABLED */
#ifdef HAL_DFSDM_MODULE_ENABLED #ifdef HAL_DFSDM_MODULE_ENABLED
#include "stm32l4xx_hal_dfsdm.h" #include "stm32l4xx_hal_dfsdm.h"
#endif /* HAL_DFSDM_MODULE_ENABLED */ #endif /* HAL_DFSDM_MODULE_ENABLED */
#ifdef HAL_CORTEX_MODULE_ENABLED #ifdef HAL_CORTEX_MODULE_ENABLED
#include "stm32l4xx_hal_cortex.h" #include "stm32l4xx_hal_cortex.h"
#endif /* HAL_CORTEX_MODULE_ENABLED */ #endif /* HAL_CORTEX_MODULE_ENABLED */
#ifdef HAL_ADC_MODULE_ENABLED #ifdef HAL_ADC_MODULE_ENABLED
#include "stm32l4xx_hal_adc.h" #include "stm32l4xx_hal_adc.h"
#endif /* HAL_ADC_MODULE_ENABLED */ #endif /* HAL_ADC_MODULE_ENABLED */
#ifdef HAL_CAN_MODULE_ENABLED #ifdef HAL_CAN_MODULE_ENABLED
#include "stm32l4xx_hal_can.h" #include "stm32l4xx_hal_can.h"
#endif /* HAL_CAN_MODULE_ENABLED */ #endif /* HAL_CAN_MODULE_ENABLED */
#ifdef HAL_CAN_LEGACY_MODULE_ENABLED #ifdef HAL_CAN_LEGACY_MODULE_ENABLED
#include "Legacy/stm32l4xx_hal_can_legacy.h" #include "Legacy/stm32l4xx_hal_can_legacy.h"
#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ #endif /* HAL_CAN_LEGACY_MODULE_ENABLED */
#ifdef HAL_COMP_MODULE_ENABLED #ifdef HAL_COMP_MODULE_ENABLED
#include "stm32l4xx_hal_comp.h" #include "stm32l4xx_hal_comp.h"
#endif /* HAL_COMP_MODULE_ENABLED */ #endif /* HAL_COMP_MODULE_ENABLED */
#ifdef HAL_CRC_MODULE_ENABLED #ifdef HAL_CRC_MODULE_ENABLED
#include "stm32l4xx_hal_crc.h" #include "stm32l4xx_hal_crc.h"
#endif /* HAL_CRC_MODULE_ENABLED */ #endif /* HAL_CRC_MODULE_ENABLED */
#ifdef HAL_CRYP_MODULE_ENABLED #ifdef HAL_CRYP_MODULE_ENABLED
#include "stm32l4xx_hal_cryp.h" #include "stm32l4xx_hal_cryp.h"
#endif /* HAL_CRYP_MODULE_ENABLED */ #endif /* HAL_CRYP_MODULE_ENABLED */
#ifdef HAL_DAC_MODULE_ENABLED #ifdef HAL_DAC_MODULE_ENABLED
#include "stm32l4xx_hal_dac.h" #include "stm32l4xx_hal_dac.h"
#endif /* HAL_DAC_MODULE_ENABLED */ #endif /* HAL_DAC_MODULE_ENABLED */
#ifdef HAL_DCMI_MODULE_ENABLED #ifdef HAL_DCMI_MODULE_ENABLED
#include "stm32l4xx_hal_dcmi.h" #include "stm32l4xx_hal_dcmi.h"
#endif /* HAL_DCMI_MODULE_ENABLED */ #endif /* HAL_DCMI_MODULE_ENABLED */
#ifdef HAL_DMA2D_MODULE_ENABLED #ifdef HAL_DMA2D_MODULE_ENABLED
#include "stm32l4xx_hal_dma2d.h" #include "stm32l4xx_hal_dma2d.h"
#endif /* HAL_DMA2D_MODULE_ENABLED */ #endif /* HAL_DMA2D_MODULE_ENABLED */
#ifdef HAL_DSI_MODULE_ENABLED #ifdef HAL_DSI_MODULE_ENABLED
#include "stm32l4xx_hal_dsi.h" #include "stm32l4xx_hal_dsi.h"
#endif /* HAL_DSI_MODULE_ENABLED */ #endif /* HAL_DSI_MODULE_ENABLED */
#ifdef HAL_EXTI_MODULE_ENABLED #ifdef HAL_EXTI_MODULE_ENABLED
#include "stm32l4xx_hal_exti.h" #include "stm32l4xx_hal_exti.h"
#endif /* HAL_EXTI_MODULE_ENABLED */ #endif /* HAL_EXTI_MODULE_ENABLED */
#ifdef HAL_GFXMMU_MODULE_ENABLED #ifdef HAL_GFXMMU_MODULE_ENABLED
#include "stm32l4xx_hal_gfxmmu.h" #include "stm32l4xx_hal_gfxmmu.h"
#endif /* HAL_GFXMMU_MODULE_ENABLED */ #endif /* HAL_GFXMMU_MODULE_ENABLED */
#ifdef HAL_FIREWALL_MODULE_ENABLED #ifdef HAL_FIREWALL_MODULE_ENABLED
#include "stm32l4xx_hal_firewall.h" #include "stm32l4xx_hal_firewall.h"
#endif /* HAL_FIREWALL_MODULE_ENABLED */ #endif /* HAL_FIREWALL_MODULE_ENABLED */
#ifdef HAL_FLASH_MODULE_ENABLED #ifdef HAL_FLASH_MODULE_ENABLED
#include "stm32l4xx_hal_flash.h" #include "stm32l4xx_hal_flash.h"
#endif /* HAL_FLASH_MODULE_ENABLED */ #endif /* HAL_FLASH_MODULE_ENABLED */
#ifdef HAL_HASH_MODULE_ENABLED #ifdef HAL_HASH_MODULE_ENABLED
#include "stm32l4xx_hal_hash.h" #include "stm32l4xx_hal_hash.h"
#endif /* HAL_HASH_MODULE_ENABLED */ #endif /* HAL_HASH_MODULE_ENABLED */
#ifdef HAL_HCD_MODULE_ENABLED #ifdef HAL_HCD_MODULE_ENABLED
#include "stm32l4xx_hal_hcd.h" #include "stm32l4xx_hal_hcd.h"
#endif /* HAL_HCD_MODULE_ENABLED */ #endif /* HAL_HCD_MODULE_ENABLED */
#ifdef HAL_I2C_MODULE_ENABLED #ifdef HAL_I2C_MODULE_ENABLED
#include "stm32l4xx_hal_i2c.h" #include "stm32l4xx_hal_i2c.h"
#endif /* HAL_I2C_MODULE_ENABLED */ #endif /* HAL_I2C_MODULE_ENABLED */
#ifdef HAL_IRDA_MODULE_ENABLED #ifdef HAL_IRDA_MODULE_ENABLED
#include "stm32l4xx_hal_irda.h" #include "stm32l4xx_hal_irda.h"
#endif /* HAL_IRDA_MODULE_ENABLED */ #endif /* HAL_IRDA_MODULE_ENABLED */
#ifdef HAL_IWDG_MODULE_ENABLED #ifdef HAL_IWDG_MODULE_ENABLED
#include "stm32l4xx_hal_iwdg.h" #include "stm32l4xx_hal_iwdg.h"
#endif /* HAL_IWDG_MODULE_ENABLED */ #endif /* HAL_IWDG_MODULE_ENABLED */
#ifdef HAL_LCD_MODULE_ENABLED #ifdef HAL_LCD_MODULE_ENABLED
#include "stm32l4xx_hal_lcd.h" #include "stm32l4xx_hal_lcd.h"
#endif /* HAL_LCD_MODULE_ENABLED */ #endif /* HAL_LCD_MODULE_ENABLED */
#ifdef HAL_LPTIM_MODULE_ENABLED #ifdef HAL_LPTIM_MODULE_ENABLED
#include "stm32l4xx_hal_lptim.h" #include "stm32l4xx_hal_lptim.h"
#endif /* HAL_LPTIM_MODULE_ENABLED */ #endif /* HAL_LPTIM_MODULE_ENABLED */
#ifdef HAL_LTDC_MODULE_ENABLED #ifdef HAL_LTDC_MODULE_ENABLED
#include "stm32l4xx_hal_ltdc.h" #include "stm32l4xx_hal_ltdc.h"
#endif /* HAL_LTDC_MODULE_ENABLED */ #endif /* HAL_LTDC_MODULE_ENABLED */
#ifdef HAL_MMC_MODULE_ENABLED #ifdef HAL_MMC_MODULE_ENABLED
#include "stm32l4xx_hal_mmc.h" #include "stm32l4xx_hal_mmc.h"
#endif /* HAL_MMC_MODULE_ENABLED */ #endif /* HAL_MMC_MODULE_ENABLED */
#ifdef HAL_NAND_MODULE_ENABLED #ifdef HAL_NAND_MODULE_ENABLED
#include "stm32l4xx_hal_nand.h" #include "stm32l4xx_hal_nand.h"
#endif /* HAL_NAND_MODULE_ENABLED */ #endif /* HAL_NAND_MODULE_ENABLED */
#ifdef HAL_NOR_MODULE_ENABLED #ifdef HAL_NOR_MODULE_ENABLED
#include "stm32l4xx_hal_nor.h" #include "stm32l4xx_hal_nor.h"
#endif /* HAL_NOR_MODULE_ENABLED */ #endif /* HAL_NOR_MODULE_ENABLED */
#ifdef HAL_OPAMP_MODULE_ENABLED #ifdef HAL_OPAMP_MODULE_ENABLED
#include "stm32l4xx_hal_opamp.h" #include "stm32l4xx_hal_opamp.h"
#endif /* HAL_OPAMP_MODULE_ENABLED */ #endif /* HAL_OPAMP_MODULE_ENABLED */
#ifdef HAL_OSPI_MODULE_ENABLED #ifdef HAL_OSPI_MODULE_ENABLED
#include "stm32l4xx_hal_ospi.h" #include "stm32l4xx_hal_ospi.h"
#endif /* HAL_OSPI_MODULE_ENABLED */ #endif /* HAL_OSPI_MODULE_ENABLED */
#ifdef HAL_PCD_MODULE_ENABLED #ifdef HAL_PCD_MODULE_ENABLED
#include "stm32l4xx_hal_pcd.h" #include "stm32l4xx_hal_pcd.h"
#endif /* HAL_PCD_MODULE_ENABLED */ #endif /* HAL_PCD_MODULE_ENABLED */
#ifdef HAL_PKA_MODULE_ENABLED #ifdef HAL_PKA_MODULE_ENABLED
#include "stm32l4xx_hal_pka.h" #include "stm32l4xx_hal_pka.h"
#endif /* HAL_PKA_MODULE_ENABLED */ #endif /* HAL_PKA_MODULE_ENABLED */
#ifdef HAL_PSSI_MODULE_ENABLED #ifdef HAL_PSSI_MODULE_ENABLED
#include "stm32l4xx_hal_pssi.h" #include "stm32l4xx_hal_pssi.h"
#endif /* HAL_PSSI_MODULE_ENABLED */ #endif /* HAL_PSSI_MODULE_ENABLED */
#ifdef HAL_PWR_MODULE_ENABLED #ifdef HAL_PWR_MODULE_ENABLED
#include "stm32l4xx_hal_pwr.h" #include "stm32l4xx_hal_pwr.h"
#endif /* HAL_PWR_MODULE_ENABLED */ #endif /* HAL_PWR_MODULE_ENABLED */
#ifdef HAL_QSPI_MODULE_ENABLED #ifdef HAL_QSPI_MODULE_ENABLED
#include "stm32l4xx_hal_qspi.h" #include "stm32l4xx_hal_qspi.h"
#endif /* HAL_QSPI_MODULE_ENABLED */ #endif /* HAL_QSPI_MODULE_ENABLED */
#ifdef HAL_RNG_MODULE_ENABLED #ifdef HAL_RNG_MODULE_ENABLED
#include "stm32l4xx_hal_rng.h" #include "stm32l4xx_hal_rng.h"
#endif /* HAL_RNG_MODULE_ENABLED */ #endif /* HAL_RNG_MODULE_ENABLED */
#ifdef HAL_RTC_MODULE_ENABLED #ifdef HAL_RTC_MODULE_ENABLED
#include "stm32l4xx_hal_rtc.h" #include "stm32l4xx_hal_rtc.h"
#endif /* HAL_RTC_MODULE_ENABLED */ #endif /* HAL_RTC_MODULE_ENABLED */
#ifdef HAL_SAI_MODULE_ENABLED #ifdef HAL_SAI_MODULE_ENABLED
#include "stm32l4xx_hal_sai.h" #include "stm32l4xx_hal_sai.h"
#endif /* HAL_SAI_MODULE_ENABLED */ #endif /* HAL_SAI_MODULE_ENABLED */
#ifdef HAL_SD_MODULE_ENABLED #ifdef HAL_SD_MODULE_ENABLED
#include "stm32l4xx_hal_sd.h" #include "stm32l4xx_hal_sd.h"
#endif /* HAL_SD_MODULE_ENABLED */ #endif /* HAL_SD_MODULE_ENABLED */
#ifdef HAL_SMARTCARD_MODULE_ENABLED #ifdef HAL_SMARTCARD_MODULE_ENABLED
#include "stm32l4xx_hal_smartcard.h" #include "stm32l4xx_hal_smartcard.h"
#endif /* HAL_SMARTCARD_MODULE_ENABLED */ #endif /* HAL_SMARTCARD_MODULE_ENABLED */
#ifdef HAL_SMBUS_MODULE_ENABLED #ifdef HAL_SMBUS_MODULE_ENABLED
#include "stm32l4xx_hal_smbus.h" #include "stm32l4xx_hal_smbus.h"
#endif /* HAL_SMBUS_MODULE_ENABLED */ #endif /* HAL_SMBUS_MODULE_ENABLED */
#ifdef HAL_SPI_MODULE_ENABLED #ifdef HAL_SPI_MODULE_ENABLED
#include "stm32l4xx_hal_spi.h" #include "stm32l4xx_hal_spi.h"
#endif /* HAL_SPI_MODULE_ENABLED */ #endif /* HAL_SPI_MODULE_ENABLED */
#ifdef HAL_SRAM_MODULE_ENABLED #ifdef HAL_SRAM_MODULE_ENABLED
#include "stm32l4xx_hal_sram.h" #include "stm32l4xx_hal_sram.h"
#endif /* HAL_SRAM_MODULE_ENABLED */ #endif /* HAL_SRAM_MODULE_ENABLED */
#ifdef HAL_SWPMI_MODULE_ENABLED #ifdef HAL_SWPMI_MODULE_ENABLED
#include "stm32l4xx_hal_swpmi.h" #include "stm32l4xx_hal_swpmi.h"
#endif /* HAL_SWPMI_MODULE_ENABLED */ #endif /* HAL_SWPMI_MODULE_ENABLED */
#ifdef HAL_TIM_MODULE_ENABLED #ifdef HAL_TIM_MODULE_ENABLED
#include "stm32l4xx_hal_tim.h" #include "stm32l4xx_hal_tim.h"
#endif /* HAL_TIM_MODULE_ENABLED */ #endif /* HAL_TIM_MODULE_ENABLED */
#ifdef HAL_TSC_MODULE_ENABLED #ifdef HAL_TSC_MODULE_ENABLED
#include "stm32l4xx_hal_tsc.h" #include "stm32l4xx_hal_tsc.h"
#endif /* HAL_TSC_MODULE_ENABLED */ #endif /* HAL_TSC_MODULE_ENABLED */
#ifdef HAL_UART_MODULE_ENABLED #ifdef HAL_UART_MODULE_ENABLED
#include "stm32l4xx_hal_uart.h" #include "stm32l4xx_hal_uart.h"
#endif /* HAL_UART_MODULE_ENABLED */ #endif /* HAL_UART_MODULE_ENABLED */
#ifdef HAL_USART_MODULE_ENABLED #ifdef HAL_USART_MODULE_ENABLED
#include "stm32l4xx_hal_usart.h" #include "stm32l4xx_hal_usart.h"
#endif /* HAL_USART_MODULE_ENABLED */ #endif /* HAL_USART_MODULE_ENABLED */
#ifdef HAL_WWDG_MODULE_ENABLED #ifdef HAL_WWDG_MODULE_ENABLED
#include "stm32l4xx_hal_wwdg.h" #include "stm32l4xx_hal_wwdg.h"
#endif /* HAL_WWDG_MODULE_ENABLED */ #endif /* HAL_WWDG_MODULE_ENABLED */
/* Exported macro ------------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT #ifdef USE_FULL_ASSERT
/** /**
* @brief The assert_param macro is used for function's parameters check. * @brief The assert_param macro is used for function's parameters check.
* @param expr If expr is false, it calls assert_failed function * @param expr If expr is false, it calls assert_failed function
* which reports the name of the source file and the source * which reports the name of the source file and the source
* line number of the call that failed. * line number of the call that failed.
* If expr is true, it returns no value. * If expr is true, it returns no value.
* @retval None * @retval None
*/ */
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */ /* Exported functions ------------------------------------------------------- */
void assert_failed(uint8_t *file, uint32_t line); void assert_failed(uint8_t *file, uint32_t line);
#else #else
#define assert_param(expr) ((void)0U) #define assert_param(expr) ((void)0U)
#endif /* USE_FULL_ASSERT */ #endif /* USE_FULL_ASSERT */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* STM32L4xx_HAL_CONF_H */ #endif /* STM32L4xx_HAL_CONF_H */

View File

@ -82,7 +82,7 @@ const osSemaphoreAttr_t si5351_attributes = {
.name = "si5351" .name = "si5351"
}; };
/* USER CODE BEGIN PV */ /* USER CODE BEGIN PV */
int leds_on = 1;
/* USER CODE END PV */ /* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/
@ -286,7 +286,7 @@ void SystemClock_Config(void)
/** Configure LSE Drive Capability /** Configure LSE Drive Capability
*/ */
HAL_PWR_EnableBkUpAccess(); HAL_PWR_EnableBkUpAccess();
__HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_HIGH); __HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW);
/** Initializes the RCC Oscillators according to the specified parameters /** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure. * in the RCC_OscInitTypeDef structure.
@ -315,11 +315,11 @@ void SystemClock_Config(void)
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV8;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV4;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
{ {
Error_Handler(); Error_Handler();
} }
@ -342,7 +342,7 @@ static void MX_I2C1_Init(void)
/* USER CODE END I2C1_Init 1 */ /* USER CODE END I2C1_Init 1 */
hi2c1.Instance = I2C1; hi2c1.Instance = I2C1;
hi2c1.Init.Timing = 0x00505B89; hi2c1.Init.Timing = 0x00000001;
hi2c1.Init.OwnAddress1 = 0; hi2c1.Init.OwnAddress1 = 0;
hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
@ -513,17 +513,11 @@ static void MX_GPIO_Init(void)
GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
/*Configure GPIO pins : PC13 PC0 PC1 PC2 /*Configure GPIO pin : B1_Pin */
PC3 PC4 PC5 PC6 GPIO_InitStruct.Pin = B1_Pin;
PC8 PC9 PC10 PC11 GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
PC12 */ GPIO_InitStruct.Pull = GPIO_PULLDOWN;
GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2 HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct);
|GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6
|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11
|GPIO_PIN_12;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
/*Configure GPIO pins : PF0 PF1 PF2 PF3 /*Configure GPIO pins : PF0 PF1 PF2 PF3
PF4 PF5 PF6 PF7 PF4 PF5 PF6 PF7
@ -543,6 +537,16 @@ static void MX_GPIO_Init(void)
GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOH, &GPIO_InitStruct); HAL_GPIO_Init(GPIOH, &GPIO_InitStruct);
/*Configure GPIO pins : PC0 PC1 PC2 PC3
PC4 PC5 PC6 PC8
PC9 PC10 PC11 PC12 */
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_8
|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
/*Configure GPIO pins : PA0 PA1 PA2 PA3 /*Configure GPIO pins : PA0 PA1 PA2 PA3
PA4 PA5 PA6 PA7 PA4 PA5 PA6 PA7
PA15 */ PA15 */
@ -656,11 +660,12 @@ void make_di_dah(si5351_inst_t inst, unsigned int dah, uint32_t delay, uint8_t c
#define SEMAPHORE 0 #define SEMAPHORE 0
/* inner function, no need to check inst, clk, nor delay */ /* inner function, no need to check inst, clk, nor delay */
#if 1 #if 1
if (clk==0) if (leds_on) {
HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_SET); if (clk==0)
else HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_SET);
HAL_GPIO_WritePin(LD3_GPIO_Port, LD3_Pin, GPIO_PIN_SET); else
HAL_GPIO_WritePin(LD3_GPIO_Port, LD3_Pin, GPIO_PIN_SET);
}
#endif #endif
#if SEMAPHORE #if SEMAPHORE
osSemaphoreAcquire(si5351Handle, osWaitForever); osSemaphoreAcquire(si5351Handle, osWaitForever);
@ -781,17 +786,24 @@ void morse(si5351_inst_t inst, char * s, uint32_t delay, uint8_t clk) {
/* USER CODE END Header_StartDefaultTask */ /* USER CODE END Header_StartDefaultTask */
void StartDefaultTask(void *argument) void StartDefaultTask(void *argument)
{ {
/* USER CODE BEGIN 5 */ /* USER CODE BEGIN 5 */
(void) argument; //unused argument (void) argument; //unused argument
int sw, sw_last = GPIO_PIN_RESET;
/* Infinite loop */ /* Infinite loop */
for(;;) { for(;;) {
// HAL_GPIO_TogglePin(LD1_GPIO_Port, LD1_Pin); // HAL_GPIO_TogglePin(LD1_GPIO_Port, LD1_Pin);
HAL_GPIO_WritePin(LD1_GPIO_Port, LD1_Pin, GPIO_PIN_SET); HAL_GPIO_WritePin(LD1_GPIO_Port, LD1_Pin, GPIO_PIN_SET);
osDelay(5); osDelay(5);
HAL_GPIO_WritePin(LD1_GPIO_Port, LD1_Pin, GPIO_PIN_RESET); HAL_GPIO_WritePin(LD1_GPIO_Port, LD1_Pin, GPIO_PIN_RESET);
osDelay(2000); sw = HAL_GPIO_ReadPin(B1_GPIO_Port, B1_Pin);
if (sw_last == GPIO_PIN_RESET && sw == GPIO_PIN_SET) {
leds_on = !leds_on;
}
sw_last = sw;
osDelay(2000);
} }
/* USER CODE END 5 */ /* USER CODE END 5 */
} }
/* USER CODE BEGIN Header_start_terminal_task */ /* USER CODE BEGIN Header_start_terminal_task */
@ -834,7 +846,7 @@ void start_terminal_task(void *argument)
void start_morse_task(void *argument) void start_morse_task(void *argument)
{ {
/* USER CODE BEGIN start_morse_task */ /* USER CODE BEGIN start_morse_task */
static const uint32_t delay = 10; static const uint32_t delay = 100;
static const uint8_t clk = 0; static const uint8_t clk = 0;
si5351_inst_t inst = argument; si5351_inst_t inst = argument;
int i = 0; int i = 0;
@ -866,7 +878,7 @@ void start_morse_task(void *argument)
void start_clk2_task(void *argument) void start_clk2_task(void *argument)
{ {
/* USER CODE BEGIN start_clk2_task */ /* USER CODE BEGIN start_clk2_task */
static const uint32_t delay = 10; static const uint32_t delay = 100;
static const uint8_t clk =2; static const uint8_t clk =2;
si5351_inst_t inst = argument; si5351_inst_t inst = argument;
int i = 0; int i = 0;

View File

@ -1,8 +1,8 @@
/** /**
****************************************************************************** ******************************************************************************
* @file stm32_si5351.c * @file stm32_si5351.c
* @brief STM32 library/driver for the Si5351 clock chip * @brief STM32 library/driver for the Si5351 clock chip
from Skyworks Solutions, Inc. (former SiLabs) from Skyworks Solutions, Inc. (former SiLabs)
****************************************************************************** ******************************************************************************
* @author: Thomas Kuschel KW4NZ * @author: Thomas Kuschel KW4NZ
* created 2022-05-11 * created 2022-05-11
@ -130,7 +130,7 @@ int si5351_set_synthesis(si5351_inst_t inst, synthesis_t *synth, uint8_t clk);
/** @brief Give better error numbers based on the Linux error_no.h /** @brief Give better error numbers based on the Linux error_no.h
* @param i2c_handle the handle of the I2C bus from HAL function, e.g. hi2c1 * @param i2c_handle the handle of the I2C bus from HAL function, e.g. hi2c1
* @param xtal_frequency either the XTAL frequency (25/27 MHz) or CLock-In * @param xtal_frequency either the XTAL frequency (25/27 MHz) or CLock-In
* from 10 MHz to 100 MHz entered in Hz * from 10 MHz to 100 MHz entered in Hz
* @param i2c_address I2C bus address of the device from datasheet typically 0x60 (or 0x61) * @param i2c_address I2C bus address of the device from datasheet typically 0x60 (or 0x61)
* @param datasize reserve an extra area of data space in bytes, access with function si5351_read_data() and si5351_write_data() * @param datasize reserve an extra area of data space in bytes, access with function si5351_read_data() and si5351_write_data()
* @return si5351_handle Pointer to the si5351 handle, NULL if error, see si5351_errno * @return si5351_handle Pointer to the si5351 handle, NULL if error, see si5351_errno
@ -221,7 +221,7 @@ si5351_HandleTypeDef *si5351_initialize(void * i2c_handle) {
/** @brief Initialize the device Si5351 with the main parameters /** @brief Initialize the device Si5351 with the main parameters
* @param i2c_handle the handle of the I2C bus from HAL function, e.g. hi2c1 * @param i2c_handle the handle of the I2C bus from HAL function, e.g. hi2c1
* @param xtal_frequency either the XTAL frequency (25/27 MHz) or CLock-In * @param xtal_frequency either the XTAL frequency (25/27 MHz) or CLock-In
* from 10 MHz to 100 MHz entered in Hz * from 10 MHz to 100 MHz entered in Hz
* @param i2c_address I2C bus address of the device from datasheet typically 0x60 (or 0x61) * @param i2c_address I2C bus address of the device from datasheet typically 0x60 (or 0x61)
* @param datasize reserve an extra area of data space in bytes, access with function si5351_read_data() and si5351_write_data() * @param datasize reserve an extra area of data space in bytes, access with function si5351_read_data() and si5351_write_data()
* @return si5351_handle Pointer to the si5351 handle, NULL if error, see si5351_errno * @return si5351_handle Pointer to the si5351 handle, NULL if error, see si5351_errno
@ -423,21 +423,22 @@ int si5351_program(si5351_inst_t inst) {
*/ */
int band_select(uint32_t frequency, band_t *band) { int band_select(uint32_t frequency, band_t *band) {
static const band_t sband[] = { { "80", 3000000, 4500000, 200, 0}, static const band_t sband[] = {
{ "40", 5625000, 7500000, 120, 0}, { "80", 3000000, 4500000, 200, 0},
{ "30", 7500000,11250000, 80, 0}, { "40", 5625000, 7500000, 120, 0},
{ "20",11250000,15000000, 60, 0}, { "30", 7500000,11250000, 80, 0},
{ "15",15000000,22500000, 40, 0}, { "20",11250000,15000000, 60, 0},
{ "10",22500000,32142000, 28, 0}, { "15",15000000,22500000, 40, 0},
{ "8",32142000,45000000, 20, 0}, { "10",22500000,32142000, 28, 0},
{ "6",45000000,64285000, 14, 0}, { "8",32142000,45000000, 20, 0},
{ "4",64285000,76000000, 10, 0}, { "6",45000000,64285000, 14, 0},
{ "3",76000000,11250000, 8, 0}, { "4",64285000,76000000, 10, 0},
{ "2",11250000,15000000, 6, 0}, { "3",76000000,11250000, 8, 0},
{"180", 1500000, 2250000, 400, 0}, { "2",11250000,15000000, 6, 0},
{"120", 2250000, 3000000, 300, 0}, {"180", 1500000, 2250000, 400, 0},
{ "60", 4500000, 5625000, 160, 0}, {"120", 2250000, 3000000, 300, 0},
}; { "60", 4500000, 5625000, 160, 0},
};
for (uint32_t i = 0; i < (sizeof(sband) / sizeof(sband[0])); i++) { for (uint32_t i = 0; i < (sizeof(sband) / sizeof(sband[0])); i++) {
if (frequency > sband[i].qrg_min && frequency <= sband[i].qrg_max) { if (frequency > sband[i].qrg_min && frequency <= sband[i].qrg_max) {
@ -477,39 +478,39 @@ int calculation(uint32_t frequency, uint32_t xtal, synthesis_t *synth) {
return 0; return 0;
} }
synth->out_r_divider = 0; synth->out_r_divider = 0;
if (frequency < 81000000) { if (frequency < 81000000) {
// Valid for frequ in 0.5..112.5 MHz range 9000 // Valid for frequ in 0.5..112.5 MHz range 9000
// However an error is > 6 Hz above 81 MHz // However an error is > 6 Hz above 81 MHz
// synth->pll_multiplier = 36; // PLL runs @ 900 MHz with XTAL 25 MHz, more flexible using the formular: // synth->pll_multiplier = 36; // PLL runs @ 900 MHz with XTAL 25 MHz, more flexible using the formular:
// making an even integer multiplier with // making an even integer multiplier with
synth->pll_multiplier = (900000000 / xtal); synth->pll_multiplier = (900000000 / xtal);
synth->pll_multiplier &= ~0x01u; // make it even synth->pll_multiplier &= ~0x01u; // make it even
synth->pll_numerator = 0; synth->pll_numerator = 0;
synth->pll_denominator = 1; synth->pll_denominator = 1;
uint32_t Fpll = synth->pll_multiplier * xtal; // this was set to 900000000 uint32_t Fpll = synth->pll_multiplier * xtal; // this was set to 900000000
synth->out_multiplier = Fpll / frequency; synth->out_multiplier = Fpll / frequency;
t = (frequency >> 20) + 1; t = (frequency >> 20) + 1;
synth->out_numerator = (Fpll % frequency) / t; synth->out_numerator = (Fpll % frequency) / t;
synth->out_denominator = frequency / t; synth->out_denominator = frequency / t;
} else { } else {
// Valid for Fclk in 75..160 MHz range // Valid for Fclk in 75..160 MHz range
if(frequency >= 150000000) { if(frequency >= 150000000) {
synth->out_multiplier = 4; synth->out_multiplier = 4;
} else if (frequency >= 100000000) { } else if (frequency >= 100000000) {
synth->out_multiplier = 6; synth->out_multiplier = 6;
} else { } else {
synth->out_multiplier = 8; synth->out_multiplier = 8;
} }
synth->out_numerator = 0; synth->out_numerator = 0;
synth->out_denominator = 1; synth->out_denominator = 1;
uint32_t numerator = synth->out_multiplier*frequency; uint32_t numerator = synth->out_multiplier*frequency;
synth->pll_multiplier = numerator / xtal; synth->pll_multiplier = numerator / xtal;
t = (xtal >> 20) + 1; t = (xtal >> 20) + 1;
synth->pll_numerator = (numerator % xtal) / t; synth->pll_numerator = (numerator % xtal) / t;
synth->pll_denominator = xtal / t; synth->pll_denominator = xtal / t;
} }
return 0; return 0;
} }
/** @brief Enables the CLK output of the si5351 (after programming and setting the synthesis) /** @brief Enables the CLK output of the si5351 (after programming and setting the synthesis)
@ -579,8 +580,8 @@ int si5351_set_clk0(si5351_inst_t inst, uint32_t frequency) {
do { do {
if(!inst->programmed) { if(!inst->programmed) {
rv = si5351_program(inst); rv = si5351_program(inst);
if (!rv) if (!rv)
break; break;
} }
(void)calculation(frequency, inst->xtal_frequency, &synth); (void)calculation(frequency, inst->xtal_frequency, &synth);
rv = si5351_set_synthesis(inst, &synth, 0); rv = si5351_set_synthesis(inst, &synth, 0);
@ -615,8 +616,8 @@ int si5351_set_clk(si5351_inst_t inst, uint32_t frequency, uint8_t clk, si5351_p
do { do {
if(!inst->programmed) { if(!inst->programmed) {
rv = si5351_program(inst); rv = si5351_program(inst);
if (rv) if (rv)
break; break;
} }
(void)calculation(frequency, inst->xtal_frequency, &synth); (void)calculation(frequency, inst->xtal_frequency, &synth);
rv = si5351_set_synthesis(inst, &synth, clk); rv = si5351_set_synthesis(inst, &synth, clk);
@ -624,8 +625,16 @@ int si5351_set_clk(si5351_inst_t inst, uint32_t frequency, uint8_t clk, si5351_p
return rv; return rv;
} }
/** @brief Sets the MSNx and MSx parameter registers of the Si5351
* @param si5351_instance Given si5351 device handle
* @param synth synthesis_t struct
* @param clk The CLK ouput to drive and disable 0...CLK0, 1...CLK1, 2...CLK2, ...
* @return 0 on success
* @retval -EINVAL when given a NULL handle
* @retval -ETIMEDOUT when HAL_TIMEOUT
* @retval -EIO when HAL_ERROR
* @retval -EBUSY when HAL_BUSY
*/
int si5351_set_synthesis(si5351_inst_t inst, synthesis_t *synth, uint8_t clk) { int si5351_set_synthesis(si5351_inst_t inst, synthesis_t *synth, uint8_t clk) {
uint32_t MSNx_P1, MSNx_P2, MSNx_P3; uint32_t MSNx_P1, MSNx_P2, MSNx_P3;
@ -680,7 +689,7 @@ int si5351_set_synthesis(si5351_inst_t inst, synthesis_t *synth, uint8_t clk) {
/* write MSNx registers dependent of SI5351_PLLA or SI5351_PLLB */ /* write MSNx registers dependent of SI5351_PLLA or SI5351_PLLB */
regaddr = (inst->clk_is_pllb & (1u << clk)) ? SI5351_MULTISYNTH_NB_PARAMETER_3_HI : SI5351_MULTISYNTH_NA_PARAMETER_3_HI; regaddr = (inst->clk_is_pllb & (1u << clk)) ? SI5351_MULTISYNTH_NB_PARAMETER_3_HI : SI5351_MULTISYNTH_NA_PARAMETER_3_HI;
rv = si5351_write(inst, regaddr, ms_data, sizeof(ms_data) / sizeof(ms_data[0])); rv = si5351_write(inst, regaddr, ms_data, sizeof(ms_data) / sizeof(ms_data[0]));
if (rv != 0) if (rv)
return rv; return rv;
/* write MSx registers dependent of CLK # */ /* write MSx registers dependent of CLK # */
ms_data[0] = (uint8_t) (MSx_P3 >> 8); ms_data[0] = (uint8_t) (MSx_P3 >> 8);
@ -693,7 +702,7 @@ int si5351_set_synthesis(si5351_inst_t inst, synthesis_t *synth, uint8_t clk) {
ms_data[7] = (uint8_t) MSx_P2; ms_data[7] = (uint8_t) MSx_P2;
regaddr = SI5351_MULTISYNTH0_PARAMETER_3_HI + (uint8_t)(clk * sizeof(ms_data) / sizeof(ms_data[0])); regaddr = SI5351_MULTISYNTH0_PARAMETER_3_HI + (uint8_t)(clk * sizeof(ms_data) / sizeof(ms_data[0]));
rv = si5351_write(inst, regaddr, ms_data, sizeof(ms_data) / sizeof(ms_data[0])); rv = si5351_write(inst, regaddr, ms_data, sizeof(ms_data) / sizeof(ms_data[0]));
if (rv != 0) if (rv)
return rv; return rv;
if ((synth->out_numerator == 0) && ((synth->out_multiplier & 0x01) == 0)) if ((synth->out_numerator == 0) && ((synth->out_multiplier & 0x01) == 0))
@ -704,12 +713,12 @@ int si5351_set_synthesis(si5351_inst_t inst, synthesis_t *synth, uint8_t clk) {
ms_data[0] = (uint8_t)(MSx_INT << 6 | MSx_SRC << 5 | SI5351_CLK_SRC_MS0 | SI5351_CLK_8_MA); //SI5351_CLK_6_MA; //SI5351_CLK_4_MA; ms_data[0] = (uint8_t)(MSx_INT << 6 | MSx_SRC << 5 | SI5351_CLK_SRC_MS0 | SI5351_CLK_8_MA); //SI5351_CLK_6_MA; //SI5351_CLK_4_MA;
regaddr = SI5351_CLK0_CONTROL + clk; regaddr = SI5351_CLK0_CONTROL + clk;
rv = si5351_write(inst, regaddr, ms_data, 1); rv = si5351_write(inst, regaddr, ms_data, 1);
if (rv!=0) if (rv)
return rv; return rv;
ms_data[0] = SI5351_PLL_RESET_VALUE; ms_data[0] = SI5351_PLL_RESET_VALUE;
rv = si5351_write(inst, SI5351_PLL_RESET, ms_data, 1); rv = si5351_write(inst, SI5351_PLL_RESET, ms_data, 1);
if (rv != 0) if (rv)
return rv; return rv;
#if AUTOMATICALLY_ENABLE_OUTPUT #if AUTOMATICALLY_ENABLE_OUTPUT
@ -719,6 +728,12 @@ int si5351_set_synthesis(si5351_inst_t inst, synthesis_t *synth, uint8_t clk) {
return rv; return rv;
} }
#if SI5351_DEBUG
/** @brief With this function, you can read the debug message for test purposes
* @param si5351_instance Given si5351 device handle
* @return * char as message for printing
* @retval NULL when not found
*/
char * si5351_read_debug_msg(si5351_inst_t inst) { char * si5351_read_debug_msg(si5351_inst_t inst) {
if (!inst && !(inst=first_handle)) if (!inst && !(inst=first_handle))
@ -746,7 +761,7 @@ int si5351_read_data(si5351_inst_t inst, void * data) {
memcpy(data, inst->data, inst->datasize); memcpy(data, inst->data, inst->datasize);
return (int)inst->datasize; return (int)inst->datasize;
} }
#endif
/*! /*!
* @brief Output the value in binary representation and in groups of * @brief Output the value in binary representation and in groups of
@ -779,6 +794,14 @@ int __snprintb(char *buf, size_t n, void *value, size_t size)
return cx; return cx;
} }
/** @brief Function to read any register with binary and hex representation
* @param si5351_instance Given si5351 device handle
* @param buffer for printing typically 33 bytes char
* @param size of the buffer for printing typically 33 bytes
* @param register address
* @return * char as message for printing
* @retval NULL when not found
*/
char * si5351_read_register_debug(si5351_inst_t inst, char *buf, size_t bufsize, uint8_t regaddr) { char * si5351_read_register_debug(si5351_inst_t inst, char *buf, size_t bufsize, uint8_t regaddr) {
uint8_t data; uint8_t data;

View File

@ -1,179 +1,178 @@
/* USER CODE BEGIN Header */ /* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* @file stm32l4xx_it.c * @file stm32l4xx_it.c
* @brief Interrupt Service Routines. * @brief Interrupt Service Routines.
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* Copyright (c) 2022 STMicroelectronics. * Copyright (c) 2022 STMicroelectronics.
* All rights reserved. * All rights reserved.
* *
* This software is licensed under terms that can be found in the LICENSE file * This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component. * in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS. * If no LICENSE file comes with this software, it is provided AS-IS.
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */ /* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#include "main.h" #include "main.h"
#include "stm32l4xx_it.h" #include "stm32l4xx_it.h"
/* Private includes ----------------------------------------------------------*/ /* Private includes ----------------------------------------------------------*/
#include <stdio.h> /* USER CODE BEGIN Includes */
/* USER CODE BEGIN Includes */ /* USER CODE END Includes */
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* Private typedef -----------------------------------------------------------*/ /* USER CODE BEGIN TD */
/* USER CODE BEGIN TD */
/* USER CODE END TD */
/* USER CODE END TD */
/* Private define ------------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/ /* USER CODE BEGIN PD */
/* USER CODE BEGIN PD */
/* USER CODE END PD */
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/ /* USER CODE BEGIN PM */
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/ /* USER CODE BEGIN PV */
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/ /* USER CODE BEGIN PFP */
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* Private user code ---------------------------------------------------------*/ /* USER CODE BEGIN 0 */
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/* USER CODE END 0 */
/* External variables --------------------------------------------------------*/
/* External variables --------------------------------------------------------*/ extern TIM_HandleTypeDef htim6;
extern TIM_HandleTypeDef htim6;
/* USER CODE BEGIN EV */
/* USER CODE BEGIN EV */
/* USER CODE END EV */
/* USER CODE END EV */
/******************************************************************************/
/******************************************************************************/ /* Cortex-M4 Processor Interruption and Exception Handlers */
/* Cortex-M4 Processor Interruption and Exception Handlers */ /******************************************************************************/
/******************************************************************************/ /**
/** * @brief This function handles Non maskable interrupt.
* @brief This function handles Non maskable interrupt. */
*/ void NMI_Handler(void)
void NMI_Handler(void) {
{ /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
/* USER CODE BEGIN NonMaskableInt_IRQn 0 */
/* USER CODE END NonMaskableInt_IRQn 0 */
/* USER CODE END NonMaskableInt_IRQn 0 */ /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
/* USER CODE BEGIN NonMaskableInt_IRQn 1 */ while (1)
while (1) {
{ }
} /* USER CODE END NonMaskableInt_IRQn 1 */
/* USER CODE END NonMaskableInt_IRQn 1 */ }
}
/**
/** * @brief This function handles Hard fault interrupt.
* @brief This function handles Hard fault interrupt. */
*/ void HardFault_Handler(void)
void HardFault_Handler(void) {
{ /* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE BEGIN HardFault_IRQn 0 */ printf("something went wrong -> HardFault_Handler called\n");
printf("something went wrong -> HardFault_Handler called\n"); /* USER CODE END HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */ while (1)
while (1) {
{ /* USER CODE BEGIN W1_HardFault_IRQn 0 */
/* USER CODE BEGIN W1_HardFault_IRQn 0 */ /* USER CODE END W1_HardFault_IRQn 0 */
/* USER CODE END W1_HardFault_IRQn 0 */ }
} }
}
/**
/** * @brief This function handles Memory management fault.
* @brief This function handles Memory management fault. */
*/ void MemManage_Handler(void)
void MemManage_Handler(void) {
{ /* USER CODE BEGIN MemoryManagement_IRQn 0 */
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
/* USER CODE END MemoryManagement_IRQn 0 */
/* USER CODE END MemoryManagement_IRQn 0 */ while (1)
while (1) {
{ /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
/* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ /* USER CODE END W1_MemoryManagement_IRQn 0 */
/* USER CODE END W1_MemoryManagement_IRQn 0 */ }
} }
}
/**
/** * @brief This function handles Prefetch fault, memory access fault.
* @brief This function handles Prefetch fault, memory access fault. */
*/ void BusFault_Handler(void)
void BusFault_Handler(void) {
{ /* USER CODE BEGIN BusFault_IRQn 0 */
/* USER CODE BEGIN BusFault_IRQn 0 */
/* USER CODE END BusFault_IRQn 0 */
/* USER CODE END BusFault_IRQn 0 */ while (1)
while (1) {
{ /* USER CODE BEGIN W1_BusFault_IRQn 0 */
/* USER CODE BEGIN W1_BusFault_IRQn 0 */ /* USER CODE END W1_BusFault_IRQn 0 */
/* USER CODE END W1_BusFault_IRQn 0 */ }
} }
}
/**
/** * @brief This function handles Undefined instruction or illegal state.
* @brief This function handles Undefined instruction or illegal state. */
*/ void UsageFault_Handler(void)
void UsageFault_Handler(void) {
{ /* USER CODE BEGIN UsageFault_IRQn 0 */
/* USER CODE BEGIN UsageFault_IRQn 0 */
/* USER CODE END UsageFault_IRQn 0 */
/* USER CODE END UsageFault_IRQn 0 */ while (1)
while (1) {
{ /* USER CODE BEGIN W1_UsageFault_IRQn 0 */
/* USER CODE BEGIN W1_UsageFault_IRQn 0 */ /* USER CODE END W1_UsageFault_IRQn 0 */
/* USER CODE END W1_UsageFault_IRQn 0 */ }
} }
}
/**
/** * @brief This function handles Debug monitor.
* @brief This function handles Debug monitor. */
*/ void DebugMon_Handler(void)
void DebugMon_Handler(void) {
{ /* USER CODE BEGIN DebugMonitor_IRQn 0 */
/* USER CODE BEGIN DebugMonitor_IRQn 0 */
/* USER CODE END DebugMonitor_IRQn 0 */
/* USER CODE END DebugMonitor_IRQn 0 */ /* USER CODE BEGIN DebugMonitor_IRQn 1 */
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
/* USER CODE END DebugMonitor_IRQn 1 */
/* USER CODE END DebugMonitor_IRQn 1 */ }
}
/******************************************************************************/
/******************************************************************************/ /* STM32L4xx Peripheral Interrupt Handlers */
/* STM32L4xx Peripheral Interrupt Handlers */ /* Add here the Interrupt Handlers for the used peripherals. */
/* Add here the Interrupt Handlers for the used peripherals. */ /* For the available peripheral interrupt handler names, */
/* For the available peripheral interrupt handler names, */ /* please refer to the startup file (startup_stm32l4xx.s). */
/* please refer to the startup file (startup_stm32l4xx.s). */ /******************************************************************************/
/******************************************************************************/
/**
/** * @brief This function handles TIM6 global interrupt, DAC channel1 and channel2 underrun error interrupts.
* @brief This function handles TIM6 global interrupt, DAC channel1 and channel2 underrun error interrupts. */
*/ void TIM6_DAC_IRQHandler(void)
void TIM6_DAC_IRQHandler(void) {
{ /* USER CODE BEGIN TIM6_DAC_IRQn 0 */
/* USER CODE BEGIN TIM6_DAC_IRQn 0 */
/* USER CODE END TIM6_DAC_IRQn 0 */
/* USER CODE END TIM6_DAC_IRQn 0 */ HAL_TIM_IRQHandler(&htim6);
HAL_TIM_IRQHandler(&htim6); /* USER CODE BEGIN TIM6_DAC_IRQn 1 */
/* USER CODE BEGIN TIM6_DAC_IRQn 1 */
/* USER CODE END TIM6_DAC_IRQn 1 */
/* USER CODE END TIM6_DAC_IRQn 1 */ }
}
/* USER CODE BEGIN 1 */
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* USER CODE END 1 */

View File

@ -7,8 +7,11 @@ FREERTOS.configTOTAL_HEAP_SIZE=30000
FREERTOS.configUSE_NEWLIB_REENTRANT=1 FREERTOS.configUSE_NEWLIB_REENTRANT=1
File.Version=6 File.Version=6
GPIO.groupedBy=Group By Peripherals GPIO.groupedBy=Group By Peripherals
I2C1.IPParameters=Timing I2C1.I2C_Fall_Time=10
I2C1.Timing=0x00505B89 I2C1.I2C_Rise_Time=10
I2C1.I2C_Speed_Mode=I2C_Fast
I2C1.IPParameters=Timing,I2C_Speed_Mode,I2C_Rise_Time,I2C_Fall_Time
I2C1.Timing=0x00000001
KeepUserPlacement=false KeepUserPlacement=false
LPUART1.AutoBaudRateEnableParam=UART_ADVFEATURE_AUTOBAUDRATE_DISABLE LPUART1.AutoBaudRateEnableParam=UART_ADVFEATURE_AUTOBAUDRATE_DISABLE
LPUART1.BaudRate=115200 LPUART1.BaudRate=115200
@ -37,32 +40,33 @@ Mcu.IP6=SYS
Mcu.IPNb=7 Mcu.IPNb=7
Mcu.Name=STM32L4A6ZGTx Mcu.Name=STM32L4A6ZGTx
Mcu.Package=LQFP144 Mcu.Package=LQFP144
Mcu.Pin0=PC14-OSC32_IN (PC14) Mcu.Pin0=PC13
Mcu.Pin1=PC15-OSC32_OUT (PC15) Mcu.Pin1=PC14-OSC32_IN (PC14)
Mcu.Pin10=PA8 Mcu.Pin10=PC7
Mcu.Pin11=PA9 Mcu.Pin11=PA8
Mcu.Pin12=PA10 Mcu.Pin12=PA9
Mcu.Pin13=PA11 Mcu.Pin13=PA10
Mcu.Pin14=PA12 Mcu.Pin14=PA11
Mcu.Pin15=PA13 (JTMS/SWDIO) Mcu.Pin15=PA12
Mcu.Pin16=PA14 (JTCK/SWCLK) Mcu.Pin16=PA13 (JTMS/SWDIO)
Mcu.Pin17=PB3 (JTDO/TRACESWO) Mcu.Pin17=PA14 (JTCK/SWCLK)
Mcu.Pin18=PB7 Mcu.Pin18=PB3 (JTDO/TRACESWO)
Mcu.Pin19=PB8 Mcu.Pin19=PB7
Mcu.Pin2=PH1-OSC_OUT (PH1) Mcu.Pin2=PC15-OSC32_OUT (PC15)
Mcu.Pin20=PB9 Mcu.Pin20=PB8
Mcu.Pin21=VP_FREERTOS_VS_CMSIS_V2 Mcu.Pin21=PB9
Mcu.Pin22=VP_RTC_VS_RTC_Activate Mcu.Pin22=VP_FREERTOS_VS_CMSIS_V2
Mcu.Pin23=VP_RTC_VS_RTC_Calendar Mcu.Pin23=VP_RTC_VS_RTC_Activate
Mcu.Pin24=VP_SYS_VS_tim6 Mcu.Pin24=VP_RTC_VS_RTC_Calendar
Mcu.Pin3=PA2 Mcu.Pin25=VP_SYS_VS_tim6
Mcu.Pin4=PB14 Mcu.Pin3=PH1-OSC_OUT (PH1)
Mcu.Pin5=PG5 Mcu.Pin4=PA2
Mcu.Pin6=PG6 Mcu.Pin5=PB14
Mcu.Pin7=PG7 Mcu.Pin6=PG5
Mcu.Pin8=PG8 Mcu.Pin7=PG6
Mcu.Pin9=PC7 Mcu.Pin8=PG7
Mcu.PinsNb=25 Mcu.Pin9=PG8
Mcu.PinsNb=26
Mcu.ThirdPartyNb=0 Mcu.ThirdPartyNb=0
Mcu.UserConstants= Mcu.UserConstants=
Mcu.UserName=STM32L4A6ZGTx Mcu.UserName=STM32L4A6ZGTx
@ -140,6 +144,11 @@ PB9.GPIO_Pu=GPIO_PULLUP
PB9.Locked=true PB9.Locked=true
PB9.Mode=I2C PB9.Mode=I2C
PB9.Signal=I2C1_SDA PB9.Signal=I2C1_SDA
PC13.GPIOParameters=GPIO_PuPd,GPIO_Label
PC13.GPIO_Label=B1
PC13.GPIO_PuPd=GPIO_PULLDOWN
PC13.Locked=true
PC13.Signal=GPIO_Input
PC14-OSC32_IN\ (PC14).Locked=true PC14-OSC32_IN\ (PC14).Locked=true
PC14-OSC32_IN\ (PC14).Mode=LSE-External-Oscillator PC14-OSC32_IN\ (PC14).Mode=LSE-External-Oscillator
PC14-OSC32_IN\ (PC14).Signal=RCC_OSC32_IN PC14-OSC32_IN\ (PC14).Signal=RCC_OSC32_IN
@ -150,6 +159,44 @@ PC7.GPIOParameters=GPIO_Label
PC7.GPIO_Label=LD1 [Green] PC7.GPIO_Label=LD1 [Green]
PC7.Locked=true PC7.Locked=true
PC7.Signal=GPIO_Output PC7.Signal=GPIO_Output
PCC.Checker=true
PCC.Line=STM32L4x6
PCC.MCU=STM32L4A6ZGTx
PCC.PartNumber=STM32L4A6ZGTx
PCC.Seq0=2
PCC.Seq0.Step0.Average_Current=2.12 mA
PCC.Seq0.Step0.CPU_Frequency=16 MHz
PCC.Seq0.Step0.Category=In DS Table
PCC.Seq0.Step0.DMIPS=20.0
PCC.Seq0.Step0.Duration=0.1 ms
PCC.Seq0.Step0.Frequency=16 MHz
PCC.Seq0.Step0.Memory=SRAM2
PCC.Seq0.Step0.Mode=RUN
PCC.Seq0.Step0.Oscillator=HSE BYP Flash-PowerDown
PCC.Seq0.Step0.Peripherals=
PCC.Seq0.Step0.TaMax=104.8
PCC.Seq0.Step0.User's_Consumption=0 mA
PCC.Seq0.Step0.Vcore=Range1-High
PCC.Seq0.Step0.Vdd=3.0
PCC.Seq0.Step0.Voltage_Source=Battery
PCC.Seq0.Step1.Average_Current=131 \u00B5A
PCC.Seq0.Step1.CPU_Frequency=32.768 kHz
PCC.Seq0.Step1.Category=In DS Table
PCC.Seq0.Step1.DMIPS=0.0
PCC.Seq0.Step1.Duration=0.9 ms
PCC.Seq0.Step1.Frequency=32.768 kHz
PCC.Seq0.Step1.Memory=n/a
PCC.Seq0.Step1.Mode=STOP0
PCC.Seq0.Step1.Oscillator=LSE BYP Flash-PowerDown
PCC.Seq0.Step1.Peripherals=
PCC.Seq0.Step1.TaMax=104.99
PCC.Seq0.Step1.User's_Consumption=0 mA
PCC.Seq0.Step1.Vcore=NoRange
PCC.Seq0.Step1.Vdd=3.0
PCC.Seq0.Step1.Voltage_Source=Battery
PCC.Series=STM32L4
PCC.Temperature=25
PCC.Vdd=3.0
PG5.GPIOParameters=GPIO_Label PG5.GPIOParameters=GPIO_Label
PG5.GPIO_Label=USB_OverCurrent [STMPS2151STR_FAULT] PG5.GPIO_Label=USB_OverCurrent [STMPS2151STR_FAULT]
PG5.Locked=true PG5.Locked=true
@ -202,32 +249,32 @@ ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=true ProjectManager.UnderRoot=true
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_LPUART1_UART_Init-LPUART1-false-HAL-true,4-MX_I2C1_Init-I2C1-false-HAL-true,5-MX_RTC_Init-RTC-false-HAL-true ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_LPUART1_UART_Init-LPUART1-false-HAL-true,4-MX_I2C1_Init-I2C1-false-HAL-true,5-MX_RTC_Init-RTC-false-HAL-true
RCC.ADCFreq_Value=48000000 RCC.ADCFreq_Value=48000000
RCC.AHBFreq_Value=47333333.333333336 RCC.AHBCLKDivider=RCC_SYSCLK_DIV8
RCC.AHBFreq_Value=5916666.666666667
RCC.APB1CLKDivider=RCC_HCLK_DIV2 RCC.APB1CLKDivider=RCC_HCLK_DIV2
RCC.APB1Freq_Value=23666666.666666668 RCC.APB1Freq_Value=2958333.3333333335
RCC.APB1TimFreq_Value=47333333.333333336 RCC.APB1TimFreq_Value=5916666.666666667
RCC.APB2Freq_Value=47333333.333333336 RCC.APB2CLKDivider=RCC_HCLK_DIV4
RCC.APB2TimFreq_Value=47333333.333333336 RCC.APB2Freq_Value=1479166.6666666667
RCC.CortexFreq_Value=47333333.333333336 RCC.APB2TimFreq_Value=2958333.3333333335
RCC.DFSDMFreq_Value=23666666.666666668 RCC.CortexFreq_Value=5916666.666666667
RCC.FCLKCortexFreq_Value=47333333.333333336 RCC.DFSDMFreq_Value=2958333.3333333335
RCC.FCLKCortexFreq_Value=5916666.666666667
RCC.FamilyName=M RCC.FamilyName=M
RCC.HCLKFreq_Value=47333333.333333336 RCC.HCLKFreq_Value=5916666.666666667
RCC.HSE_VALUE=8000000 RCC.HSE_VALUE=8000000
RCC.HSI48_VALUE=48000000 RCC.HSI48_VALUE=48000000
RCC.HSI_VALUE=16000000 RCC.HSI_VALUE=16000000
RCC.I2C1Freq_Value=23666666.666666668 RCC.I2C1Freq_Value=2958333.3333333335
RCC.I2C2Freq_Value=23666666.666666668 RCC.I2C2Freq_Value=2958333.3333333335
RCC.I2C3Freq_Value=23666666.666666668 RCC.I2C3Freq_Value=2958333.3333333335
RCC.I2C4Freq_Value=23666666.666666668 RCC.I2C4Freq_Value=2958333.3333333335
RCC.IPParameters=ADCFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,DFSDMFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,I2C4Freq_Value,LCDFreq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSE_Drive_Capability,LSE_Timout,LSI_VALUE,MCO1PinFreq_Value,MSI_VALUE,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLR,PLLRCLKFreq_Value,PLLSAI1N,PLLSAI1PoutputFreq_Value,PLLSAI1QoutputFreq_Value,PLLSAI1RoutputFreq_Value,PLLSAI2PoutputFreq_Value,PLLSAI2RoutputFreq_Value,PWRFreq_Value,RNGFreq_Value,RTCClockSelection,RTCFreq_Value,SAI1Freq_Value,SAI2Freq_Value,SDMMCFreq_Value,SWPMI1Freq_Value,SYSCLKFreq_VALUE,SYSCLKSource,UART4Freq_Value,UART5Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAI1OutputFreq_Value,VCOSAI2OutputFreq_Value RCC.IPParameters=ADCFreq_Value,AHBCLKDivider,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,DFSDMFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,I2C4Freq_Value,LCDFreq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSI_VALUE,MCO1PinFreq_Value,MSI_VALUE,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLR,PLLRCLKFreq_Value,PLLSAI1N,PLLSAI1PoutputFreq_Value,PLLSAI1QoutputFreq_Value,PLLSAI1RoutputFreq_Value,PLLSAI2PoutputFreq_Value,PLLSAI2RoutputFreq_Value,PWRFreq_Value,RNGFreq_Value,RTCClockSelection,RTCFreq_Value,SAI1Freq_Value,SAI2Freq_Value,SDMMCFreq_Value,SWPMI1Freq_Value,SYSCLKFreq_VALUE,SYSCLKSource,UART4Freq_Value,UART5Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAI1OutputFreq_Value,VCOSAI2OutputFreq_Value
RCC.LCDFreq_Value=32768 RCC.LCDFreq_Value=32768
RCC.LPTIM1Freq_Value=23666666.666666668 RCC.LPTIM1Freq_Value=2958333.3333333335
RCC.LPTIM2Freq_Value=23666666.666666668 RCC.LPTIM2Freq_Value=2958333.3333333335
RCC.LPUART1Freq_Value=23666666.666666668 RCC.LPUART1Freq_Value=2958333.3333333335
RCC.LSCOPinFreq_Value=32000 RCC.LSCOPinFreq_Value=32000
RCC.LSE_Drive_Capability=RCC_LSEDRIVE_HIGH
RCC.LSE_Timout=50000
RCC.LSI_VALUE=32000 RCC.LSI_VALUE=32000
RCC.MCO1PinFreq_Value=47333333.333333336 RCC.MCO1PinFreq_Value=47333333.333333336
RCC.MSI_VALUE=4000000 RCC.MSI_VALUE=4000000
@ -249,14 +296,14 @@ RCC.RTCFreq_Value=32768
RCC.SAI1Freq_Value=48000000 RCC.SAI1Freq_Value=48000000
RCC.SAI2Freq_Value=48000000 RCC.SAI2Freq_Value=48000000
RCC.SDMMCFreq_Value=48000000 RCC.SDMMCFreq_Value=48000000
RCC.SWPMI1Freq_Value=23666666.666666668 RCC.SWPMI1Freq_Value=2958333.3333333335
RCC.SYSCLKFreq_VALUE=47333333.333333336 RCC.SYSCLKFreq_VALUE=47333333.333333336
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
RCC.UART4Freq_Value=23666666.666666668 RCC.UART4Freq_Value=2958333.3333333335
RCC.UART5Freq_Value=23666666.666666668 RCC.UART5Freq_Value=2958333.3333333335
RCC.USART1Freq_Value=47333333.333333336 RCC.USART1Freq_Value=1479166.6666666667
RCC.USART2Freq_Value=23666666.666666668 RCC.USART2Freq_Value=2958333.3333333335
RCC.USART3Freq_Value=23666666.666666668 RCC.USART3Freq_Value=2958333.3333333335
RCC.USBFreq_Value=48000000 RCC.USBFreq_Value=48000000
RCC.VCOInputFreq_Value=4000000 RCC.VCOInputFreq_Value=4000000
RCC.VCOOutputFreq_Value=284000000 RCC.VCOOutputFreq_Value=284000000
@ -279,4 +326,4 @@ VP_SYS_VS_tim6.Mode=TIM6
VP_SYS_VS_tim6.Signal=SYS_VS_tim6 VP_SYS_VS_tim6.Signal=SYS_VS_tim6
board=NUCLEO-L4A6ZG board=NUCLEO-L4A6ZG
boardIOC=true boardIOC=true
isbadioc=false isbadioc=true