STM32CubeIDE and package upgrade

This commit is contained in:
Attila Body 2022-09-05 16:00:02 +02:00
parent 5139921a22
commit ecdfc9003a
89 changed files with 2838 additions and 2207 deletions

View file

@ -9,33 +9,33 @@ CDefines=USE_FULL_LL_DRIVER;USE_HAL_DRIVER;STM32F407xx;USE_FULL_LL_DRIVER;USE_HA
[PreviousGenFiles] [PreviousGenFiles]
AdvancedFolderStructure=true AdvancedFolderStructure=true
HeaderFileListSize=11 HeaderFileListSize=11
HeaderFiles#0=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Inc/gpio.h HeaderFiles#0=../Core/Inc/gpio.h
HeaderFiles#1=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Inc/FreeRTOSConfig.h HeaderFiles#1=../Core/Inc/FreeRTOSConfig.h
HeaderFiles#2=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Inc/crc.h HeaderFiles#2=../Core/Inc/crc.h
HeaderFiles#3=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Inc/dma.h HeaderFiles#3=../Core/Inc/dma.h
HeaderFiles#4=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Inc/fsmc.h HeaderFiles#4=../Core/Inc/fsmc.h
HeaderFiles#5=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Inc/spi.h HeaderFiles#5=../Core/Inc/spi.h
HeaderFiles#6=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Inc/usart.h HeaderFiles#6=../Core/Inc/usart.h
HeaderFiles#7=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Inc/stm32f4xx_it.h HeaderFiles#7=../Core/Inc/stm32f4xx_it.h
HeaderFiles#8=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Inc/stm32_assert.h HeaderFiles#8=../Core/Inc/stm32_assert.h
HeaderFiles#9=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Inc/stm32f4xx_hal_conf.h HeaderFiles#9=../Core/Inc/stm32f4xx_hal_conf.h
HeaderFiles#10=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Inc/main.h HeaderFiles#10=../Core/Inc/main.h
HeaderFolderListSize=1 HeaderFolderListSize=1
HeaderPath#0=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Inc HeaderPath#0=../Core/Inc
HeaderFiles=; HeaderFiles=;
SourceFileListSize=11 SourceFileListSize=11
SourceFiles#0=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Src/gpio.c SourceFiles#0=../Core/Src/gpio.c
SourceFiles#1=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Src/freertos.c SourceFiles#1=../Core/Src/freertos.c
SourceFiles#2=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Src/crc.c SourceFiles#2=../Core/Src/crc.c
SourceFiles#3=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Src/dma.c SourceFiles#3=../Core/Src/dma.c
SourceFiles#4=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Src/fsmc.c SourceFiles#4=../Core/Src/fsmc.c
SourceFiles#5=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Src/spi.c SourceFiles#5=../Core/Src/spi.c
SourceFiles#6=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Src/usart.c SourceFiles#6=../Core/Src/usart.c
SourceFiles#7=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Src/stm32f4xx_it.c SourceFiles#7=../Core/Src/stm32f4xx_it.c
SourceFiles#8=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Src/stm32f4xx_hal_msp.c SourceFiles#8=../Core/Src/stm32f4xx_hal_msp.c
SourceFiles#9=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Src/stm32f4xx_hal_timebase_tim.c SourceFiles#9=../Core/Src/stm32f4xx_hal_timebase_tim.c
SourceFiles#10=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Src/main.c SourceFiles#10=../Core/Src/main.c
SourceFolderListSize=1 SourceFolderListSize=1
SourcePath#0=/mnt/userdata/compi/work/private/stm32/f407ve_freertos/Core/Src SourcePath#0=../Core/Src
SourceFiles=; SourceFiles=;

View file

@ -40,7 +40,10 @@ public:
void Loop(); void Loop();
friend class fsl::Task<Application, APPLICATION_STACK_SIZE>; friend class fsl::Task<Application, APPLICATION_STACK_SIZE>;
private: private:
static constexpr uint32_t const CONSOLE_NOTITY_MASK = 1;
static constexpr uint32_t const PEN_NOTITY_MASK = 2;
virtual void LineReceived(void *userParam, f4ll_cpp::SerialConsole<257>::Buffer *buffer); virtual void LineReceived(void *userParam, f4ll_cpp::SerialConsole<257>::Buffer *buffer);
virtual void TransmissionComplete(void *userParam, f4ll_cpp::SerialConsole<257>::Buffer *buffer); virtual void TransmissionComplete(void *userParam, f4ll_cpp::SerialConsole<257>::Buffer *buffer);

View file

@ -1,3 +1,4 @@
/* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* @file crc.h * @file crc.h
@ -6,16 +7,16 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics. * Copyright (c) 2022 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under Ultimate Liberty license * This software is licensed under terms that can be found in the LICENSE file
* SLA0044, the "License"; You may not use this file except in compliance with * in the root directory of this software component.
* the License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* www.st.com/SLA0044
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __CRC_H__ #ifndef __CRC_H__
#define __CRC_H__ #define __CRC_H__
@ -47,4 +48,3 @@ void MX_CRC_Init(void);
#endif /* __CRC_H__ */ #endif /* __CRC_H__ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -1,3 +1,4 @@
/* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* @file dma.h * @file dma.h
@ -6,16 +7,16 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics. * Copyright (c) 2022 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under Ultimate Liberty license * This software is licensed under terms that can be found in the LICENSE file
* SLA0044, the "License"; You may not use this file except in compliance with * in the root directory of this software component.
* the License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* www.st.com/SLA0044
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __DMA_H__ #ifndef __DMA_H__
#define __DMA_H__ #define __DMA_H__
@ -49,4 +50,3 @@ void MX_DMA_Init(void);
#endif /* __DMA_H__ */ #endif /* __DMA_H__ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -1,3 +1,4 @@
/* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* File Name : FSMC.h * File Name : FSMC.h
@ -6,16 +7,16 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics. * Copyright (c) 2022 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under Ultimate Liberty license * This software is licensed under terms that can be found in the LICENSE file
* SLA0044, the "License"; You may not use this file except in compliance with * in the root directory of this software component.
* the License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* www.st.com/SLA0044
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __FSMC_H #ifndef __FSMC_H
#define __FSMC_H #define __FSMC_H
@ -56,5 +57,3 @@ void HAL_SRAM_MspDeInit(SRAM_HandleTypeDef* hsram);
/** /**
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -1,3 +1,4 @@
/* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* @file gpio.h * @file gpio.h
@ -6,16 +7,16 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics. * Copyright (c) 2022 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under Ultimate Liberty license * This software is licensed under terms that can be found in the LICENSE file
* SLA0044, the "License"; You may not use this file except in compliance with * in the root directory of this software component.
* the License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* www.st.com/SLA0044
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __GPIO_H__ #ifndef __GPIO_H__
#define __GPIO_H__ #define __GPIO_H__
@ -46,4 +47,3 @@ void MX_GPIO_Init(void);
#endif #endif
#endif /*__ GPIO_H__ */ #endif /*__ GPIO_H__ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -81,6 +81,7 @@ void Error_Handler(void);
#define LED2_GPIO_Port GPIOA #define LED2_GPIO_Port GPIOA
#define PENIRQ_Pin LL_GPIO_PIN_5 #define PENIRQ_Pin LL_GPIO_PIN_5
#define PENIRQ_GPIO_Port GPIOC #define PENIRQ_GPIO_Port GPIOC
#define PENIRQ_EXTI_IRQn EXTI9_5_IRQn
#define TOUCH_CS_Pin LL_GPIO_PIN_12 #define TOUCH_CS_Pin LL_GPIO_PIN_12
#define TOUCH_CS_GPIO_Port GPIOB #define TOUCH_CS_GPIO_Port GPIOB
/* USER CODE BEGIN Private defines */ /* USER CODE BEGIN Private defines */
@ -92,5 +93,3 @@ void Error_Handler(void);
#endif #endif
#endif /* __MAIN_H */ #endif /* __MAIN_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -1,3 +1,4 @@
/* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* @file spi.h * @file spi.h
@ -6,16 +7,16 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics. * Copyright (c) 2022 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under Ultimate Liberty license * This software is licensed under terms that can be found in the LICENSE file
* SLA0044, the "License"; You may not use this file except in compliance with * in the root directory of this software component.
* the License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* www.st.com/SLA0044
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __SPI_H__ #ifndef __SPI_H__
#define __SPI_H__ #define __SPI_H__
@ -47,4 +48,3 @@ void MX_SPI2_Init(void);
#endif /* __SPI_H__ */ #endif /* __SPI_H__ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -1,3 +1,4 @@
/* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* @file stm32_assert.h * @file stm32_assert.h
@ -5,16 +6,16 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2018 STMicroelectronics. * Copyright (c) 2018 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32_ASSERT_H #ifndef __STM32_ASSERT_H
@ -50,4 +51,3 @@
#endif /* __STM32_ASSERT_H */ #endif /* __STM32_ASSERT_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -1,3 +1,4 @@
/* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* @file stm32f4xx_hal_conf_template.h * @file stm32f4xx_hal_conf_template.h
@ -8,16 +9,16 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F4xx_HAL_CONF_H #ifndef __STM32F4xx_HAL_CONF_H
@ -488,5 +489,3 @@
#endif #endif
#endif /* __STM32F4xx_HAL_CONF_H */ #endif /* __STM32F4xx_HAL_CONF_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -53,6 +53,7 @@ void MemManage_Handler(void);
void BusFault_Handler(void); void BusFault_Handler(void);
void UsageFault_Handler(void); void UsageFault_Handler(void);
void DebugMon_Handler(void); void DebugMon_Handler(void);
void EXTI9_5_IRQHandler(void);
void USART1_IRQHandler(void); void USART1_IRQHandler(void);
void TIM6_DAC_IRQHandler(void); void TIM6_DAC_IRQHandler(void);
void DMA2_Stream2_IRQHandler(void); void DMA2_Stream2_IRQHandler(void);
@ -67,5 +68,3 @@ void DMA2_Stream7_IRQHandler(void);
#endif #endif
#endif /* __STM32F4xx_IT_H */ #endif /* __STM32F4xx_IT_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -1,3 +1,4 @@
/* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* @file usart.h * @file usart.h
@ -6,16 +7,16 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics. * Copyright (c) 2022 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under Ultimate Liberty license * This software is licensed under terms that can be found in the LICENSE file
* SLA0044, the "License"; You may not use this file except in compliance with * in the root directory of this software component.
* the License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* www.st.com/SLA0044
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USART_H__ #ifndef __USART_H__
#define __USART_H__ #define __USART_H__
@ -47,4 +48,3 @@ void MX_USART1_UART_Init(void);
#endif /* __USART_H__ */ #endif /* __USART_H__ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -1,3 +1,4 @@
/* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* @file crc.c * @file crc.c
@ -6,17 +7,16 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics. * Copyright (c) 2022 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under Ultimate Liberty license * This software is licensed under terms that can be found in the LICENSE file
* SLA0044, the "License"; You may not use this file except in compliance with * in the root directory of this software component.
* the License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* www.st.com/SLA0044
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#include "crc.h" #include "crc.h"
@ -47,5 +47,3 @@ void MX_CRC_Init(void)
/* USER CODE BEGIN 1 */ /* USER CODE BEGIN 1 */
/* USER CODE END 1 */ /* USER CODE END 1 */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -1,3 +1,4 @@
/* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* @file dma.c * @file dma.c
@ -6,16 +7,16 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics. * Copyright (c) 2022 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under Ultimate Liberty license * This software is licensed under terms that can be found in the LICENSE file
* SLA0044, the "License"; You may not use this file except in compliance with * in the root directory of this software component.
* the License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* www.st.com/SLA0044
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#include "dma.h" #include "dma.h"
@ -97,4 +98,3 @@ void MX_DMA_Init(void)
/* USER CODE END 2 */ /* USER CODE END 2 */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -145,4 +145,3 @@ void StartDefaultTask(void *argument)
/* USER CODE END Application */ /* USER CODE END Application */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -1,3 +1,4 @@
/* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* File Name : FSMC.c * File Name : FSMC.c
@ -6,16 +7,16 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics. * Copyright (c) 2022 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under Ultimate Liberty license * This software is licensed under terms that can be found in the LICENSE file
* SLA0044, the "License"; You may not use this file except in compliance with * in the root directory of this software component.
* the License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* www.st.com/SLA0044
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#include "fsmc.h" #include "fsmc.h"
@ -217,5 +218,3 @@ void HAL_SRAM_MspDeInit(SRAM_HandleTypeDef* sramHandle){
/** /**
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -1,3 +1,4 @@
/* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* @file gpio.c * @file gpio.c
@ -6,16 +7,16 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics. * Copyright (c) 2022 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under Ultimate Liberty license * This software is licensed under terms that can be found in the LICENSE file
* SLA0044, the "License"; You may not use this file except in compliance with * in the root directory of this software component.
* the License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* www.st.com/SLA0044
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#include "gpio.h" #include "gpio.h"
@ -41,6 +42,7 @@
void MX_GPIO_Init(void) void MX_GPIO_Init(void)
{ {
LL_EXTI_InitTypeDef EXTI_InitStruct = {0};
LL_GPIO_InitTypeDef GPIO_InitStruct = {0}; LL_GPIO_InitTypeDef GPIO_InitStruct = {0};
/* GPIO Ports Clock Enable */ /* GPIO Ports Clock Enable */
@ -74,12 +76,6 @@ void MX_GPIO_Init(void)
GPIO_InitStruct.Pull = LL_GPIO_PULL_NO; GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
LL_GPIO_Init(GPIOA, &GPIO_InitStruct); LL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/**/
GPIO_InitStruct.Pin = PENIRQ_Pin;
GPIO_InitStruct.Mode = LL_GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
LL_GPIO_Init(PENIRQ_GPIO_Port, &GPIO_InitStruct);
/**/ /**/
GPIO_InitStruct.Pin = TOUCH_CS_Pin; GPIO_InitStruct.Pin = TOUCH_CS_Pin;
GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT; GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT;
@ -88,10 +84,28 @@ void MX_GPIO_Init(void)
GPIO_InitStruct.Pull = LL_GPIO_PULL_NO; GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
LL_GPIO_Init(TOUCH_CS_GPIO_Port, &GPIO_InitStruct); LL_GPIO_Init(TOUCH_CS_GPIO_Port, &GPIO_InitStruct);
/**/
LL_SYSCFG_SetEXTISource(LL_SYSCFG_EXTI_PORTC, LL_SYSCFG_EXTI_LINE5);
/**/
EXTI_InitStruct.Line_0_31 = LL_EXTI_LINE_5;
EXTI_InitStruct.LineCommand = ENABLE;
EXTI_InitStruct.Mode = LL_EXTI_MODE_IT;
EXTI_InitStruct.Trigger = LL_EXTI_TRIGGER_RISING;
LL_EXTI_Init(&EXTI_InitStruct);
/**/
LL_GPIO_SetPinPull(PENIRQ_GPIO_Port, PENIRQ_Pin, LL_GPIO_PULL_NO);
/**/
LL_GPIO_SetPinMode(PENIRQ_GPIO_Port, PENIRQ_Pin, LL_GPIO_MODE_INPUT);
/* EXTI interrupt init*/
NVIC_SetPriority(EXTI9_5_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(),5, 0));
NVIC_EnableIRQ(EXTI9_5_IRQn);
} }
/* USER CODE BEGIN 2 */ /* USER CODE BEGIN 2 */
/* USER CODE END 2 */ /* USER CODE END 2 */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -107,6 +107,7 @@ int main(void)
/* Init scheduler */ /* Init scheduler */
osKernelInitialize(); /* Call init function for freertos objects (in freertos.c) */ osKernelInitialize(); /* Call init function for freertos objects (in freertos.c) */
MX_FREERTOS_Init(); MX_FREERTOS_Init();
/* Start scheduler */ /* Start scheduler */
osKernelStart(); osKernelStart();
@ -223,5 +224,3 @@ void assert_failed(uint8_t *file, uint32_t line)
/* USER CODE END 6 */ /* USER CODE END 6 */
} }
#endif /* USE_FULL_ASSERT */ #endif /* USE_FULL_ASSERT */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -1,3 +1,4 @@
/* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* @file spi.c * @file spi.c
@ -6,17 +7,16 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics. * Copyright (c) 2022 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under Ultimate Liberty license * This software is licensed under terms that can be found in the LICENSE file
* SLA0044, the "License"; You may not use this file except in compliance with * in the root directory of this software component.
* the License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* www.st.com/SLA0044
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#include "spi.h" #include "spi.h"
@ -77,5 +77,3 @@ void MX_SPI2_Init(void)
/* USER CODE BEGIN 1 */ /* USER CODE BEGIN 1 */
/* USER CODE END 1 */ /* USER CODE END 1 */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -82,5 +82,3 @@ void HAL_MspInit(void)
/* USER CODE BEGIN 1 */ /* USER CODE BEGIN 1 */
/* USER CODE END 1 */ /* USER CODE END 1 */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -42,14 +42,11 @@ TIM_HandleTypeDef htim6;
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{ {
RCC_ClkInitTypeDef clkconfig; RCC_ClkInitTypeDef clkconfig;
uint32_t uwTimclock = 0; uint32_t uwTimclock, uwAPB1Prescaler = 0U;
uint32_t uwPrescalerValue = 0;
uint32_t pFLatency;
/*Configure the TIM6 IRQ priority */
HAL_NVIC_SetPriority(TIM6_DAC_IRQn, TickPriority ,0);
/* Enable the TIM6 global Interrupt */ uint32_t uwPrescalerValue = 0U;
HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn); uint32_t pFLatency;
HAL_StatusTypeDef status;
/* Enable TIM6 clock */ /* Enable TIM6 clock */
__HAL_RCC_TIM6_CLK_ENABLE(); __HAL_RCC_TIM6_CLK_ENABLE();
@ -57,8 +54,18 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
/* Get clock configuration */ /* Get clock configuration */
HAL_RCC_GetClockConfig(&clkconfig, &pFLatency); HAL_RCC_GetClockConfig(&clkconfig, &pFLatency);
/* Get APB1 prescaler */
uwAPB1Prescaler = clkconfig.APB1CLKDivider;
/* Compute TIM6 clock */ /* Compute TIM6 clock */
uwTimclock = 2*HAL_RCC_GetPCLK1Freq(); if (uwAPB1Prescaler == RCC_HCLK_DIV1)
{
uwTimclock = HAL_RCC_GetPCLK1Freq();
}
else
{
uwTimclock = 2UL * HAL_RCC_GetPCLK1Freq();
}
/* Compute the prescaler value to have TIM6 counter clock equal to 1MHz */ /* Compute the prescaler value to have TIM6 counter clock equal to 1MHz */
uwPrescalerValue = (uint32_t) ((uwTimclock / 1000000U) - 1U); uwPrescalerValue = (uint32_t) ((uwTimclock / 1000000U) - 1U);
@ -75,15 +82,33 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
htim6.Init.Prescaler = uwPrescalerValue; htim6.Init.Prescaler = uwPrescalerValue;
htim6.Init.ClockDivision = 0; htim6.Init.ClockDivision = 0;
htim6.Init.CounterMode = TIM_COUNTERMODE_UP; htim6.Init.CounterMode = TIM_COUNTERMODE_UP;
htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if(HAL_TIM_Base_Init(&htim6) == HAL_OK) status = HAL_TIM_Base_Init(&htim6);
if (status == HAL_OK)
{ {
/* Start the TIM time Base generation in interrupt mode */ /* Start the TIM time Base generation in interrupt mode */
return HAL_TIM_Base_Start_IT(&htim6); status = HAL_TIM_Base_Start_IT(&htim6);
if (status == HAL_OK)
{
/* Enable the TIM6 global Interrupt */
HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn);
/* Configure the SysTick IRQ priority */
if (TickPriority < (1UL << __NVIC_PRIO_BITS))
{
/* Configure the TIM IRQ priority */
HAL_NVIC_SetPriority(TIM6_DAC_IRQn, TickPriority, 0U);
uwTickPrio = TickPriority;
}
else
{
status = HAL_ERROR;
}
}
} }
/* Return function status */ /* Return function status */
return HAL_ERROR; return status;
} }
/** /**
@ -110,4 +135,3 @@ void HAL_ResumeTick(void)
__HAL_TIM_ENABLE_IT(&htim6, TIM_IT_UPDATE); __HAL_TIM_ENABLE_IT(&htim6, TIM_IT_UPDATE);
} }
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -162,6 +162,26 @@ void DebugMon_Handler(void)
/* please refer to the startup file (startup_stm32f4xx.s). */ /* please refer to the startup file (startup_stm32f4xx.s). */
/******************************************************************************/ /******************************************************************************/
/**
* @brief This function handles EXTI line[9:5] interrupts.
*/
void EXTI9_5_IRQHandler(void)
{
/* USER CODE BEGIN EXTI9_5_IRQn 0 */
/* USER CODE END EXTI9_5_IRQn 0 */
if (LL_EXTI_IsActiveFlag_0_31(LL_EXTI_LINE_5) != RESET)
{
LL_EXTI_ClearFlag_0_31(LL_EXTI_LINE_5);
/* USER CODE BEGIN LL_EXTI_LINE_5 */
/* USER CODE END LL_EXTI_LINE_5 */
}
/* USER CODE BEGIN EXTI9_5_IRQn 1 */
/* USER CODE END EXTI9_5_IRQn 1 */
}
/** /**
* @brief This function handles USART1 global interrupt. * @brief This function handles USART1 global interrupt.
*/ */
@ -234,4 +254,3 @@ void DMA2_Stream7_IRQHandler(void)
/* USER CODE BEGIN 1 */ /* USER CODE BEGIN 1 */
/* USER CODE END 1 */ /* USER CODE END 1 */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -1,3 +1,4 @@
/* USER CODE BEGIN Header */
/** /**
****************************************************************************** ******************************************************************************
* @file usart.c * @file usart.c
@ -6,17 +7,16 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics. * Copyright (c) 2022 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under Ultimate Liberty license * This software is licensed under terms that can be found in the LICENSE file
* SLA0044, the "License"; You may not use this file except in compliance with * in the root directory of this software component.
* the License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* www.st.com/SLA0044
* *
****************************************************************************** ******************************************************************************
*/ */
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#include "usart.h" #include "usart.h"
@ -119,5 +119,3 @@ void MX_USART1_UART_Init(void)
/* USER CODE BEGIN 1 */ /* USER CODE BEGIN 1 */
/* USER CODE END 1 */ /* USER CODE END 1 */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -12,13 +12,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -13247,7 +13246,7 @@ typedef struct
/* Ethernet MMC Registers bits definition */ /* Ethernet MMC Registers bits definition */
/******************************************************************************/ /******************************************************************************/
/* Bit definition for Ethernet MMC Contol Register */ /* Bit definition for Ethernet MMC Control Register */
#define ETH_MMCCR_MCFHP_Pos (5U) #define ETH_MMCCR_MCFHP_Pos (5U)
#define ETH_MMCCR_MCFHP_Msk (0x1UL << ETH_MMCCR_MCFHP_Pos) /*!< 0x00000020 */ #define ETH_MMCCR_MCFHP_Msk (0x1UL << ETH_MMCCR_MCFHP_Pos) /*!< 0x00000020 */
#define ETH_MMCCR_MCFHP ETH_MMCCR_MCFHP_Msk /* MMC counter Full-Half preset */ #define ETH_MMCCR_MCFHP ETH_MMCCR_MCFHP_Msk /* MMC counter Full-Half preset */
@ -13331,7 +13330,7 @@ typedef struct
#define ETH_MMCRFCECR_RFCEC_Msk (0xFFFFFFFFUL << ETH_MMCRFCECR_RFCEC_Pos) /*!< 0xFFFFFFFF */ #define ETH_MMCRFCECR_RFCEC_Msk (0xFFFFFFFFUL << ETH_MMCRFCECR_RFCEC_Pos) /*!< 0xFFFFFFFF */
#define ETH_MMCRFCECR_RFCEC ETH_MMCRFCECR_RFCEC_Msk /* Number of frames received with CRC error. */ #define ETH_MMCRFCECR_RFCEC ETH_MMCRFCECR_RFCEC_Msk /* Number of frames received with CRC error. */
/* Bit definition for Ethernet MMC Received Frames with Alignement Error Counter Register */ /* Bit definition for Ethernet MMC Received Frames with Alignment Error Counter Register */
#define ETH_MMCRFAECR_RFAEC_Pos (0U) #define ETH_MMCRFAECR_RFAEC_Pos (0U)
#define ETH_MMCRFAECR_RFAEC_Msk (0xFFFFFFFFUL << ETH_MMCRFAECR_RFAEC_Pos) /*!< 0xFFFFFFFF */ #define ETH_MMCRFAECR_RFAEC_Msk (0xFFFFFFFFUL << ETH_MMCRFAECR_RFAEC_Pos) /*!< 0xFFFFFFFF */
#define ETH_MMCRFAECR_RFAEC ETH_MMCRFAECR_RFAEC_Msk /* Number of frames received with alignment (dribble) error */ #define ETH_MMCRFAECR_RFAEC ETH_MMCRFAECR_RFAEC_Msk /* Number of frames received with alignment (dribble) error */
@ -13345,34 +13344,37 @@ typedef struct
/* Ethernet PTP Registers bits definition */ /* Ethernet PTP Registers bits definition */
/******************************************************************************/ /******************************************************************************/
/* Bit definition for Ethernet PTP Time Stamp Contol Register */ /* Bit definition for Ethernet PTP Time Stamp Control Register */
#define ETH_PTPTSCR_TSPFFMAE_Pos (18U)
#define ETH_PTPTSCR_TSPFFMAE_Msk (0x1UL << ETH_PTPTSCR_TSPFFMAE_Pos) /*!< 0x00008000 */
#define ETH_PTPTSCR_TSPFFMAE ETH_PTPTSCR_TSPFFMAE_Msk /* Time stamp PTP frame filtering MAC address enable */
#define ETH_PTPTSCR_TSCNT_Pos (16U) #define ETH_PTPTSCR_TSCNT_Pos (16U)
#define ETH_PTPTSCR_TSCNT_Msk (0x3UL << ETH_PTPTSCR_TSCNT_Pos) /*!< 0x00030000 */ #define ETH_PTPTSCR_TSCNT_Msk (0x3UL << ETH_PTPTSCR_TSCNT_Pos) /*!< 0x00030000 */
#define ETH_PTPTSCR_TSCNT ETH_PTPTSCR_TSCNT_Msk /* Time stamp clock node type */ #define ETH_PTPTSCR_TSCNT ETH_PTPTSCR_TSCNT_Msk /* Time stamp clock node type */
#define ETH_PTPTSSR_TSSMRME_Pos (15U) #define ETH_PTPTSCR_TSSMRME_Pos (15U)
#define ETH_PTPTSSR_TSSMRME_Msk (0x1UL << ETH_PTPTSSR_TSSMRME_Pos) /*!< 0x00008000 */ #define ETH_PTPTSCR_TSSMRME_Msk (0x1UL << ETH_PTPTSCR_TSSMRME_Pos) /*!< 0x00008000 */
#define ETH_PTPTSSR_TSSMRME ETH_PTPTSSR_TSSMRME_Msk /* Time stamp snapshot for message relevant to master enable */ #define ETH_PTPTSCR_TSSMRME ETH_PTPTSCR_TSSMRME_Msk /* Time stamp snapshot for message relevant to master enable */
#define ETH_PTPTSSR_TSSEME_Pos (14U) #define ETH_PTPTSCR_TSSEME_Pos (14U)
#define ETH_PTPTSSR_TSSEME_Msk (0x1UL << ETH_PTPTSSR_TSSEME_Pos) /*!< 0x00004000 */ #define ETH_PTPTSCR_TSSEME_Msk (0x1UL << ETH_PTPTSCR_TSSEME_Pos) /*!< 0x00004000 */
#define ETH_PTPTSSR_TSSEME ETH_PTPTSSR_TSSEME_Msk /* Time stamp snapshot for event message enable */ #define ETH_PTPTSCR_TSSEME ETH_PTPTSCR_TSSEME_Msk /* Time stamp snapshot for event message enable */
#define ETH_PTPTSSR_TSSIPV4FE_Pos (13U) #define ETH_PTPTSCR_TSSIPV4FE_Pos (13U)
#define ETH_PTPTSSR_TSSIPV4FE_Msk (0x1UL << ETH_PTPTSSR_TSSIPV4FE_Pos) /*!< 0x00002000 */ #define ETH_PTPTSCR_TSSIPV4FE_Msk (0x1UL << ETH_PTPTSCR_TSSIPV4FE_Pos) /*!< 0x00002000 */
#define ETH_PTPTSSR_TSSIPV4FE ETH_PTPTSSR_TSSIPV4FE_Msk /* Time stamp snapshot for IPv4 frames enable */ #define ETH_PTPTSCR_TSSIPV4FE ETH_PTPTSCR_TSSIPV4FE_Msk /* Time stamp snapshot for IPv4 frames enable */
#define ETH_PTPTSSR_TSSIPV6FE_Pos (12U) #define ETH_PTPTSCR_TSSIPV6FE_Pos (12U)
#define ETH_PTPTSSR_TSSIPV6FE_Msk (0x1UL << ETH_PTPTSSR_TSSIPV6FE_Pos) /*!< 0x00001000 */ #define ETH_PTPTSCR_TSSIPV6FE_Msk (0x1UL << ETH_PTPTSCR_TSSIPV6FE_Pos) /*!< 0x00001000 */
#define ETH_PTPTSSR_TSSIPV6FE ETH_PTPTSSR_TSSIPV6FE_Msk /* Time stamp snapshot for IPv6 frames enable */ #define ETH_PTPTSCR_TSSIPV6FE ETH_PTPTSCR_TSSIPV6FE_Msk /* Time stamp snapshot for IPv6 frames enable */
#define ETH_PTPTSSR_TSSPTPOEFE_Pos (11U) #define ETH_PTPTSCR_TSSPTPOEFE_Pos (11U)
#define ETH_PTPTSSR_TSSPTPOEFE_Msk (0x1UL << ETH_PTPTSSR_TSSPTPOEFE_Pos) /*!< 0x00000800 */ #define ETH_PTPTSCR_TSSPTPOEFE_Msk (0x1UL << ETH_PTPTSCR_TSSPTPOEFE_Pos) /*!< 0x00000800 */
#define ETH_PTPTSSR_TSSPTPOEFE ETH_PTPTSSR_TSSPTPOEFE_Msk /* Time stamp snapshot for PTP over ethernet frames enable */ #define ETH_PTPTSCR_TSSPTPOEFE ETH_PTPTSCR_TSSPTPOEFE_Msk /* Time stamp snapshot for PTP over ethernet frames enable */
#define ETH_PTPTSSR_TSPTPPSV2E_Pos (10U) #define ETH_PTPTSCR_TSPTPPSV2E_Pos (10U)
#define ETH_PTPTSSR_TSPTPPSV2E_Msk (0x1UL << ETH_PTPTSSR_TSPTPPSV2E_Pos) /*!< 0x00000400 */ #define ETH_PTPTSCR_TSPTPPSV2E_Msk (0x1UL << ETH_PTPTSCR_TSPTPPSV2E_Pos) /*!< 0x00000400 */
#define ETH_PTPTSSR_TSPTPPSV2E ETH_PTPTSSR_TSPTPPSV2E_Msk /* Time stamp PTP packet snooping for version2 format enable */ #define ETH_PTPTSCR_TSPTPPSV2E ETH_PTPTSCR_TSPTPPSV2E_Msk /* Time stamp PTP packet snooping for version2 format enable */
#define ETH_PTPTSSR_TSSSR_Pos (9U) #define ETH_PTPTSCR_TSSSR_Pos (9U)
#define ETH_PTPTSSR_TSSSR_Msk (0x1UL << ETH_PTPTSSR_TSSSR_Pos) /*!< 0x00000200 */ #define ETH_PTPTSCR_TSSSR_Msk (0x1UL << ETH_PTPTSCR_TSSSR_Pos) /*!< 0x00000200 */
#define ETH_PTPTSSR_TSSSR ETH_PTPTSSR_TSSSR_Msk /* Time stamp Sub-seconds rollover */ #define ETH_PTPTSCR_TSSSR ETH_PTPTSCR_TSSSR_Msk /* Time stamp Sub-seconds rollover */
#define ETH_PTPTSSR_TSSARFE_Pos (8U) #define ETH_PTPTSCR_TSSARFE_Pos (8U)
#define ETH_PTPTSSR_TSSARFE_Msk (0x1UL << ETH_PTPTSSR_TSSARFE_Pos) /*!< 0x00000100 */ #define ETH_PTPTSCR_TSSARFE_Msk (0x1UL << ETH_PTPTSCR_TSSARFE_Pos) /*!< 0x00000100 */
#define ETH_PTPTSSR_TSSARFE ETH_PTPTSSR_TSSARFE_Msk /* Time stamp snapshot for all received frames enable */ #define ETH_PTPTSCR_TSSARFE ETH_PTPTSCR_TSSARFE_Msk /* Time stamp snapshot for all received frames enable */
#define ETH_PTPTSCR_TSARU_Pos (5U) #define ETH_PTPTSCR_TSARU_Pos (5U)
#define ETH_PTPTSCR_TSARU_Msk (0x1UL << ETH_PTPTSCR_TSARU_Pos) /*!< 0x00000020 */ #define ETH_PTPTSCR_TSARU_Msk (0x1UL << ETH_PTPTSCR_TSARU_Pos) /*!< 0x00000020 */
@ -13452,6 +13454,9 @@ typedef struct
/******************************************************************************/ /******************************************************************************/
/* Bit definition for Ethernet DMA Bus Mode Register */ /* Bit definition for Ethernet DMA Bus Mode Register */
#define ETH_DMABMR_MB_Pos (26U)
#define ETH_DMABMR_MB_Msk (0x1UL << ETH_DMABMR_MB_Pos) /*!< 0x04000000 */
#define ETH_DMABMR_MB ETH_DMABMR_MB_Msk /* Mixed Burst */
#define ETH_DMABMR_AAB_Pos (25U) #define ETH_DMABMR_AAB_Pos (25U)
#define ETH_DMABMR_AAB_Msk (0x1UL << ETH_DMABMR_AAB_Pos) /*!< 0x02000000 */ #define ETH_DMABMR_AAB_Msk (0x1UL << ETH_DMABMR_AAB_Pos) /*!< 0x02000000 */
#define ETH_DMABMR_AAB ETH_DMABMR_AAB_Msk /* Address-Aligned beats */ #define ETH_DMABMR_AAB ETH_DMABMR_AAB_Msk /* Address-Aligned beats */
@ -15295,7 +15300,7 @@ typedef struct
#define IS_TIM_32B_COUNTER_INSTANCE(INSTANCE)(((INSTANCE) == TIM2) || \ #define IS_TIM_32B_COUNTER_INSTANCE(INSTANCE)(((INSTANCE) == TIM2) || \
((INSTANCE) == TIM5)) ((INSTANCE) == TIM5))
/***************** TIM Instances : external trigger input availabe ************/ /***************** TIM Instances : external trigger input available ************/
#define IS_TIM_ETR_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \ #define IS_TIM_ETR_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
((INSTANCE) == TIM2) || \ ((INSTANCE) == TIM2) || \
((INSTANCE) == TIM3) || \ ((INSTANCE) == TIM3) || \
@ -15600,7 +15605,3 @@ typedef struct
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __STM32F407xx_H */ #endif /* __STM32F407xx_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -8,21 +8,20 @@
* is using in the C source code, usually in main.c. This file contains: * is using in the C source code, usually in main.c. This file contains:
* - Configuration section that allows to select: * - Configuration section that allows to select:
* - The STM32F4xx device used in the target application * - The STM32F4xx device used in the target application
* - To use or not the peripherals drivers in application code(i.e. * - To use or not the peripheral's drivers in application code(i.e.
* code will be based on direct access to peripherals registers * code will be based on direct access to peripheral's registers
* rather than drivers API), this option is controlled by * rather than drivers API), this option is controlled by
* "#define USE_HAL_DRIVER" * "#define USE_HAL_DRIVER"
* *
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -106,11 +105,11 @@
#endif /* USE_HAL_DRIVER */ #endif /* USE_HAL_DRIVER */
/** /**
* @brief CMSIS version number V2.6.7 * @brief CMSIS version number V2.6.8
*/ */
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */ #define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x06U) /*!< [23:16] sub1 version */ #define __STM32F4xx_CMSIS_VERSION_SUB1 (0x06U) /*!< [23:16] sub1 version */
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x07U) /*!< [15:8] sub2 version */ #define __STM32F4xx_CMSIS_VERSION_SUB2 (0x08U) /*!< [15:8] sub2 version */
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */ #define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\ #define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\ |(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
@ -300,8 +299,3 @@ typedef enum
/** /**
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,29 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2> * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * This software is licensed under terms that can be found in the LICENSE file
* are permitted provided that the following conditions are met: * in the root directory of this software component.
* 1. Redistributions of source code must retain the above copyright notice, * If no LICENSE file comes with this software, it is provided AS-IS.
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************** ******************************************************************************
*/ */
@ -119,4 +102,3 @@ extern void SystemCoreClockUpdate(void);
/** /**
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -0,0 +1,6 @@
This software component is provided to you as part of a software package and
applicable license terms are in the Package_license file. If you received this
software component outside of a package or without applicable license terms,
the terms of the Apache-2.0 license shall apply.
You may obtain a copy of the Apache-2.0 at:
https://opensource.org/licenses/Apache-2.0

201
Drivers/CMSIS/LICENSE.txt Normal file
View file

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View file

@ -7,13 +7,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics. * Copyright (c) 2021 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -38,14 +37,16 @@ extern "C" {
#define AES_CLEARFLAG_CCF CRYP_CLEARFLAG_CCF #define AES_CLEARFLAG_CCF CRYP_CLEARFLAG_CCF
#define AES_CLEARFLAG_RDERR CRYP_CLEARFLAG_RDERR #define AES_CLEARFLAG_RDERR CRYP_CLEARFLAG_RDERR
#define AES_CLEARFLAG_WRERR CRYP_CLEARFLAG_WRERR #define AES_CLEARFLAG_WRERR CRYP_CLEARFLAG_WRERR
#if defined(STM32U5) #if defined(STM32U5) || defined(STM32H7) || defined(STM32MP1)
#define CRYP_DATATYPE_32B CRYP_NO_SWAP #define CRYP_DATATYPE_32B CRYP_NO_SWAP
#define CRYP_DATATYPE_16B CRYP_HALFWORD_SWAP #define CRYP_DATATYPE_16B CRYP_HALFWORD_SWAP
#define CRYP_DATATYPE_8B CRYP_BYTE_SWAP #define CRYP_DATATYPE_8B CRYP_BYTE_SWAP
#define CRYP_DATATYPE_1B CRYP_BIT_SWAP #define CRYP_DATATYPE_1B CRYP_BIT_SWAP
#if defined(STM32U5)
#define CRYP_CCF_CLEAR CRYP_CLEAR_CCF #define CRYP_CCF_CLEAR CRYP_CLEAR_CCF
#define CRYP_ERR_CLEAR CRYP_CLEAR_RWEIF #define CRYP_ERR_CLEAR CRYP_CLEAR_RWEIF
#endif /* STM32U5 */ #endif /* STM32U5 */
#endif /* STM32U5 || STM32H7 || STM32MP1 */
/** /**
* @} * @}
*/ */
@ -105,6 +106,13 @@ extern "C" {
#if defined(STM32H7) #if defined(STM32H7)
#define ADC_CHANNEL_VBAT_DIV4 ADC_CHANNEL_VBAT #define ADC_CHANNEL_VBAT_DIV4 ADC_CHANNEL_VBAT
#endif /* STM32H7 */ #endif /* STM32H7 */
#if defined(STM32U5)
#define ADC_SAMPLETIME_5CYCLE ADC_SAMPLETIME_5CYCLES
#define ADC_SAMPLETIME_391CYCLES_5 ADC_SAMPLETIME_391CYCLES
#define ADC4_SAMPLETIME_160CYCLES_5 ADC4_SAMPLETIME_814CYCLES_5
#endif /* STM32U5 */
/** /**
* @} * @}
*/ */
@ -214,10 +222,23 @@ extern "C" {
* @{ * @{
*/ */
#define __HAL_CORTEX_SYSTICKCLK_CONFIG HAL_SYSTICK_CLKSourceConfig #define __HAL_CORTEX_SYSTICKCLK_CONFIG HAL_SYSTICK_CLKSourceConfig
#if defined(STM32U5)
#define MPU_DEVICE_nGnRnE MPU_DEVICE_NGNRNE
#define MPU_DEVICE_nGnRE MPU_DEVICE_NGNRE
#define MPU_DEVICE_nGRE MPU_DEVICE_NGRE
#endif /* STM32U5 */
/** /**
* @} * @}
*/ */
/** @defgroup CRC_Aliases CRC API aliases
* @{
*/
#if defined(STM32C0)
#else
#define HAL_CRC_Input_Data_Reverse HAL_CRCEx_Input_Data_Reverse /*!< Aliased to HAL_CRCEx_Input_Data_Reverse for inter STM32 series compatibility */
#define HAL_CRC_Output_Data_Reverse HAL_CRCEx_Output_Data_Reverse /*!< Aliased to HAL_CRCEx_Output_Data_Reverse for inter STM32 series compatibility */
#endif
/** /**
* @} * @}
*/ */
@ -252,6 +273,13 @@ extern "C" {
#define DAC_CHIPCONNECT_ENABLE DAC_CHIPCONNECT_INTERNAL #define DAC_CHIPCONNECT_ENABLE DAC_CHIPCONNECT_INTERNAL
#endif #endif
#if defined(STM32U5)
#define DAC_TRIGGER_STOP_LPTIM1_OUT DAC_TRIGGER_STOP_LPTIM1_CH1
#define DAC_TRIGGER_STOP_LPTIM3_OUT DAC_TRIGGER_STOP_LPTIM3_CH1
#define DAC_TRIGGER_LPTIM1_OUT DAC_TRIGGER_LPTIM1_CH1
#define DAC_TRIGGER_LPTIM3_OUT DAC_TRIGGER_LPTIM3_CH1
#endif
#if defined(STM32L1) || defined(STM32L4) || defined(STM32G0) || defined(STM32L5) || defined(STM32H7) || defined(STM32F4) || defined(STM32G4) #if defined(STM32L1) || defined(STM32L4) || defined(STM32G0) || defined(STM32L5) || defined(STM32H7) || defined(STM32F4) || defined(STM32G4)
#define HAL_DAC_MSP_INIT_CB_ID HAL_DAC_MSPINIT_CB_ID #define HAL_DAC_MSP_INIT_CB_ID HAL_DAC_MSPINIT_CB_ID
#define HAL_DAC_MSP_DEINIT_CB_ID HAL_DAC_MSPDEINIT_CB_ID #define HAL_DAC_MSP_DEINIT_CB_ID HAL_DAC_MSPDEINIT_CB_ID
@ -394,6 +422,10 @@ extern "C" {
#define DAC_TRIGGER_LP2_OUT DAC_TRIGGER_LPTIM2_OUT #define DAC_TRIGGER_LP2_OUT DAC_TRIGGER_LPTIM2_OUT
#endif /* STM32H7 */ #endif /* STM32H7 */
#if defined(STM32U5)
#define GPDMA1_REQUEST_DCMI GPDMA1_REQUEST_DCMI_PSSI
#endif /* STM32U5 */
/** /**
* @} * @}
*/ */
@ -473,7 +505,7 @@ extern "C" {
#define OB_RDP_LEVEL0 OB_RDP_LEVEL_0 #define OB_RDP_LEVEL0 OB_RDP_LEVEL_0
#define OB_RDP_LEVEL1 OB_RDP_LEVEL_1 #define OB_RDP_LEVEL1 OB_RDP_LEVEL_1
#define OB_RDP_LEVEL2 OB_RDP_LEVEL_2 #define OB_RDP_LEVEL2 OB_RDP_LEVEL_2
#if defined(STM32G0) #if defined(STM32G0) || defined(STM32C0)
#define OB_BOOT_LOCK_DISABLE OB_BOOT_ENTRY_FORCED_NONE #define OB_BOOT_LOCK_DISABLE OB_BOOT_ENTRY_FORCED_NONE
#define OB_BOOT_LOCK_ENABLE OB_BOOT_ENTRY_FORCED_FLASH #define OB_BOOT_LOCK_ENABLE OB_BOOT_ENTRY_FORCED_FLASH
#else #else
@ -637,6 +669,24 @@ extern "C" {
#endif /* STM32F0 || STM32F3 || STM32F1 */ #endif /* STM32F0 || STM32F3 || STM32F1 */
#define GPIO_AF6_DFSDM GPIO_AF6_DFSDM1 #define GPIO_AF6_DFSDM GPIO_AF6_DFSDM1
#if defined(STM32U5)
#define GPIO_AF0_RTC_50Hz GPIO_AF0_RTC_50HZ
#endif /* STM32U5 */
#if defined(STM32U5)
#define GPIO_AF0_S2DSTOP GPIO_AF0_SRDSTOP
#define GPIO_AF11_LPGPIO GPIO_AF11_LPGPIO1
#endif /* STM32U5 */
/**
* @}
*/
/** @defgroup HAL_GTZC_Aliased_Defines HAL GTZC Aliased Defines maintained for legacy purpose
* @{
*/
#if defined(STM32U5)
#define GTZC_PERIPH_DCMI GTZC_PERIPH_DCMI_PSSI
#endif /* STM32U5 */
/** /**
* @} * @}
*/ */
@ -874,9 +924,19 @@ extern "C" {
#define LPTIM_TRIGSAMPLETIME_4TRANSITION LPTIM_TRIGSAMPLETIME_4TRANSITIONS #define LPTIM_TRIGSAMPLETIME_4TRANSITION LPTIM_TRIGSAMPLETIME_4TRANSITIONS
#define LPTIM_TRIGSAMPLETIME_8TRANSITION LPTIM_TRIGSAMPLETIME_8TRANSITIONS #define LPTIM_TRIGSAMPLETIME_8TRANSITION LPTIM_TRIGSAMPLETIME_8TRANSITIONS
/** @defgroup HAL_LPTIM_Aliased_Defines HAL LPTIM Aliased Defines maintained for legacy purpose
* @{
*/
#define HAL_LPTIM_ReadCompare HAL_LPTIM_ReadCapturedValue
/**
* @}
*/
#if defined(STM32U5) #if defined(STM32U5)
#define LPTIM_ISR_CC1 LPTIM_ISR_CC1IF #define LPTIM_ISR_CC1 LPTIM_ISR_CC1IF
#define LPTIM_ISR_CC2 LPTIM_ISR_CC2IF #define LPTIM_ISR_CC2 LPTIM_ISR_CC2IF
#define LPTIM_CHANNEL_ALL 0x00000000U
#endif /* STM32U5 */ #endif /* STM32U5 */
/** /**
* @} * @}
@ -1041,15 +1101,22 @@ extern "C" {
#define RTC_TAMPERPIN_PA0 RTC_TAMPERPIN_POS1 #define RTC_TAMPERPIN_PA0 RTC_TAMPERPIN_POS1
#define RTC_TAMPERPIN_PI8 RTC_TAMPERPIN_POS1 #define RTC_TAMPERPIN_PI8 RTC_TAMPERPIN_POS1
#if defined(STM32F7)
#define RTC_TAMPCR_TAMPXE RTC_TAMPER_ENABLE_BITS_MASK
#define RTC_TAMPCR_TAMPXIE RTC_TAMPER_IT_ENABLE_BITS_MASK
#endif /* STM32F7 */
#if defined(STM32H7) #if defined(STM32H7)
#define RTC_TAMPCR_TAMPXE RTC_TAMPER_X #define RTC_TAMPCR_TAMPXE RTC_TAMPER_X
#define RTC_TAMPCR_TAMPXIE RTC_TAMPER_X_INTERRUPT #define RTC_TAMPCR_TAMPXIE RTC_TAMPER_X_INTERRUPT
#endif /* STM32H7 */
#if defined(STM32F7) || defined(STM32H7)
#define RTC_TAMPER1_INTERRUPT RTC_IT_TAMP1 #define RTC_TAMPER1_INTERRUPT RTC_IT_TAMP1
#define RTC_TAMPER2_INTERRUPT RTC_IT_TAMP2 #define RTC_TAMPER2_INTERRUPT RTC_IT_TAMP2
#define RTC_TAMPER3_INTERRUPT RTC_IT_TAMP3 #define RTC_TAMPER3_INTERRUPT RTC_IT_TAMP3
#define RTC_ALL_TAMPER_INTERRUPT RTC_IT_TAMPALL #define RTC_ALL_TAMPER_INTERRUPT RTC_IT_TAMP
#endif /* STM32H7 */ #endif /* STM32F7 || STM32H7 */
/** /**
* @} * @}
@ -1216,6 +1283,10 @@ extern "C" {
#define TIM_TIM3_TI1_COMP1COMP2_OUT TIM_TIM3_TI1_COMP1_COMP2 #define TIM_TIM3_TI1_COMP1COMP2_OUT TIM_TIM3_TI1_COMP1_COMP2
#endif #endif
#if defined(STM32U5) || defined(STM32MP2)
#define OCREF_CLEAR_SELECT_Pos OCREF_CLEAR_SELECT_POS
#define OCREF_CLEAR_SELECT_Msk OCREF_CLEAR_SELECT_MSK
#endif
/** /**
* @} * @}
*/ */
@ -1646,6 +1717,79 @@ extern "C" {
#define PWR_MODE_EVT PWR_PVD_MODE_NORMAL #define PWR_MODE_EVT PWR_PVD_MODE_NORMAL
#if defined (STM32U5)
#define PWR_SRAM1_PAGE1_STOP_RETENTION PWR_SRAM1_PAGE1_STOP
#define PWR_SRAM1_PAGE2_STOP_RETENTION PWR_SRAM1_PAGE2_STOP
#define PWR_SRAM1_PAGE3_STOP_RETENTION PWR_SRAM1_PAGE3_STOP
#define PWR_SRAM1_PAGE4_STOP_RETENTION PWR_SRAM1_PAGE4_STOP
#define PWR_SRAM1_PAGE5_STOP_RETENTION PWR_SRAM1_PAGE5_STOP
#define PWR_SRAM1_PAGE6_STOP_RETENTION PWR_SRAM1_PAGE6_STOP
#define PWR_SRAM1_PAGE7_STOP_RETENTION PWR_SRAM1_PAGE7_STOP
#define PWR_SRAM1_PAGE8_STOP_RETENTION PWR_SRAM1_PAGE8_STOP
#define PWR_SRAM1_PAGE9_STOP_RETENTION PWR_SRAM1_PAGE9_STOP
#define PWR_SRAM1_PAGE10_STOP_RETENTION PWR_SRAM1_PAGE10_STOP
#define PWR_SRAM1_PAGE11_STOP_RETENTION PWR_SRAM1_PAGE11_STOP
#define PWR_SRAM1_PAGE12_STOP_RETENTION PWR_SRAM1_PAGE12_STOP
#define PWR_SRAM1_FULL_STOP_RETENTION PWR_SRAM1_FULL_STOP
#define PWR_SRAM2_PAGE1_STOP_RETENTION PWR_SRAM2_PAGE1_STOP
#define PWR_SRAM2_PAGE2_STOP_RETENTION PWR_SRAM2_PAGE2_STOP
#define PWR_SRAM2_FULL_STOP_RETENTION PWR_SRAM2_FULL_STOP
#define PWR_SRAM3_PAGE1_STOP_RETENTION PWR_SRAM3_PAGE1_STOP
#define PWR_SRAM3_PAGE2_STOP_RETENTION PWR_SRAM3_PAGE2_STOP
#define PWR_SRAM3_PAGE3_STOP_RETENTION PWR_SRAM3_PAGE3_STOP
#define PWR_SRAM3_PAGE4_STOP_RETENTION PWR_SRAM3_PAGE4_STOP
#define PWR_SRAM3_PAGE5_STOP_RETENTION PWR_SRAM3_PAGE5_STOP
#define PWR_SRAM3_PAGE6_STOP_RETENTION PWR_SRAM3_PAGE6_STOP
#define PWR_SRAM3_PAGE7_STOP_RETENTION PWR_SRAM3_PAGE7_STOP
#define PWR_SRAM3_PAGE8_STOP_RETENTION PWR_SRAM3_PAGE8_STOP
#define PWR_SRAM3_PAGE9_STOP_RETENTION PWR_SRAM3_PAGE9_STOP
#define PWR_SRAM3_PAGE10_STOP_RETENTION PWR_SRAM3_PAGE10_STOP
#define PWR_SRAM3_PAGE11_STOP_RETENTION PWR_SRAM3_PAGE11_STOP
#define PWR_SRAM3_PAGE12_STOP_RETENTION PWR_SRAM3_PAGE12_STOP
#define PWR_SRAM3_PAGE13_STOP_RETENTION PWR_SRAM3_PAGE13_STOP
#define PWR_SRAM3_FULL_STOP_RETENTION PWR_SRAM3_FULL_STOP
#define PWR_SRAM4_FULL_STOP_RETENTION PWR_SRAM4_FULL_STOP
#define PWR_SRAM5_PAGE1_STOP_RETENTION PWR_SRAM5_PAGE1_STOP
#define PWR_SRAM5_PAGE2_STOP_RETENTION PWR_SRAM5_PAGE2_STOP
#define PWR_SRAM5_PAGE3_STOP_RETENTION PWR_SRAM5_PAGE3_STOP
#define PWR_SRAM5_PAGE4_STOP_RETENTION PWR_SRAM5_PAGE4_STOP
#define PWR_SRAM5_PAGE5_STOP_RETENTION PWR_SRAM5_PAGE5_STOP
#define PWR_SRAM5_PAGE6_STOP_RETENTION PWR_SRAM5_PAGE6_STOP
#define PWR_SRAM5_PAGE7_STOP_RETENTION PWR_SRAM5_PAGE7_STOP
#define PWR_SRAM5_PAGE8_STOP_RETENTION PWR_SRAM5_PAGE8_STOP
#define PWR_SRAM5_PAGE9_STOP_RETENTION PWR_SRAM5_PAGE9_STOP
#define PWR_SRAM5_PAGE10_STOP_RETENTION PWR_SRAM5_PAGE10_STOP
#define PWR_SRAM5_PAGE11_STOP_RETENTION PWR_SRAM5_PAGE11_STOP
#define PWR_SRAM5_PAGE12_STOP_RETENTION PWR_SRAM5_PAGE12_STOP
#define PWR_SRAM5_PAGE13_STOP_RETENTION PWR_SRAM5_PAGE13_STOP
#define PWR_SRAM5_FULL_STOP_RETENTION PWR_SRAM5_FULL_STOP
#define PWR_ICACHE_FULL_STOP_RETENTION PWR_ICACHE_FULL_STOP
#define PWR_DCACHE1_FULL_STOP_RETENTION PWR_DCACHE1_FULL_STOP
#define PWR_DCACHE2_FULL_STOP_RETENTION PWR_DCACHE2_FULL_STOP
#define PWR_DMA2DRAM_FULL_STOP_RETENTION PWR_DMA2DRAM_FULL_STOP
#define PWR_PERIPHRAM_FULL_STOP_RETENTION PWR_PERIPHRAM_FULL_STOP
#define PWR_PKA32RAM_FULL_STOP_RETENTION PWR_PKA32RAM_FULL_STOP
#define PWR_GRAPHICPRAM_FULL_STOP_RETENTION PWR_GRAPHICPRAM_FULL_STOP
#define PWR_DSIRAM_FULL_STOP_RETENTION PWR_DSIRAM_FULL_STOP
#define PWR_SRAM2_PAGE1_STANDBY_RETENTION PWR_SRAM2_PAGE1_STANDBY
#define PWR_SRAM2_PAGE2_STANDBY_RETENTION PWR_SRAM2_PAGE2_STANDBY
#define PWR_SRAM2_FULL_STANDBY_RETENTION PWR_SRAM2_FULL_STANDBY
#define PWR_SRAM1_FULL_RUN_RETENTION PWR_SRAM1_FULL_RUN
#define PWR_SRAM2_FULL_RUN_RETENTION PWR_SRAM2_FULL_RUN
#define PWR_SRAM3_FULL_RUN_RETENTION PWR_SRAM3_FULL_RUN
#define PWR_SRAM4_FULL_RUN_RETENTION PWR_SRAM4_FULL_RUN
#define PWR_SRAM5_FULL_RUN_RETENTION PWR_SRAM5_FULL_RUN
#define PWR_ALL_RAM_RUN_RETENTION_MASK PWR_ALL_RAM_RUN_MASK
#endif
/** /**
* @} * @}
*/ */
@ -3279,7 +3423,7 @@ extern "C" {
#define RCC_MCOSOURCE_PLLCLK_NODIV RCC_MCO1SOURCE_PLLCLK #define RCC_MCOSOURCE_PLLCLK_NODIV RCC_MCO1SOURCE_PLLCLK
#define RCC_MCOSOURCE_PLLCLK_DIV2 RCC_MCO1SOURCE_PLLCLK_DIV2 #define RCC_MCOSOURCE_PLLCLK_DIV2 RCC_MCO1SOURCE_PLLCLK_DIV2
#if defined(STM32L4) || defined(STM32WB) || defined(STM32G0) || defined(STM32G4) || defined(STM32L5) || defined(STM32WL) #if defined(STM32L4) || defined(STM32WB) || defined(STM32G0) || defined(STM32G4) || defined(STM32L5) || defined(STM32WL) || defined(STM32C0)
#define RCC_RTCCLKSOURCE_NO_CLK RCC_RTCCLKSOURCE_NONE #define RCC_RTCCLKSOURCE_NO_CLK RCC_RTCCLKSOURCE_NONE
#else #else
#define RCC_RTCCLKSOURCE_NONE RCC_RTCCLKSOURCE_NO_CLK #define RCC_RTCCLKSOURCE_NONE RCC_RTCCLKSOURCE_NO_CLK
@ -3404,7 +3548,26 @@ extern "C" {
#define __HAL_RCC_APB2_CLK_Disable_Clear __HAL_RCC_APB2_CLK_ENABLE #define __HAL_RCC_APB2_CLK_Disable_Clear __HAL_RCC_APB2_CLK_ENABLE
#define __HAL_RCC_APB3_CLK_Disable_Clear __HAL_RCC_APB3_CLK_ENABLE #define __HAL_RCC_APB3_CLK_Disable_Clear __HAL_RCC_APB3_CLK_ENABLE
#define IS_RCC_MSIPLLModeSelection IS_RCC_MSIPLLMODE_SELECT #define IS_RCC_MSIPLLModeSelection IS_RCC_MSIPLLMODE_SELECT
#endif #define RCC_PERIPHCLK_CLK48 RCC_PERIPHCLK_ICLK
#define RCC_CLK48CLKSOURCE_HSI48 RCC_ICLK_CLKSOURCE_HSI48
#define RCC_CLK48CLKSOURCE_PLL2 RCC_ICLK_CLKSOURCE_PLL2
#define RCC_CLK48CLKSOURCE_PLL1 RCC_ICLK_CLKSOURCE_PLL1
#define RCC_CLK48CLKSOURCE_MSIK RCC_ICLK_CLKSOURCE_MSIK
#define __HAL_RCC_ADC1_CLK_ENABLE __HAL_RCC_ADC12_CLK_ENABLE
#define __HAL_RCC_ADC1_CLK_DISABLE __HAL_RCC_ADC12_CLK_DISABLE
#define __HAL_RCC_ADC1_IS_CLK_ENABLED __HAL_RCC_ADC12_IS_CLK_ENABLED
#define __HAL_RCC_ADC1_IS_CLK_DISABLED __HAL_RCC_ADC12_IS_CLK_DISABLED
#define __HAL_RCC_ADC1_FORCE_RESET __HAL_RCC_ADC12_FORCE_RESET
#define __HAL_RCC_ADC1_RELEASE_RESET __HAL_RCC_ADC12_RELEASE_RESET
#define __HAL_RCC_ADC1_CLK_SLEEP_ENABLE __HAL_RCC_ADC12_CLK_SLEEP_ENABLE
#define __HAL_RCC_ADC1_CLK_SLEEP_DISABLE __HAL_RCC_ADC12_CLK_SLEEP_DISABLE
#define __HAL_RCC_GET_CLK48_SOURCE __HAL_RCC_GET_ICLK_SOURCE
#define __HAL_RCC_PLLFRACN_ENABLE __HAL_RCC_PLL_FRACN_ENABLE
#define __HAL_RCC_PLLFRACN_DISABLE __HAL_RCC_PLL_FRACN_DISABLE
#define __HAL_RCC_PLLFRACN_CONFIG __HAL_RCC_PLL_FRACN_CONFIG
#define IS_RCC_PLLFRACN_VALUE IS_RCC_PLL_FRACN_VALUE
#endif /* STM32U5 */
/** /**
* @} * @}
*/ */
@ -3421,7 +3584,9 @@ extern "C" {
/** @defgroup HAL_RTC_Aliased_Macros HAL RTC Aliased Macros maintained for legacy purpose /** @defgroup HAL_RTC_Aliased_Macros HAL RTC Aliased Macros maintained for legacy purpose
* @{ * @{
*/ */
#if defined (STM32G0) || defined (STM32L5) || defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32L4P5xx) || defined (STM32L4Q5xx) || defined (STM32G4) || defined (STM32WL) || defined (STM32U5) #if defined (STM32G0) || defined (STM32L5) || defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32L4P5xx)|| \
defined (STM32L4Q5xx) || defined (STM32G4) || defined (STM32WL) || defined (STM32U5) || \
defined (STM32C0)
#else #else
#define __HAL_RTC_CLEAR_FLAG __HAL_RTC_EXTI_CLEAR_FLAG #define __HAL_RTC_CLEAR_FLAG __HAL_RTC_EXTI_CLEAR_FLAG
#endif #endif
@ -3485,7 +3650,7 @@ extern "C" {
#define SD_OCR_CID_CSD_OVERWRIETE SD_OCR_CID_CSD_OVERWRITE #define SD_OCR_CID_CSD_OVERWRIETE SD_OCR_CID_CSD_OVERWRITE
#define SD_CMD_SD_APP_STAUS SD_CMD_SD_APP_STATUS #define SD_CMD_SD_APP_STAUS SD_CMD_SD_APP_STATUS
#if !defined(STM32F1) && !defined(STM32F2) && !defined(STM32F4) && !defined(STM32F7) && !defined(STM32L1) #if !defined(STM32F1) && !defined(STM32F2) && !defined(STM32F4) && !defined(STM32L1)
#define eMMC_HIGH_VOLTAGE_RANGE EMMC_HIGH_VOLTAGE_RANGE #define eMMC_HIGH_VOLTAGE_RANGE EMMC_HIGH_VOLTAGE_RANGE
#define eMMC_DUAL_VOLTAGE_RANGE EMMC_DUAL_VOLTAGE_RANGE #define eMMC_DUAL_VOLTAGE_RANGE EMMC_DUAL_VOLTAGE_RANGE
#define eMMC_LOW_VOLTAGE_RANGE EMMC_LOW_VOLTAGE_RANGE #define eMMC_LOW_VOLTAGE_RANGE EMMC_LOW_VOLTAGE_RANGE
@ -3822,6 +3987,16 @@ extern "C" {
* @} * @}
*/ */
/** @defgroup HAL_Generic_Aliased_Macros HAL Generic Aliased Macros maintained for legacy purpose
* @{
*/
#if defined (STM32F7)
#define ART_ACCLERATOR_ENABLE ART_ACCELERATOR_ENABLE
#endif /* STM32F7 */
/**
* @}
*/
/** @defgroup HAL_PPP_Aliased_Macros HAL PPP Aliased Macros maintained for legacy purpose /** @defgroup HAL_PPP_Aliased_Macros HAL PPP Aliased Macros maintained for legacy purpose
* @{ * @{
*/ */
@ -3836,5 +4011,4 @@ extern "C" {
#endif /* STM32_HAL_LEGACY */ #endif /* STM32_HAL_LEGACY */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -7,13 +7,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -295,4 +294,4 @@ void HAL_DisableMemorySwappingBank(void);
#endif /* __STM32F4xx_HAL_H */ #endif /* __STM32F4xx_HAL_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,14 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -407,4 +405,3 @@ void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init);
#endif /* __STM32F4xx_HAL_CORTEX_H */ #endif /* __STM32F4xx_HAL_CORTEX_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -7,13 +7,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -208,4 +207,4 @@ typedef enum
#endif /* ___STM32F4xx_HAL_DEF */ #endif /* ___STM32F4xx_HAL_DEF */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file in
* the "License"; You may not use this file except in compliance with the * the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -801,4 +800,3 @@ uint32_t HAL_DMA_GetError(DMA_HandleTypeDef *hdma);
#endif /* __STM32F4xx_HAL_DMA_H */ #endif /* __STM32F4xx_HAL_DMA_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file in
* the "License"; You may not use this file except in compliance with the * the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -101,4 +100,3 @@ HAL_StatusTypeDef HAL_DMAEx_ChangeMemory(DMA_HandleTypeDef *hdma, uint32_t Addre
#endif /*__STM32F4xx_HAL_DMA_EX_H*/ #endif /*__STM32F4xx_HAL_DMA_EX_H*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2018 STMicroelectronics. * Copyright (c) 2018 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.Clause
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -365,4 +364,3 @@ void HAL_EXTI_GenerateSWI(EXTI_HandleTypeDef *hexti);
#endif /* STM32f4xx_HAL_EXTI_H */ #endif /* STM32f4xx_HAL_EXTI_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,14 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -425,4 +423,3 @@ HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout);
#endif /* __STM32F4xx_HAL_FLASH_H */ #endif /* __STM32F4xx_HAL_FLASH_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,14 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -1063,4 +1061,3 @@ void FLASH_FlushCaches(void);
#endif /* __STM32F4xx_HAL_FLASH_EX_H */ #endif /* __STM32F4xx_HAL_FLASH_EX_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,14 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -76,4 +74,3 @@ __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableFlashSleepMode(void);
#endif /* __STM32F4xx_FLASH_RAMFUNC_H */ #endif /* __STM32F4xx_FLASH_RAMFUNC_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -324,4 +323,3 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin);
#endif /* __STM32F4xx_HAL_GPIO_H */ #endif /* __STM32F4xx_HAL_GPIO_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -1589,4 +1588,3 @@
#endif /* __STM32F4xx_HAL_GPIO_EX_H */ #endif /* __STM32F4xx_HAL_GPIO_EX_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,14 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -427,5 +425,3 @@ void HAL_PWR_DisableSEVOnPend(void);
#endif /* __STM32F4xx_HAL_PWR_H */ #endif /* __STM32F4xx_HAL_PWR_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,14 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -340,5 +338,3 @@ HAL_StatusTypeDef HAL_PWREx_EnterUnderDriveSTOPMode(uint32_t Regulator, uint8_t
#endif /* __STM32F4xx_HAL_PWR_EX_H */ #endif /* __STM32F4xx_HAL_PWR_EX_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,14 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -1459,4 +1457,3 @@ void HAL_RCC_CSSCallback(void);
#endif /* __STM32F4xx_HAL_RCC_H */ #endif /* __STM32F4xx_HAL_RCC_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,14 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -7111,4 +7109,3 @@ HAL_StatusTypeDef HAL_RCCEx_DisablePLLSAI(void);
#endif /* __STM32F4xx_HAL_RCC_EX_H */ #endif /* __STM32F4xx_HAL_RCC_EX_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,46 +6,36 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F4xx_HAL_SRAM_H #ifndef STM32F4xx_HAL_SRAM_H
#define __STM32F4xx_HAL_SRAM_H #define STM32F4xx_HAL_SRAM_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#if defined(FMC_Bank1) || defined(FSMC_Bank1)
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) || defined(STM32F412Zx) ||\ #if defined(FSMC_Bank1)
defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F413xx) || defined(STM32F423xx) #include "stm32f4xx_ll_fsmc.h"
#include "stm32f4xx_ll_fsmc.h" #else
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F413xx || STM32F423xx */ #include "stm32f4xx_ll_fmc.h"
#endif /* FSMC_Bank1 */
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx) ||\
defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
#include "stm32f4xx_ll_fmc.h"
#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx */
/** @addtogroup STM32F4xx_HAL_Driver /** @addtogroup STM32F4xx_HAL_Driver
* @{ * @{
*/ */
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) ||\
defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||\
defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) ||\
defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F413xx) || defined(STM32F423xx)
/** @addtogroup SRAM /** @addtogroup SRAM
* @{ * @{
*/ */
@ -90,11 +80,11 @@ typedef struct
DMA_HandleTypeDef *hdma; /*!< Pointer DMA handler */ DMA_HandleTypeDef *hdma; /*!< Pointer DMA handler */
#if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1) #if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1)
void (* MspInitCallback) ( struct __SRAM_HandleTypeDef * hsram); /*!< SRAM Msp Init callback */ void (* MspInitCallback)(struct __SRAM_HandleTypeDef *hsram); /*!< SRAM Msp Init callback */
void (* MspDeInitCallback) ( struct __SRAM_HandleTypeDef * hsram); /*!< SRAM Msp DeInit callback */ void (* MspDeInitCallback)(struct __SRAM_HandleTypeDef *hsram); /*!< SRAM Msp DeInit callback */
void (* DmaXferCpltCallback) ( DMA_HandleTypeDef * hdma); /*!< SRAM DMA Xfer Complete callback */ void (* DmaXferCpltCallback)(DMA_HandleTypeDef *hdma); /*!< SRAM DMA Xfer Complete callback */
void (* DmaXferErrorCallback) ( DMA_HandleTypeDef * hdma); /*!< SRAM DMA Xfer Error callback */ void (* DmaXferErrorCallback)(DMA_HandleTypeDef *hdma); /*!< SRAM DMA Xfer Error callback */
#endif #endif /* USE_HAL_SRAM_REGISTER_CALLBACKS */
} SRAM_HandleTypeDef; } SRAM_HandleTypeDef;
#if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1) #if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1)
@ -107,14 +97,14 @@ typedef enum
HAL_SRAM_MSP_DEINIT_CB_ID = 0x01U, /*!< SRAM MspDeInit Callback ID */ HAL_SRAM_MSP_DEINIT_CB_ID = 0x01U, /*!< SRAM MspDeInit Callback ID */
HAL_SRAM_DMA_XFER_CPLT_CB_ID = 0x02U, /*!< SRAM DMA Xfer Complete Callback ID */ HAL_SRAM_DMA_XFER_CPLT_CB_ID = 0x02U, /*!< SRAM DMA Xfer Complete Callback ID */
HAL_SRAM_DMA_XFER_ERR_CB_ID = 0x03U /*!< SRAM DMA Xfer Complete Callback ID */ HAL_SRAM_DMA_XFER_ERR_CB_ID = 0x03U /*!< SRAM DMA Xfer Complete Callback ID */
}HAL_SRAM_CallbackIDTypeDef; } HAL_SRAM_CallbackIDTypeDef;
/** /**
* @brief HAL SRAM Callback pointer definition * @brief HAL SRAM Callback pointer definition
*/ */
typedef void (*pSRAM_CallbackTypeDef)(SRAM_HandleTypeDef *hsram); typedef void (*pSRAM_CallbackTypeDef)(SRAM_HandleTypeDef *hsram);
typedef void (*pSRAM_DmaCallbackTypeDef)(DMA_HandleTypeDef *hdma); typedef void (*pSRAM_DmaCallbackTypeDef)(DMA_HandleTypeDef *hdma);
#endif #endif /* USE_HAL_SRAM_REGISTER_CALLBACKS */
/** /**
* @} * @}
*/ */
@ -125,6 +115,7 @@ typedef void (*pSRAM_DmaCallbackTypeDef)(DMA_HandleTypeDef *hdma);
/** @defgroup SRAM_Exported_Macros SRAM Exported Macros /** @defgroup SRAM_Exported_Macros SRAM Exported Macros
* @{ * @{
*/ */
/** @brief Reset SRAM handle state /** @brief Reset SRAM handle state
* @param __HANDLE__ SRAM handle * @param __HANDLE__ SRAM handle
* @retval None * @retval None
@ -137,69 +128,93 @@ typedef void (*pSRAM_DmaCallbackTypeDef)(DMA_HandleTypeDef *hdma);
} while(0) } while(0)
#else #else
#define __HAL_SRAM_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SRAM_STATE_RESET) #define __HAL_SRAM_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SRAM_STATE_RESET)
#endif #endif /* USE_HAL_SRAM_REGISTER_CALLBACKS */
/** /**
* @} * @}
*/ */
/* Exported functions --------------------------------------------------------*/ /* Exported functions --------------------------------------------------------*/
/** @addtogroup SRAM_Exported_Functions SRAM Exported Functions
/** @addtogroup SRAM_Exported_Functions
* @{ * @{
*/ */
/** @addtogroup SRAM_Exported_Functions_Group1 /** @addtogroup SRAM_Exported_Functions_Group1 Initialization and de-initialization functions
* @{ * @{
*/ */
/* Initialization/de-initialization functions **********************************/
HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FMC_NORSRAM_TimingTypeDef *Timing, FMC_NORSRAM_TimingTypeDef *ExtTiming); /* Initialization/de-initialization functions ********************************/
HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FMC_NORSRAM_TimingTypeDef *Timing,
FMC_NORSRAM_TimingTypeDef *ExtTiming);
HAL_StatusTypeDef HAL_SRAM_DeInit(SRAM_HandleTypeDef *hsram); HAL_StatusTypeDef HAL_SRAM_DeInit(SRAM_HandleTypeDef *hsram);
void HAL_SRAM_MspInit(SRAM_HandleTypeDef *hsram); void HAL_SRAM_MspInit(SRAM_HandleTypeDef *hsram);
void HAL_SRAM_MspDeInit(SRAM_HandleTypeDef *hsram); void HAL_SRAM_MspDeInit(SRAM_HandleTypeDef *hsram);
/**
* @}
*/
/** @addtogroup SRAM_Exported_Functions_Group2 Input Output and memory control functions
* @{
*/
/* I/O operation functions ***************************************************/
HAL_StatusTypeDef HAL_SRAM_Read_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pDstBuffer,
uint32_t BufferSize);
HAL_StatusTypeDef HAL_SRAM_Write_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pSrcBuffer,
uint32_t BufferSize);
HAL_StatusTypeDef HAL_SRAM_Read_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pDstBuffer,
uint32_t BufferSize);
HAL_StatusTypeDef HAL_SRAM_Write_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pSrcBuffer,
uint32_t BufferSize);
HAL_StatusTypeDef HAL_SRAM_Read_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer,
uint32_t BufferSize);
HAL_StatusTypeDef HAL_SRAM_Write_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer,
uint32_t BufferSize);
HAL_StatusTypeDef HAL_SRAM_Read_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer,
uint32_t BufferSize);
HAL_StatusTypeDef HAL_SRAM_Write_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer,
uint32_t BufferSize);
void HAL_SRAM_DMA_XferCpltCallback(DMA_HandleTypeDef *hdma); void HAL_SRAM_DMA_XferCpltCallback(DMA_HandleTypeDef *hdma);
void HAL_SRAM_DMA_XferErrorCallback(DMA_HandleTypeDef *hdma); void HAL_SRAM_DMA_XferErrorCallback(DMA_HandleTypeDef *hdma);
/**
* @}
*/
/** @addtogroup SRAM_Exported_Functions_Group2
* @{
*/
/* I/O operation functions *****************************************************/
HAL_StatusTypeDef HAL_SRAM_Read_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pDstBuffer, uint32_t BufferSize);
HAL_StatusTypeDef HAL_SRAM_Write_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pSrcBuffer, uint32_t BufferSize);
HAL_StatusTypeDef HAL_SRAM_Read_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pDstBuffer, uint32_t BufferSize);
HAL_StatusTypeDef HAL_SRAM_Write_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pSrcBuffer, uint32_t BufferSize);
HAL_StatusTypeDef HAL_SRAM_Read_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize);
HAL_StatusTypeDef HAL_SRAM_Write_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize);
HAL_StatusTypeDef HAL_SRAM_Read_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize);
HAL_StatusTypeDef HAL_SRAM_Write_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize);
#if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1) #if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1)
/* SRAM callback registering/unregistering */ /* SRAM callback registering/unregistering */
HAL_StatusTypeDef HAL_SRAM_RegisterCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId, pSRAM_CallbackTypeDef pCallback); HAL_StatusTypeDef HAL_SRAM_RegisterCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId,
pSRAM_CallbackTypeDef pCallback);
HAL_StatusTypeDef HAL_SRAM_UnRegisterCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId); HAL_StatusTypeDef HAL_SRAM_UnRegisterCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId);
HAL_StatusTypeDef HAL_SRAM_RegisterDmaCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId, pSRAM_DmaCallbackTypeDef pCallback); HAL_StatusTypeDef HAL_SRAM_RegisterDmaCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId,
#endif pSRAM_DmaCallbackTypeDef pCallback);
#endif /* USE_HAL_SRAM_REGISTER_CALLBACKS */
/** /**
* @} * @}
*/ */
/** @addtogroup SRAM_Exported_Functions_Group3 /** @addtogroup SRAM_Exported_Functions_Group3 Control functions
* @{ * @{
*/ */
/* SRAM Control functions ******************************************************/
/* SRAM Control functions ****************************************************/
HAL_StatusTypeDef HAL_SRAM_WriteOperation_Enable(SRAM_HandleTypeDef *hsram); HAL_StatusTypeDef HAL_SRAM_WriteOperation_Enable(SRAM_HandleTypeDef *hsram);
HAL_StatusTypeDef HAL_SRAM_WriteOperation_Disable(SRAM_HandleTypeDef *hsram); HAL_StatusTypeDef HAL_SRAM_WriteOperation_Disable(SRAM_HandleTypeDef *hsram);
/** /**
* @} * @}
*/ */
/** @addtogroup SRAM_Exported_Functions_Group4 /** @addtogroup SRAM_Exported_Functions_Group4 Peripheral State functions
* @{ * @{
*/ */
/* SRAM State functions *********************************************************/
/* SRAM State functions ******************************************************/
HAL_SRAM_StateTypeDef HAL_SRAM_GetState(SRAM_HandleTypeDef *hsram); HAL_SRAM_StateTypeDef HAL_SRAM_GetState(SRAM_HandleTypeDef *hsram);
/**
* @}
*/
/** /**
* @} * @}
*/ */
@ -208,25 +223,14 @@ HAL_SRAM_StateTypeDef HAL_SRAM_GetState(SRAM_HandleTypeDef *hsram);
* @} * @}
*/ */
/* Private types -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private constants ---------------------------------------------------------*/
/* Private macros ------------------------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
/** /**
* @} * @}
*/ */
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\ #endif /* FMC_Bank1 || FSMC_Bank1 */
STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx || STM32F412Zx ||\
STM32F412Vx || STM32F412Rx || STM32F413xx || STM32F423xx */
/**
* @}
*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* __STM32F4xx_HAL_SRAM_H */ #endif /* STM32F4xx_HAL_SRAM_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics. * Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -706,6 +705,15 @@ typedef void (*pTIM_CallbackTypeDef)(TIM_HandleTypeDef *htim); /*!< pointer to
* @} * @}
*/ */
/** @defgroup TIM_CC_DMA_Request CCx DMA request selection
* @{
*/
#define TIM_CCDMAREQUEST_CC 0x00000000U /*!< CCx DMA request sent when capture or compare match event occurs */
#define TIM_CCDMAREQUEST_UPDATE TIM_CR2_CCDS /*!< CCx DMA requests sent when update event occurs */
/**
* @}
*/
/** @defgroup TIM_Flag_definition TIM Flag Definition /** @defgroup TIM_Flag_definition TIM Flag Definition
* @{ * @{
*/ */
@ -740,16 +748,16 @@ typedef void (*pTIM_CallbackTypeDef)(TIM_HandleTypeDef *htim); /*!< pointer to
/** @defgroup TIM_Clock_Source TIM Clock Source /** @defgroup TIM_Clock_Source TIM Clock Source
* @{ * @{
*/ */
#define TIM_CLOCKSOURCE_ETRMODE2 TIM_SMCR_ETPS_1 /*!< External clock source mode 2 */
#define TIM_CLOCKSOURCE_INTERNAL TIM_SMCR_ETPS_0 /*!< Internal clock source */ #define TIM_CLOCKSOURCE_INTERNAL TIM_SMCR_ETPS_0 /*!< Internal clock source */
#define TIM_CLOCKSOURCE_ETRMODE1 TIM_TS_ETRF /*!< External clock source mode 1 (ETRF) */
#define TIM_CLOCKSOURCE_ETRMODE2 TIM_SMCR_ETPS_1 /*!< External clock source mode 2 */
#define TIM_CLOCKSOURCE_TI1ED TIM_TS_TI1F_ED /*!< External clock source mode 1 (TTI1FP1 + edge detect.) */
#define TIM_CLOCKSOURCE_TI1 TIM_TS_TI1FP1 /*!< External clock source mode 1 (TTI1FP1) */
#define TIM_CLOCKSOURCE_TI2 TIM_TS_TI2FP2 /*!< External clock source mode 1 (TTI2FP2) */
#define TIM_CLOCKSOURCE_ITR0 TIM_TS_ITR0 /*!< External clock source mode 1 (ITR0) */ #define TIM_CLOCKSOURCE_ITR0 TIM_TS_ITR0 /*!< External clock source mode 1 (ITR0) */
#define TIM_CLOCKSOURCE_ITR1 TIM_TS_ITR1 /*!< External clock source mode 1 (ITR1) */ #define TIM_CLOCKSOURCE_ITR1 TIM_TS_ITR1 /*!< External clock source mode 1 (ITR1) */
#define TIM_CLOCKSOURCE_ITR2 TIM_TS_ITR2 /*!< External clock source mode 1 (ITR2) */ #define TIM_CLOCKSOURCE_ITR2 TIM_TS_ITR2 /*!< External clock source mode 1 (ITR2) */
#define TIM_CLOCKSOURCE_ITR3 TIM_TS_ITR3 /*!< External clock source mode 1 (ITR3) */ #define TIM_CLOCKSOURCE_ITR3 TIM_TS_ITR3 /*!< External clock source mode 1 (ITR3) */
#define TIM_CLOCKSOURCE_TI1ED TIM_TS_TI1F_ED /*!< External clock source mode 1 (TTI1FP1 + edge detect.) */
#define TIM_CLOCKSOURCE_TI1 TIM_TS_TI1FP1 /*!< External clock source mode 1 (TTI1FP1) */
#define TIM_CLOCKSOURCE_TI2 TIM_TS_TI2FP2 /*!< External clock source mode 1 (TTI2FP2) */
#define TIM_CLOCKSOURCE_ETRMODE1 TIM_TS_ETRF /*!< External clock source mode 1 (ETRF) */
/** /**
* @} * @}
*/ */
@ -1527,6 +1535,17 @@ typedef void (*pTIM_CallbackTypeDef)(TIM_HandleTypeDef *htim); /*!< pointer to
TIM_SET_CAPTUREPOLARITY((__HANDLE__), (__CHANNEL__), (__POLARITY__)); \ TIM_SET_CAPTUREPOLARITY((__HANDLE__), (__CHANNEL__), (__POLARITY__)); \
}while(0) }while(0)
/** @brief Select the Capture/compare DMA request source.
* @param __HANDLE__ specifies the TIM Handle.
* @param __CCDMA__ specifies Capture/compare DMA request source
* This parameter can be one of the following values:
* @arg TIM_CCDMAREQUEST_CC: CCx DMA request generated on Capture/Compare event
* @arg TIM_CCDMAREQUEST_UPDATE: CCx DMA request generated on Update event
* @retval None
*/
#define __HAL_TIM_SELECT_CCDMAREQUEST(__HANDLE__, __CCDMA__) \
MODIFY_REG((__HANDLE__)->Instance->CR2, TIM_CR2_CCDS, (__CCDMA__))
/** /**
* @} * @}
*/ */
@ -1640,15 +1659,15 @@ typedef void (*pTIM_CallbackTypeDef)(TIM_HandleTypeDef *htim); /*!< pointer to
((__CHANNEL__) == TIM_CHANNEL_3)) ((__CHANNEL__) == TIM_CHANNEL_3))
#define IS_TIM_CLOCKSOURCE(__CLOCK__) (((__CLOCK__) == TIM_CLOCKSOURCE_INTERNAL) || \ #define IS_TIM_CLOCKSOURCE(__CLOCK__) (((__CLOCK__) == TIM_CLOCKSOURCE_INTERNAL) || \
((__CLOCK__) == TIM_CLOCKSOURCE_ETRMODE1) || \
((__CLOCK__) == TIM_CLOCKSOURCE_ETRMODE2) || \ ((__CLOCK__) == TIM_CLOCKSOURCE_ETRMODE2) || \
((__CLOCK__) == TIM_CLOCKSOURCE_ITR0) || \
((__CLOCK__) == TIM_CLOCKSOURCE_ITR1) || \
((__CLOCK__) == TIM_CLOCKSOURCE_ITR2) || \
((__CLOCK__) == TIM_CLOCKSOURCE_ITR3) || \
((__CLOCK__) == TIM_CLOCKSOURCE_TI1ED) || \ ((__CLOCK__) == TIM_CLOCKSOURCE_TI1ED) || \
((__CLOCK__) == TIM_CLOCKSOURCE_TI1) || \ ((__CLOCK__) == TIM_CLOCKSOURCE_TI1) || \
((__CLOCK__) == TIM_CLOCKSOURCE_TI2) || \ ((__CLOCK__) == TIM_CLOCKSOURCE_TI2) || \
((__CLOCK__) == TIM_CLOCKSOURCE_ETRMODE1)) ((__CLOCK__) == TIM_CLOCKSOURCE_ITR0) || \
((__CLOCK__) == TIM_CLOCKSOURCE_ITR1) || \
((__CLOCK__) == TIM_CLOCKSOURCE_ITR2) || \
((__CLOCK__) == TIM_CLOCKSOURCE_ITR3))
#define IS_TIM_CLOCKPOLARITY(__POLARITY__) (((__POLARITY__) == TIM_CLOCKPOLARITY_INVERTED) || \ #define IS_TIM_CLOCKPOLARITY(__POLARITY__) (((__POLARITY__) == TIM_CLOCKPOLARITY_INVERTED) || \
((__POLARITY__) == TIM_CLOCKPOLARITY_NONINVERTED) || \ ((__POLARITY__) == TIM_CLOCKPOLARITY_NONINVERTED) || \
@ -2125,5 +2144,3 @@ void TIM_ResetCallback(TIM_HandleTypeDef *htim);
#endif #endif
#endif /* STM32F4xx_HAL_TIM_H */ #endif /* STM32F4xx_HAL_TIM_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics. * Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -329,7 +328,7 @@ HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(TIM_HandleTypeDef *htim,
/* End of exported functions -------------------------------------------------*/ /* End of exported functions -------------------------------------------------*/
/* Private functions----------------------------------------------------------*/ /* Private functions----------------------------------------------------------*/
/** @addtogroup TIMEx_Private_Functions TIMEx Private Functions /** @addtogroup TIMEx_Private_Functions TIM Extended Private Functions
* @{ * @{
*/ */
void TIMEx_DMACommutationCplt(DMA_HandleTypeDef *hdma); void TIMEx_DMACommutationCplt(DMA_HandleTypeDef *hdma);
@ -353,5 +352,3 @@ void TIMEx_DMACommutationHalfCplt(DMA_HandleTypeDef *hdma);
#endif /* STM32F4xx_HAL_TIM_EX_H */ #endif /* STM32F4xx_HAL_TIM_EX_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -23,14 +23,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -2105,4 +2103,3 @@ __STATIC_INLINE void LL_APB2_GRP1_DisableClockLowPower(uint32_t Periphs)
#endif /* __STM32F4xx_LL_BUS_H */ #endif /* __STM32F4xx_LL_BUS_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -22,14 +22,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -637,4 +635,3 @@ __STATIC_INLINE void LL_MPU_DisableRegion(uint32_t Region)
#endif /* __STM32F4xx_LL_CORTEX_H */ #endif /* __STM32F4xx_LL_CORTEX_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics. * Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -200,5 +199,3 @@ ErrorStatus LL_CRC_DeInit(CRC_TypeDef *CRCx);
#endif #endif
#endif /* STM32F4xx_LL_CRC_H */ #endif /* STM32F4xx_LL_CRC_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file in
* the "License"; You may not use this file except in compliance with the * the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -2730,7 +2729,7 @@ __STATIC_INLINE void LL_DMA_DisableIT_FE(DMA_TypeDef *DMAx, uint32_t Stream)
} }
/** /**
* @brief Check if Half transfer interrup is enabled. * @brief Check if Half transfer interrupt is enabled.
* @rmtoll CR HTIE LL_DMA_IsEnabledIT_HT * @rmtoll CR HTIE LL_DMA_IsEnabledIT_HT
* @param DMAx DMAx Instance * @param DMAx DMAx Instance
* @param Stream This parameter can be one of the following values: * @param Stream This parameter can be one of the following values:
@ -2770,7 +2769,7 @@ __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_TE(DMA_TypeDef *DMAx, uint32_t Strea
} }
/** /**
* @brief Check if Transfer complete interrup is enabled. * @brief Check if Transfer complete interrupt is enabled.
* @rmtoll CR TCIE LL_DMA_IsEnabledIT_TC * @rmtoll CR TCIE LL_DMA_IsEnabledIT_TC
* @param DMAx DMAx Instance * @param DMAx DMAx Instance
* @param Stream This parameter can be one of the following values: * @param Stream This parameter can be one of the following values:
@ -2810,7 +2809,7 @@ __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_DME(DMA_TypeDef *DMAx, uint32_t Stre
} }
/** /**
* @brief Check if FIFO error interrup is enabled. * @brief Check if FIFO error interrupt is enabled.
* @rmtoll FCR FEIE LL_DMA_IsEnabledIT_FE * @rmtoll FCR FEIE LL_DMA_IsEnabledIT_FE
* @param DMAx DMAx Instance * @param DMAx DMAx Instance
* @param Stream This parameter can be one of the following values: * @param Stream This parameter can be one of the following values:
@ -2867,4 +2866,3 @@ void LL_DMA_StructInit(LL_DMA_InitTypeDef *DMA_InitStruct);
#endif /* __STM32F4xx_LL_DMA_H */ #endif /* __STM32F4xx_LL_DMA_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics. * Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.Clause
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -953,4 +952,3 @@ void LL_EXTI_StructInit(LL_EXTI_InitTypeDef *EXTI_InitStruct);
#endif /* __STM32F4xx_LL_EXTI_H */ #endif /* __STM32F4xx_LL_EXTI_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

File diff suppressed because it is too large Load diff

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -980,4 +979,3 @@ void LL_GPIO_StructInit(LL_GPIO_InitTypeDef *GPIO_InitStruct);
#endif /* __STM32F4xx_LL_GPIO_H */ #endif /* __STM32F4xx_LL_GPIO_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,14 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -985,5 +983,3 @@ ErrorStatus LL_PWR_DeInit(void);
#endif #endif
#endif /* __STM32F4xx_LL_PWR_H */ #endif /* __STM32F4xx_LL_PWR_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,14 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -7096,4 +7094,3 @@ uint32_t LL_RCC_GetDSIClockFreq(uint32_t DSIxSource);
#endif /* __STM32F4xx_LL_RCC_H */ #endif /* __STM32F4xx_LL_RCC_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics. * Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -2026,4 +2025,3 @@ ErrorStatus LL_I2S_InitFullDuplex(SPI_TypeDef *I2Sxext, LL_I2S_InitTypeDef *I2S_
#endif /* STM32F4xx_LL_SPI_H */ #endif /* STM32F4xx_LL_SPI_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -3,6 +3,18 @@
* @file stm32f4xx_ll_system.h * @file stm32f4xx_ll_system.h
* @author MCD Application Team * @author MCD Application Team
* @brief Header file of SYSTEM LL module. * @brief Header file of SYSTEM LL module.
*
******************************************************************************
* @attention
*
*Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
@verbatim @verbatim
============================================================================== ==============================================================================
##### How to use this driver ##### ##### How to use this driver #####
@ -16,17 +28,6 @@
@endverbatim @endverbatim
****************************************************************************** ******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/ */
/* Define to prevent recursive inclusion -------------------------------------*/ /* Define to prevent recursive inclusion -------------------------------------*/
@ -767,7 +768,7 @@ __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM_GetBitstreamClockSourceSelection(void)
/** /**
* @brief Enables the DFSDM1 or DFSDM2 Delay clock * @brief Enables the DFSDM1 or DFSDM2 Delay clock
* @rmtoll SYSCFG_MCHDLYCR MCHDLYEN LL_SYSCFG_DFSDM_EnableDelayClock * @rmtoll SYSCFG_MCHDLYCR MCHDLYEN LL_SYSCFG_DFSDM_EnableDelayClock
* @param MCHDLY This paramater can be one of the following values * @param MCHDLY This parameter can be one of the following values
* @arg @ref LL_SYSCFG_DFSDM1_MCHDLYEN * @arg @ref LL_SYSCFG_DFSDM1_MCHDLYEN
* @arg @ref LL_SYSCFG_DFSDM2_MCHDLYEN * @arg @ref LL_SYSCFG_DFSDM2_MCHDLYEN
* @retval None * @retval None
@ -780,7 +781,7 @@ __STATIC_INLINE void LL_SYSCFG_DFSDM_EnableDelayClock(uint32_t MCHDLY)
/** /**
* @brief Disables the DFSDM1 or the DFSDM2 Delay clock * @brief Disables the DFSDM1 or the DFSDM2 Delay clock
* @rmtoll SYSCFG_MCHDLYCR MCHDLY1EN LL_SYSCFG_DFSDM1_DisableDelayClock * @rmtoll SYSCFG_MCHDLYCR MCHDLY1EN LL_SYSCFG_DFSDM1_DisableDelayClock
* @param MCHDLY This paramater can be one of the following values * @param MCHDLY This parameter can be one of the following values
* @arg @ref LL_SYSCFG_DFSDM1_MCHDLYEN * @arg @ref LL_SYSCFG_DFSDM1_MCHDLYEN
* @arg @ref LL_SYSCFG_DFSDM2_MCHDLYEN * @arg @ref LL_SYSCFG_DFSDM2_MCHDLYEN
* @retval None * @retval None
@ -1707,4 +1708,4 @@ __STATIC_INLINE void LL_FLASH_DisableDataCacheReset(void)
#endif /* __STM32F4xx_LL_SYSTEM_H */ #endif /* __STM32F4xx_LL_SYSTEM_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics. * Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -2520,4 +2519,3 @@ void LL_USART_ClockStructInit(LL_USART_ClockInitTypeDef *USART_ClockInitS
#endif /* __STM32F4xx_LL_USART_H */ #endif /* __STM32F4xx_LL_USART_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -18,13 +18,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -306,5 +305,3 @@ ErrorStatus LL_PLL_ConfigSystemClock_HSE(uint32_t HSEFrequency, uint32_t HSEBypa
#endif #endif
#endif /* __STM32F4xx_LL_UTILS_H */ #endif /* __STM32F4xx_LL_UTILS_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -0,0 +1,6 @@
This software component is provided to you as part of a software package and
applicable license terms are in the Package_license file. If you received this
software component outside of a package or without applicable license terms,
the terms of the BSD-3-Clause license shall apply.
You may obtain a copy of the BSD-3-Clause at:
https://opensource.org/licenses/BSD-3-Clause

View file

@ -5,6 +5,17 @@
* @brief HAL module driver. * @brief HAL module driver.
* This is the common part of the HAL initialization * This is the common part of the HAL initialization
* *
******************************************************************************
* @attention
*
* Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
@verbatim @verbatim
============================================================================== ==============================================================================
##### How to use this driver ##### ##### How to use this driver #####
@ -19,17 +30,6 @@
@endverbatim @endverbatim
****************************************************************************** ******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/ */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
@ -50,11 +50,11 @@
* @{ * @{
*/ */
/** /**
* @brief STM32F4xx HAL Driver version number V1.7.13 * @brief STM32F4xx HAL Driver version number V1.8.1
*/ */
#define __STM32F4xx_HAL_VERSION_MAIN (0x01U) /*!< [31:24] main version */ #define __STM32F4xx_HAL_VERSION_MAIN (0x01U) /*!< [31:24] main version */
#define __STM32F4xx_HAL_VERSION_SUB1 (0x07U) /*!< [23:16] sub1 version */ #define __STM32F4xx_HAL_VERSION_SUB1 (0x08U) /*!< [23:16] sub1 version */
#define __STM32F4xx_HAL_VERSION_SUB2 (0x0DU) /*!< [15:8] sub2 version */ #define __STM32F4xx_HAL_VERSION_SUB2 (0x01U) /*!< [15:8] sub2 version */
#define __STM32F4xx_HAL_VERSION_RC (0x00U) /*!< [7:0] release candidate */ #define __STM32F4xx_HAL_VERSION_RC (0x00U) /*!< [7:0] release candidate */
#define __STM32F4xx_HAL_VERSION ((__STM32F4xx_HAL_VERSION_MAIN << 24U)\ #define __STM32F4xx_HAL_VERSION ((__STM32F4xx_HAL_VERSION_MAIN << 24U)\
|(__STM32F4xx_HAL_VERSION_SUB1 << 16U)\ |(__STM32F4xx_HAL_VERSION_SUB1 << 16U)\
@ -612,4 +612,4 @@ void HAL_DisableMemorySwappingBank(void)
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -68,14 +68,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -502,4 +500,3 @@ __weak void HAL_SYSTICK_Callback(void)
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -83,13 +83,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file in
* the "License"; You may not use this file except in compliance with the * the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -602,7 +601,7 @@ HAL_StatusTypeDef HAL_DMA_Abort_IT(DMA_HandleTypeDef *hdma)
* @param hdma pointer to a DMA_HandleTypeDef structure that contains * @param hdma pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA Stream. * the configuration information for the specified DMA Stream.
* @param CompleteLevel Specifies the DMA level complete. * @param CompleteLevel Specifies the DMA level complete.
* @note The polling mode is kept in this version for legacy. it is recommanded to use the IT model instead. * @note The polling mode is kept in this version for legacy. it is recommended to use the IT model instead.
* This model could be used for debug purpose. * This model could be used for debug purpose.
* @note The HAL_DMA_PollForTransfer API cannot be used in circular and double buffering mode (automatic circular mode). * @note The HAL_DMA_PollForTransfer API cannot be used in circular and double buffering mode (automatic circular mode).
* @param Timeout Timeout duration. * @param Timeout Timeout duration.
@ -959,9 +958,9 @@ void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma)
* @brief Register callbacks * @brief Register callbacks
* @param hdma pointer to a DMA_HandleTypeDef structure that contains * @param hdma pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA Stream. * the configuration information for the specified DMA Stream.
* @param CallbackID User Callback identifer * @param CallbackID User Callback identifier
* a DMA_HandleTypeDef structure as parameter. * a DMA_HandleTypeDef structure as parameter.
* @param pCallback pointer to private callbacsk function which has pointer to * @param pCallback pointer to private callback function which has pointer to
* a DMA_HandleTypeDef structure as parameter. * a DMA_HandleTypeDef structure as parameter.
* @retval HAL status * @retval HAL status
*/ */
@ -1002,6 +1001,8 @@ HAL_StatusTypeDef HAL_DMA_RegisterCallback(DMA_HandleTypeDef *hdma, HAL_DMA_Call
break; break;
default: default:
/* Return error status */
status = HAL_ERROR;
break; break;
} }
} }
@ -1021,7 +1022,7 @@ HAL_StatusTypeDef HAL_DMA_RegisterCallback(DMA_HandleTypeDef *hdma, HAL_DMA_Call
* @brief UnRegister callbacks * @brief UnRegister callbacks
* @param hdma pointer to a DMA_HandleTypeDef structure that contains * @param hdma pointer to a DMA_HandleTypeDef structure that contains
* the configuration information for the specified DMA Stream. * the configuration information for the specified DMA Stream.
* @param CallbackID User Callback identifer * @param CallbackID User Callback identifier
* a HAL_DMA_CallbackIDTypeDef ENUM as parameter. * a HAL_DMA_CallbackIDTypeDef ENUM as parameter.
* @retval HAL status * @retval HAL status
*/ */
@ -1302,4 +1303,3 @@ static HAL_StatusTypeDef DMA_CheckFifoParam(DMA_HandleTypeDef *hdma)
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -25,13 +25,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file in
* the "License"; You may not use this file except in compliance with the * the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -312,4 +311,3 @@ static void DMA_MultiBufferSetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddres
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -8,6 +8,17 @@
* + Initialization and de-initialization functions * + Initialization and de-initialization functions
* + IO operation functions * + IO operation functions
* *
******************************************************************************
* @attention
*
* Copyright (c) 2018 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
@verbatim @verbatim
============================================================================== ==============================================================================
##### EXTI Peripheral features ##### ##### EXTI Peripheral features #####
@ -69,18 +80,6 @@
(#) Generate software interrupt using HAL_EXTI_GenerateSWI(). (#) Generate software interrupt using HAL_EXTI_GenerateSWI().
@endverbatim @endverbatim
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2018 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/ */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
@ -301,8 +300,8 @@ HAL_StatusTypeDef HAL_EXTI_GetConfigLine(EXTI_HandleTypeDef *hexti, EXTI_ConfigT
{ {
assert_param(IS_EXTI_GPIO_PIN(linepos)); assert_param(IS_EXTI_GPIO_PIN(linepos));
regval = SYSCFG->EXTICR[linepos >> 2u]; regval = (SYSCFG->EXTICR[linepos >> 2u] << 16u );
pExtiConfig->GPIOSel = ((regval << (SYSCFG_EXTICR1_EXTI1_Pos * (3uL - (linepos & 0x03u)))) >> 24); pExtiConfig->GPIOSel = ((regval << (SYSCFG_EXTICR1_EXTI1_Pos * (3uL - (linepos & 0x03u)))) >> 28u);
} }
} }
@ -546,4 +545,3 @@ void HAL_EXTI_GenerateSWI(EXTI_HandleTypeDef *hexti)
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -63,14 +63,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -775,4 +773,3 @@ static void FLASH_SetErrorCode(void)
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -49,14 +49,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -1347,4 +1345,3 @@ void FLASH_FlushCaches(void)
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -34,14 +34,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -172,4 +170,3 @@ __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableFlashSleepMode(void)
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -8,6 +8,17 @@
* + Initialization and de-initialization functions * + Initialization and de-initialization functions
* + IO operation functions * + IO operation functions
* *
******************************************************************************
* @attention
*
* Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
@verbatim @verbatim
============================================================================== ==============================================================================
##### GPIO Peripheral features ##### ##### GPIO Peripheral features #####
@ -91,17 +102,6 @@
@endverbatim @endverbatim
****************************************************************************** ******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/ */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
@ -245,23 +245,6 @@ void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
temp |= ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4U * (position & 0x03U))); temp |= ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4U * (position & 0x03U)));
SYSCFG->EXTICR[position >> 2U] = temp; SYSCFG->EXTICR[position >> 2U] = temp;
/* Clear EXTI line configuration */
temp = EXTI->IMR;
temp &= ~((uint32_t)iocurrent);
if((GPIO_Init->Mode & EXTI_IT) != 0x00U)
{
temp |= iocurrent;
}
EXTI->IMR = temp;
temp = EXTI->EMR;
temp &= ~((uint32_t)iocurrent);
if((GPIO_Init->Mode & EXTI_EVT) != 0x00U)
{
temp |= iocurrent;
}
EXTI->EMR = temp;
/* Clear Rising Falling edge configuration */ /* Clear Rising Falling edge configuration */
temp = EXTI->RTSR; temp = EXTI->RTSR;
temp &= ~((uint32_t)iocurrent); temp &= ~((uint32_t)iocurrent);
@ -278,6 +261,23 @@ void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
temp |= iocurrent; temp |= iocurrent;
} }
EXTI->FTSR = temp; EXTI->FTSR = temp;
temp = EXTI->EMR;
temp &= ~((uint32_t)iocurrent);
if((GPIO_Init->Mode & EXTI_EVT) != 0x00U)
{
temp |= iocurrent;
}
EXTI->EMR = temp;
/* Clear EXTI line configuration */
temp = EXTI->IMR;
temp &= ~((uint32_t)iocurrent);
if((GPIO_Init->Mode & EXTI_IT) != 0x00U)
{
temp |= iocurrent;
}
EXTI->IMR = temp;
} }
} }
} }
@ -321,8 +321,8 @@ void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin)
EXTI->EMR &= ~((uint32_t)iocurrent); EXTI->EMR &= ~((uint32_t)iocurrent);
/* Clear Rising Falling edge configuration */ /* Clear Rising Falling edge configuration */
EXTI->RTSR &= ~((uint32_t)iocurrent);
EXTI->FTSR &= ~((uint32_t)iocurrent); EXTI->FTSR &= ~((uint32_t)iocurrent);
EXTI->RTSR &= ~((uint32_t)iocurrent);
/* Configure the External Interrupt or event for the current IO */ /* Configure the External Interrupt or event for the current IO */
tmp = 0x0FU << (4U * (position & 0x03U)); tmp = 0x0FU << (4U * (position & 0x03U));
@ -437,7 +437,7 @@ void HAL_GPIO_TogglePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
/* Check the parameters */ /* Check the parameters */
assert_param(IS_GPIO_PIN(GPIO_Pin)); assert_param(IS_GPIO_PIN(GPIO_Pin));
/* get current Ouput Data Register value */ /* get current Output Data Register value */
odr = GPIOx->ODR; odr = GPIOx->ODR;
/* Set selected pins that were at low level, and reset ones that were high */ /* Set selected pins that were at low level, and reset ones that were high */
@ -531,4 +531,3 @@ __weak void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -11,14 +11,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -571,5 +569,3 @@ void HAL_PWR_DisableSEVOnPend(void)
/** /**
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -10,14 +10,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -600,5 +598,3 @@ HAL_StatusTypeDef HAL_PWREx_EnterUnderDriveSTOPMode(uint32_t Regulator, uint8_t
/** /**
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -54,14 +54,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -1122,4 +1120,3 @@ __weak void HAL_RCC_CSSCallback(void)
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -10,14 +10,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
@ -3784,4 +3782,3 @@ void HAL_RCC_GetOscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,6 +6,17 @@
* This file provides a generic firmware to drive SRAM memories * This file provides a generic firmware to drive SRAM memories
* mounted as external device. * mounted as external device.
* *
******************************************************************************
* @attention
*
* Copyright (c) 2016 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
@verbatim @verbatim
============================================================================== ==============================================================================
##### How to use this driver ##### ##### How to use this driver #####
@ -64,25 +75,25 @@
The compilation define USE_HAL_SRAM_REGISTER_CALLBACKS when set to 1 The compilation define USE_HAL_SRAM_REGISTER_CALLBACKS when set to 1
allows the user to configure dynamically the driver callbacks. allows the user to configure dynamically the driver callbacks.
Use Functions @ref HAL_SRAM_RegisterCallback() to register a user callback, Use Functions HAL_SRAM_RegisterCallback() to register a user callback,
it allows to register following callbacks: it allows to register following callbacks:
(+) MspInitCallback : SRAM MspInit. (+) MspInitCallback : SRAM MspInit.
(+) MspDeInitCallback : SRAM MspDeInit. (+) MspDeInitCallback : SRAM MspDeInit.
This function takes as parameters the HAL peripheral handle, the Callback ID This function takes as parameters the HAL peripheral handle, the Callback ID
and a pointer to the user callback function. and a pointer to the user callback function.
Use function @ref HAL_SRAM_UnRegisterCallback() to reset a callback to the default Use function HAL_SRAM_UnRegisterCallback() to reset a callback to the default
weak (surcharged) function. It allows to reset following callbacks: weak (surcharged) function. It allows to reset following callbacks:
(+) MspInitCallback : SRAM MspInit. (+) MspInitCallback : SRAM MspInit.
(+) MspDeInitCallback : SRAM MspDeInit. (+) MspDeInitCallback : SRAM MspDeInit.
This function) takes as parameters the HAL peripheral handle and the Callback ID. This function) takes as parameters the HAL peripheral handle and the Callback ID.
By default, after the @ref HAL_SRAM_Init and if the state is HAL_SRAM_STATE_RESET By default, after the HAL_SRAM_Init and if the state is HAL_SRAM_STATE_RESET
all callbacks are reset to the corresponding legacy weak (surcharged) functions. all callbacks are reset to the corresponding legacy weak (surcharged) functions.
Exception done for MspInit and MspDeInit callbacks that are respectively Exception done for MspInit and MspDeInit callbacks that are respectively
reset to the legacy weak (surcharged) functions in the @ref HAL_SRAM_Init reset to the legacy weak (surcharged) functions in the HAL_SRAM_Init
and @ref HAL_SRAM_DeInit only when these callbacks are null (not registered beforehand). and HAL_SRAM_DeInit only when these callbacks are null (not registered beforehand).
If not, MspInit or MspDeInit are not null, the @ref HAL_SRAM_Init and @ref HAL_SRAM_DeInit If not, MspInit or MspDeInit are not null, the HAL_SRAM_Init and HAL_SRAM_DeInit
keep and use the user MspInit/MspDeInit callbacks (registered beforehand) keep and use the user MspInit/MspDeInit callbacks (registered beforehand)
Callbacks can be registered/unregistered in READY state only. Callbacks can be registered/unregistered in READY state only.
@ -90,8 +101,8 @@
in READY or RESET state, thus registered (user) MspInit/DeInit callbacks can be used in READY or RESET state, thus registered (user) MspInit/DeInit callbacks can be used
during the Init/DeInit. during the Init/DeInit.
In that case first register the MspInit/MspDeInit user callbacks In that case first register the MspInit/MspDeInit user callbacks
using @ref HAL_SRAM_RegisterCallback before calling @ref HAL_SRAM_DeInit using HAL_SRAM_RegisterCallback before calling HAL_SRAM_DeInit
or @ref HAL_SRAM_Init function. or HAL_SRAM_Init function.
When The compilation define USE_HAL_SRAM_REGISTER_CALLBACKS is set to 0 or When The compilation define USE_HAL_SRAM_REGISTER_CALLBACKS is set to 0 or
not defined, the callback registering feature is not available not defined, the callback registering feature is not available
@ -99,49 +110,41 @@
@endverbatim @endverbatim
****************************************************************************** ******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/ */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h" #include "stm32f4xx_hal.h"
#if defined(FMC_Bank1) || defined(FSMC_Bank1)
/** @addtogroup STM32F4xx_HAL_Driver /** @addtogroup STM32F4xx_HAL_Driver
* @{ * @{
*/ */
#ifdef HAL_SRAM_MODULE_ENABLED
/** @defgroup SRAM SRAM /** @defgroup SRAM SRAM
* @brief SRAM driver modules * @brief SRAM driver modules
* @{ * @{
*/ */
#ifdef HAL_SRAM_MODULE_ENABLED
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) ||\
defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||\
defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) ||\
defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F413xx) || defined(STM32F423xx)
/* Private typedef -----------------------------------------------------------*/ /* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/ /* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/
/* Private functions ---------------------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/
static void SRAM_DMACplt(DMA_HandleTypeDef *hdma);
static void SRAM_DMACpltProt(DMA_HandleTypeDef *hdma);
static void SRAM_DMAError(DMA_HandleTypeDef *hdma);
/* Exported functions --------------------------------------------------------*/ /* Exported functions --------------------------------------------------------*/
/** @defgroup SRAM_Exported_Functions SRAM Exported Functions /** @defgroup SRAM_Exported_Functions SRAM Exported Functions
* @{ * @{
*/ */
/** @defgroup SRAM_Exported_Functions_Group1 Initialization and de-initialization functions /** @defgroup SRAM_Exported_Functions_Group1 Initialization and de-initialization functions
* @brief Initialization and Configuration functions * @brief Initialization and Configuration functions.
* *
@verbatim @verbatim
============================================================================== ==============================================================================
@ -162,21 +165,22 @@
* @param ExtTiming Pointer to SRAM extended mode timing structure * @param ExtTiming Pointer to SRAM extended mode timing structure
* @retval HAL status * @retval HAL status
*/ */
HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FMC_NORSRAM_TimingTypeDef *Timing, FMC_NORSRAM_TimingTypeDef *ExtTiming) HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FMC_NORSRAM_TimingTypeDef *Timing,
FMC_NORSRAM_TimingTypeDef *ExtTiming)
{ {
/* Check the SRAM handle parameter */ /* Check the SRAM handle parameter */
if(hsram == NULL) if (hsram == NULL)
{ {
return HAL_ERROR; return HAL_ERROR;
} }
if(hsram->State == HAL_SRAM_STATE_RESET) if (hsram->State == HAL_SRAM_STATE_RESET)
{ {
/* Allocate lock resource and initialize it */ /* Allocate lock resource and initialize it */
hsram->Lock = HAL_UNLOCKED; hsram->Lock = HAL_UNLOCKED;
#if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1) #if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1)
if(hsram->MspInitCallback == NULL) if (hsram->MspInitCallback == NULL)
{ {
hsram->MspInitCallback = HAL_SRAM_MspInit; hsram->MspInitCallback = HAL_SRAM_MspInit;
} }
@ -188,21 +192,25 @@ HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FMC_NORSRAM_TimingTyp
#else #else
/* Initialize the low level hardware (MSP) */ /* Initialize the low level hardware (MSP) */
HAL_SRAM_MspInit(hsram); HAL_SRAM_MspInit(hsram);
#endif #endif /* USE_HAL_SRAM_REGISTER_CALLBACKS */
} }
/* Initialize SRAM control Interface */ /* Initialize SRAM control Interface */
FMC_NORSRAM_Init(hsram->Instance, &(hsram->Init)); (void)FMC_NORSRAM_Init(hsram->Instance, &(hsram->Init));
/* Initialize SRAM timing Interface */ /* Initialize SRAM timing Interface */
FMC_NORSRAM_Timing_Init(hsram->Instance, Timing, hsram->Init.NSBank); (void)FMC_NORSRAM_Timing_Init(hsram->Instance, Timing, hsram->Init.NSBank);
/* Initialize SRAM extended mode timing Interface */ /* Initialize SRAM extended mode timing Interface */
FMC_NORSRAM_Extended_Timing_Init(hsram->Extended, ExtTiming, hsram->Init.NSBank, hsram->Init.ExtendedMode); (void)FMC_NORSRAM_Extended_Timing_Init(hsram->Extended, ExtTiming, hsram->Init.NSBank,
hsram->Init.ExtendedMode);
/* Enable the NORSRAM device */ /* Enable the NORSRAM device */
__FMC_NORSRAM_ENABLE(hsram->Instance, hsram->Init.NSBank); __FMC_NORSRAM_ENABLE(hsram->Instance, hsram->Init.NSBank);
/* Initialize the SRAM controller state */
hsram->State = HAL_SRAM_STATE_READY;
return HAL_OK; return HAL_OK;
} }
@ -215,7 +223,7 @@ HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FMC_NORSRAM_TimingTyp
HAL_StatusTypeDef HAL_SRAM_DeInit(SRAM_HandleTypeDef *hsram) HAL_StatusTypeDef HAL_SRAM_DeInit(SRAM_HandleTypeDef *hsram)
{ {
#if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1) #if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1)
if(hsram->MspDeInitCallback == NULL) if (hsram->MspDeInitCallback == NULL)
{ {
hsram->MspDeInitCallback = HAL_SRAM_MspDeInit; hsram->MspDeInitCallback = HAL_SRAM_MspDeInit;
} }
@ -225,11 +233,12 @@ HAL_StatusTypeDef HAL_SRAM_DeInit(SRAM_HandleTypeDef *hsram)
#else #else
/* De-Initialize the low level hardware (MSP) */ /* De-Initialize the low level hardware (MSP) */
HAL_SRAM_MspDeInit(hsram); HAL_SRAM_MspDeInit(hsram);
#endif #endif /* USE_HAL_SRAM_REGISTER_CALLBACKS */
/* Configure the SRAM registers with their reset values */ /* Configure the SRAM registers with their reset values */
FMC_NORSRAM_DeInit(hsram->Instance, hsram->Extended, hsram->Init.NSBank); (void)FMC_NORSRAM_DeInit(hsram->Instance, hsram->Extended, hsram->Init.NSBank);
/* Reset the SRAM controller state */
hsram->State = HAL_SRAM_STATE_RESET; hsram->State = HAL_SRAM_STATE_RESET;
/* Release Lock */ /* Release Lock */
@ -248,6 +257,7 @@ __weak void HAL_SRAM_MspInit(SRAM_HandleTypeDef *hsram)
{ {
/* Prevent unused argument(s) compilation warning */ /* Prevent unused argument(s) compilation warning */
UNUSED(hsram); UNUSED(hsram);
/* NOTE : This function Should not be modified, when the callback is needed, /* NOTE : This function Should not be modified, when the callback is needed,
the HAL_SRAM_MspInit could be implemented in the user file the HAL_SRAM_MspInit could be implemented in the user file
*/ */
@ -263,6 +273,7 @@ __weak void HAL_SRAM_MspDeInit(SRAM_HandleTypeDef *hsram)
{ {
/* Prevent unused argument(s) compilation warning */ /* Prevent unused argument(s) compilation warning */
UNUSED(hsram); UNUSED(hsram);
/* NOTE : This function Should not be modified, when the callback is needed, /* NOTE : This function Should not be modified, when the callback is needed,
the HAL_SRAM_MspDeInit could be implemented in the user file the HAL_SRAM_MspDeInit could be implemented in the user file
*/ */
@ -278,6 +289,7 @@ __weak void HAL_SRAM_DMA_XferCpltCallback(DMA_HandleTypeDef *hdma)
{ {
/* Prevent unused argument(s) compilation warning */ /* Prevent unused argument(s) compilation warning */
UNUSED(hdma); UNUSED(hdma);
/* NOTE : This function Should not be modified, when the callback is needed, /* NOTE : This function Should not be modified, when the callback is needed,
the HAL_SRAM_DMA_XferCpltCallback could be implemented in the user file the HAL_SRAM_DMA_XferCpltCallback could be implemented in the user file
*/ */
@ -293,6 +305,7 @@ __weak void HAL_SRAM_DMA_XferErrorCallback(DMA_HandleTypeDef *hdma)
{ {
/* Prevent unused argument(s) compilation warning */ /* Prevent unused argument(s) compilation warning */
UNUSED(hdma); UNUSED(hdma);
/* NOTE : This function Should not be modified, when the callback is needed, /* NOTE : This function Should not be modified, when the callback is needed,
the HAL_SRAM_DMA_XferErrorCallback could be implemented in the user file the HAL_SRAM_DMA_XferErrorCallback could be implemented in the user file
*/ */
@ -302,7 +315,7 @@ __weak void HAL_SRAM_DMA_XferErrorCallback(DMA_HandleTypeDef *hdma)
* @} * @}
*/ */
/** @defgroup SRAM_Exported_Functions_Group2 Input and Output functions /** @defgroup SRAM_Exported_Functions_Group2 Input Output and memory control functions
* @brief Input Output and memory control functions * @brief Input Output and memory control functions
* *
@verbatim @verbatim
@ -325,10 +338,17 @@ __weak void HAL_SRAM_DMA_XferErrorCallback(DMA_HandleTypeDef *hdma)
* @param BufferSize Size of the buffer to read from memory * @param BufferSize Size of the buffer to read from memory
* @retval HAL status * @retval HAL status
*/ */
HAL_StatusTypeDef HAL_SRAM_Read_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pDstBuffer, uint32_t BufferSize) HAL_StatusTypeDef HAL_SRAM_Read_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pDstBuffer,
uint32_t BufferSize)
{ {
__IO uint8_t * pSramAddress = (uint8_t *)pAddress; uint32_t size;
__IO uint8_t *psramaddress = (uint8_t *)pAddress;
uint8_t *pdestbuff = pDstBuffer;
HAL_SRAM_StateTypeDef state = hsram->State;
/* Check the SRAM controller state */
if ((state == HAL_SRAM_STATE_READY) || (state == HAL_SRAM_STATE_PROTECTED))
{
/* Process Locked */ /* Process Locked */
__HAL_LOCK(hsram); __HAL_LOCK(hsram);
@ -336,18 +356,23 @@ HAL_StatusTypeDef HAL_SRAM_Read_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress
hsram->State = HAL_SRAM_STATE_BUSY; hsram->State = HAL_SRAM_STATE_BUSY;
/* Read data from memory */ /* Read data from memory */
for(; BufferSize != 0U; BufferSize--) for (size = BufferSize; size != 0U; size--)
{ {
*pDstBuffer = *(__IO uint8_t *)pSramAddress; *pdestbuff = *psramaddress;
pDstBuffer++; pdestbuff++;
pSramAddress++; psramaddress++;
} }
/* Update the SRAM controller state */ /* Update the SRAM controller state */
hsram->State = HAL_SRAM_STATE_READY; hsram->State = state;
/* Process unlocked */ /* Process unlocked */
__HAL_UNLOCK(hsram); __HAL_UNLOCK(hsram);
}
else
{
return HAL_ERROR;
}
return HAL_OK; return HAL_OK;
} }
@ -361,16 +386,16 @@ HAL_StatusTypeDef HAL_SRAM_Read_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress
* @param BufferSize Size of the buffer to write to memory * @param BufferSize Size of the buffer to write to memory
* @retval HAL status * @retval HAL status
*/ */
HAL_StatusTypeDef HAL_SRAM_Write_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pSrcBuffer, uint32_t BufferSize) HAL_StatusTypeDef HAL_SRAM_Write_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pSrcBuffer,
uint32_t BufferSize)
{ {
__IO uint8_t * pSramAddress = (uint8_t *)pAddress; uint32_t size;
__IO uint8_t *psramaddress = (uint8_t *)pAddress;
uint8_t *psrcbuff = pSrcBuffer;
/* Check the SRAM controller state */ /* Check the SRAM controller state */
if(hsram->State == HAL_SRAM_STATE_PROTECTED) if (hsram->State == HAL_SRAM_STATE_READY)
{ {
return HAL_ERROR;
}
/* Process Locked */ /* Process Locked */
__HAL_LOCK(hsram); __HAL_LOCK(hsram);
@ -378,11 +403,11 @@ HAL_StatusTypeDef HAL_SRAM_Write_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddres
hsram->State = HAL_SRAM_STATE_BUSY; hsram->State = HAL_SRAM_STATE_BUSY;
/* Write data to memory */ /* Write data to memory */
for(; BufferSize != 0U; BufferSize--) for (size = BufferSize; size != 0U; size--)
{ {
*(__IO uint8_t *)pSramAddress = *pSrcBuffer; *psramaddress = *psrcbuff;
pSrcBuffer++; psrcbuff++;
pSramAddress++; psramaddress++;
} }
/* Update the SRAM controller state */ /* Update the SRAM controller state */
@ -390,6 +415,11 @@ HAL_StatusTypeDef HAL_SRAM_Write_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddres
/* Process unlocked */ /* Process unlocked */
__HAL_UNLOCK(hsram); __HAL_UNLOCK(hsram);
}
else
{
return HAL_ERROR;
}
return HAL_OK; return HAL_OK;
} }
@ -403,29 +433,53 @@ HAL_StatusTypeDef HAL_SRAM_Write_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddres
* @param BufferSize Size of the buffer to read from memory * @param BufferSize Size of the buffer to read from memory
* @retval HAL status * @retval HAL status
*/ */
HAL_StatusTypeDef HAL_SRAM_Read_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pDstBuffer, uint32_t BufferSize) HAL_StatusTypeDef HAL_SRAM_Read_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pDstBuffer,
uint32_t BufferSize)
{ {
__IO uint16_t * pSramAddress = (uint16_t *)pAddress; uint32_t size;
__IO uint32_t *psramaddress = pAddress;
uint16_t *pdestbuff = pDstBuffer;
uint8_t limit;
HAL_SRAM_StateTypeDef state = hsram->State;
/* Check the SRAM controller state */
if ((state == HAL_SRAM_STATE_READY) || (state == HAL_SRAM_STATE_PROTECTED))
{
/* Process Locked */ /* Process Locked */
__HAL_LOCK(hsram); __HAL_LOCK(hsram);
/* Update the SRAM controller state */ /* Update the SRAM controller state */
hsram->State = HAL_SRAM_STATE_BUSY; hsram->State = HAL_SRAM_STATE_BUSY;
/* Check if the size is a 32-bits multiple */
limit = (((BufferSize % 2U) != 0U) ? 1U : 0U);
/* Read data from memory */ /* Read data from memory */
for(; BufferSize != 0U; BufferSize--) for (size = BufferSize; size != limit; size -= 2U)
{ {
*pDstBuffer = *(__IO uint16_t *)pSramAddress; *pdestbuff = (uint16_t)((*psramaddress) & 0x0000FFFFU);
pDstBuffer++; pdestbuff++;
pSramAddress++; *pdestbuff = (uint16_t)(((*psramaddress) & 0xFFFF0000U) >> 16U);
pdestbuff++;
psramaddress++;
}
/* Read last 16-bits if size is not 32-bits multiple */
if (limit != 0U)
{
*pdestbuff = (uint16_t)((*psramaddress) & 0x0000FFFFU);
} }
/* Update the SRAM controller state */ /* Update the SRAM controller state */
hsram->State = HAL_SRAM_STATE_READY; hsram->State = state;
/* Process unlocked */ /* Process unlocked */
__HAL_UNLOCK(hsram); __HAL_UNLOCK(hsram);
}
else
{
return HAL_ERROR;
}
return HAL_OK; return HAL_OK;
} }
@ -439,28 +493,40 @@ HAL_StatusTypeDef HAL_SRAM_Read_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddres
* @param BufferSize Size of the buffer to write to memory * @param BufferSize Size of the buffer to write to memory
* @retval HAL status * @retval HAL status
*/ */
HAL_StatusTypeDef HAL_SRAM_Write_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pSrcBuffer, uint32_t BufferSize) HAL_StatusTypeDef HAL_SRAM_Write_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pSrcBuffer,
uint32_t BufferSize)
{ {
__IO uint16_t * pSramAddress = (uint16_t *)pAddress; uint32_t size;
__IO uint32_t *psramaddress = pAddress;
uint16_t *psrcbuff = pSrcBuffer;
uint8_t limit;
/* Check the SRAM controller state */ /* Check the SRAM controller state */
if(hsram->State == HAL_SRAM_STATE_PROTECTED) if (hsram->State == HAL_SRAM_STATE_READY)
{ {
return HAL_ERROR;
}
/* Process Locked */ /* Process Locked */
__HAL_LOCK(hsram); __HAL_LOCK(hsram);
/* Update the SRAM controller state */ /* Update the SRAM controller state */
hsram->State = HAL_SRAM_STATE_BUSY; hsram->State = HAL_SRAM_STATE_BUSY;
/* Check if the size is a 32-bits multiple */
limit = (((BufferSize % 2U) != 0U) ? 1U : 0U);
/* Write data to memory */ /* Write data to memory */
for(; BufferSize != 0U; BufferSize--) for (size = BufferSize; size != limit; size -= 2U)
{ {
*(__IO uint16_t *)pSramAddress = *pSrcBuffer; *psramaddress = (uint32_t)(*psrcbuff);
pSrcBuffer++; psrcbuff++;
pSramAddress++; *psramaddress |= ((uint32_t)(*psrcbuff) << 16U);
psrcbuff++;
psramaddress++;
}
/* Write last 16-bits if size is not 32-bits multiple */
if (limit != 0U)
{
*psramaddress = ((uint32_t)(*psrcbuff) & 0x0000FFFFU) | ((*psramaddress) & 0xFFFF0000U);
} }
/* Update the SRAM controller state */ /* Update the SRAM controller state */
@ -468,6 +534,11 @@ HAL_StatusTypeDef HAL_SRAM_Write_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddre
/* Process unlocked */ /* Process unlocked */
__HAL_UNLOCK(hsram); __HAL_UNLOCK(hsram);
}
else
{
return HAL_ERROR;
}
return HAL_OK; return HAL_OK;
} }
@ -481,8 +552,17 @@ HAL_StatusTypeDef HAL_SRAM_Write_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddre
* @param BufferSize Size of the buffer to read from memory * @param BufferSize Size of the buffer to read from memory
* @retval HAL status * @retval HAL status
*/ */
HAL_StatusTypeDef HAL_SRAM_Read_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize) HAL_StatusTypeDef HAL_SRAM_Read_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer,
uint32_t BufferSize)
{ {
uint32_t size;
__IO uint32_t *psramaddress = pAddress;
uint32_t *pdestbuff = pDstBuffer;
HAL_SRAM_StateTypeDef state = hsram->State;
/* Check the SRAM controller state */
if ((state == HAL_SRAM_STATE_READY) || (state == HAL_SRAM_STATE_PROTECTED))
{
/* Process Locked */ /* Process Locked */
__HAL_LOCK(hsram); __HAL_LOCK(hsram);
@ -490,18 +570,23 @@ HAL_StatusTypeDef HAL_SRAM_Read_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddres
hsram->State = HAL_SRAM_STATE_BUSY; hsram->State = HAL_SRAM_STATE_BUSY;
/* Read data from memory */ /* Read data from memory */
for(; BufferSize != 0U; BufferSize--) for (size = BufferSize; size != 0U; size--)
{ {
*pDstBuffer = *(__IO uint32_t *)pAddress; *pdestbuff = *psramaddress;
pDstBuffer++; pdestbuff++;
pAddress++; psramaddress++;
} }
/* Update the SRAM controller state */ /* Update the SRAM controller state */
hsram->State = HAL_SRAM_STATE_READY; hsram->State = state;
/* Process unlocked */ /* Process unlocked */
__HAL_UNLOCK(hsram); __HAL_UNLOCK(hsram);
}
else
{
return HAL_ERROR;
}
return HAL_OK; return HAL_OK;
} }
@ -515,14 +600,16 @@ HAL_StatusTypeDef HAL_SRAM_Read_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddres
* @param BufferSize Size of the buffer to write to memory * @param BufferSize Size of the buffer to write to memory
* @retval HAL status * @retval HAL status
*/ */
HAL_StatusTypeDef HAL_SRAM_Write_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize) HAL_StatusTypeDef HAL_SRAM_Write_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer,
uint32_t BufferSize)
{ {
/* Check the SRAM controller state */ uint32_t size;
if(hsram->State == HAL_SRAM_STATE_PROTECTED) __IO uint32_t *psramaddress = pAddress;
{ uint32_t *psrcbuff = pSrcBuffer;
return HAL_ERROR;
}
/* Check the SRAM controller state */
if (hsram->State == HAL_SRAM_STATE_READY)
{
/* Process Locked */ /* Process Locked */
__HAL_LOCK(hsram); __HAL_LOCK(hsram);
@ -530,11 +617,11 @@ HAL_StatusTypeDef HAL_SRAM_Write_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddre
hsram->State = HAL_SRAM_STATE_BUSY; hsram->State = HAL_SRAM_STATE_BUSY;
/* Write data to memory */ /* Write data to memory */
for(; BufferSize != 0U; BufferSize--) for (size = BufferSize; size != 0U; size--)
{ {
*(__IO uint32_t *)pAddress = *pSrcBuffer; *psramaddress = *psrcbuff;
pSrcBuffer++; psrcbuff++;
pAddress++; psramaddress++;
} }
/* Update the SRAM controller state */ /* Update the SRAM controller state */
@ -542,6 +629,11 @@ HAL_StatusTypeDef HAL_SRAM_Write_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddre
/* Process unlocked */ /* Process unlocked */
__HAL_UNLOCK(hsram); __HAL_UNLOCK(hsram);
}
else
{
return HAL_ERROR;
}
return HAL_OK; return HAL_OK;
} }
@ -555,8 +647,15 @@ HAL_StatusTypeDef HAL_SRAM_Write_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddre
* @param BufferSize Size of the buffer to read from memory * @param BufferSize Size of the buffer to read from memory
* @retval HAL status * @retval HAL status
*/ */
HAL_StatusTypeDef HAL_SRAM_Read_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize) HAL_StatusTypeDef HAL_SRAM_Read_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer,
uint32_t BufferSize)
{ {
HAL_StatusTypeDef status;
HAL_SRAM_StateTypeDef state = hsram->State;
/* Check the SRAM controller state */
if ((state == HAL_SRAM_STATE_READY) || (state == HAL_SRAM_STATE_PROTECTED))
{
/* Process Locked */ /* Process Locked */
__HAL_LOCK(hsram); __HAL_LOCK(hsram);
@ -564,19 +663,28 @@ HAL_StatusTypeDef HAL_SRAM_Read_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddres
hsram->State = HAL_SRAM_STATE_BUSY; hsram->State = HAL_SRAM_STATE_BUSY;
/* Configure DMA user callbacks */ /* Configure DMA user callbacks */
hsram->hdma->XferCpltCallback = HAL_SRAM_DMA_XferCpltCallback; if (state == HAL_SRAM_STATE_READY)
hsram->hdma->XferErrorCallback = HAL_SRAM_DMA_XferErrorCallback; {
hsram->hdma->XferCpltCallback = SRAM_DMACplt;
}
else
{
hsram->hdma->XferCpltCallback = SRAM_DMACpltProt;
}
hsram->hdma->XferErrorCallback = SRAM_DMAError;
/* Enable the DMA Stream */ /* Enable the DMA Stream */
HAL_DMA_Start_IT(hsram->hdma, (uint32_t)pAddress, (uint32_t)pDstBuffer, (uint32_t)BufferSize); status = HAL_DMA_Start_IT(hsram->hdma, (uint32_t)pAddress, (uint32_t)pDstBuffer, (uint32_t)BufferSize);
/* Update the SRAM controller state */
hsram->State = HAL_SRAM_STATE_READY;
/* Process unlocked */ /* Process unlocked */
__HAL_UNLOCK(hsram); __HAL_UNLOCK(hsram);
}
else
{
status = HAL_ERROR;
}
return HAL_OK; return status;
} }
/** /**
@ -588,14 +696,14 @@ HAL_StatusTypeDef HAL_SRAM_Read_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddres
* @param BufferSize Size of the buffer to write to memory * @param BufferSize Size of the buffer to write to memory
* @retval HAL status * @retval HAL status
*/ */
HAL_StatusTypeDef HAL_SRAM_Write_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize) HAL_StatusTypeDef HAL_SRAM_Write_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer,
uint32_t BufferSize)
{ {
/* Check the SRAM controller state */ HAL_StatusTypeDef status;
if(hsram->State == HAL_SRAM_STATE_PROTECTED)
{
return HAL_ERROR;
}
/* Check the SRAM controller state */
if (hsram->State == HAL_SRAM_STATE_READY)
{
/* Process Locked */ /* Process Locked */
__HAL_LOCK(hsram); __HAL_LOCK(hsram);
@ -603,19 +711,21 @@ HAL_StatusTypeDef HAL_SRAM_Write_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddre
hsram->State = HAL_SRAM_STATE_BUSY; hsram->State = HAL_SRAM_STATE_BUSY;
/* Configure DMA user callbacks */ /* Configure DMA user callbacks */
hsram->hdma->XferCpltCallback = HAL_SRAM_DMA_XferCpltCallback; hsram->hdma->XferCpltCallback = SRAM_DMACplt;
hsram->hdma->XferErrorCallback = HAL_SRAM_DMA_XferErrorCallback; hsram->hdma->XferErrorCallback = SRAM_DMAError;
/* Enable the DMA Stream */ /* Enable the DMA Stream */
HAL_DMA_Start_IT(hsram->hdma, (uint32_t)pSrcBuffer, (uint32_t)pAddress, (uint32_t)BufferSize); status = HAL_DMA_Start_IT(hsram->hdma, (uint32_t)pSrcBuffer, (uint32_t)pAddress, (uint32_t)BufferSize);
/* Update the SRAM controller state */
hsram->State = HAL_SRAM_STATE_READY;
/* Process unlocked */ /* Process unlocked */
__HAL_UNLOCK(hsram); __HAL_UNLOCK(hsram);
}
else
{
status = HAL_ERROR;
}
return HAL_OK; return status;
} }
#if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1) #if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1)
@ -630,12 +740,13 @@ HAL_StatusTypeDef HAL_SRAM_Write_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddre
* @param pCallback : pointer to the Callback function * @param pCallback : pointer to the Callback function
* @retval status * @retval status
*/ */
HAL_StatusTypeDef HAL_SRAM_RegisterCallback (SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId, pSRAM_CallbackTypeDef pCallback) HAL_StatusTypeDef HAL_SRAM_RegisterCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId,
pSRAM_CallbackTypeDef pCallback)
{ {
HAL_StatusTypeDef status = HAL_OK; HAL_StatusTypeDef status = HAL_OK;
HAL_SRAM_StateTypeDef state; HAL_SRAM_StateTypeDef state;
if(pCallback == NULL) if (pCallback == NULL)
{ {
return HAL_ERROR; return HAL_ERROR;
} }
@ -644,7 +755,7 @@ HAL_StatusTypeDef HAL_SRAM_RegisterCallback (SRAM_HandleTypeDef *hsram, HAL_SRAM
__HAL_LOCK(hsram); __HAL_LOCK(hsram);
state = hsram->State; state = hsram->State;
if((state == HAL_SRAM_STATE_READY) || (state == HAL_SRAM_STATE_RESET) || (state == HAL_SRAM_STATE_PROTECTED)) if ((state == HAL_SRAM_STATE_READY) || (state == HAL_SRAM_STATE_RESET) || (state == HAL_SRAM_STATE_PROTECTED))
{ {
switch (CallbackId) switch (CallbackId)
{ {
@ -683,7 +794,7 @@ HAL_StatusTypeDef HAL_SRAM_RegisterCallback (SRAM_HandleTypeDef *hsram, HAL_SRAM
* @arg @ref HAL_SRAM_DMA_XFER_ERR_CB_ID SRAM DMA Xfer Error callback ID * @arg @ref HAL_SRAM_DMA_XFER_ERR_CB_ID SRAM DMA Xfer Error callback ID
* @retval status * @retval status
*/ */
HAL_StatusTypeDef HAL_SRAM_UnRegisterCallback (SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId) HAL_StatusTypeDef HAL_SRAM_UnRegisterCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId)
{ {
HAL_StatusTypeDef status = HAL_OK; HAL_StatusTypeDef status = HAL_OK;
HAL_SRAM_StateTypeDef state; HAL_SRAM_StateTypeDef state;
@ -692,7 +803,7 @@ HAL_StatusTypeDef HAL_SRAM_UnRegisterCallback (SRAM_HandleTypeDef *hsram, HAL_SR
__HAL_LOCK(hsram); __HAL_LOCK(hsram);
state = hsram->State; state = hsram->State;
if((state == HAL_SRAM_STATE_READY) || (state == HAL_SRAM_STATE_PROTECTED)) if ((state == HAL_SRAM_STATE_READY) || (state == HAL_SRAM_STATE_PROTECTED))
{ {
switch (CallbackId) switch (CallbackId)
{ {
@ -714,7 +825,7 @@ HAL_StatusTypeDef HAL_SRAM_UnRegisterCallback (SRAM_HandleTypeDef *hsram, HAL_SR
break; break;
} }
} }
else if(state == HAL_SRAM_STATE_RESET) else if (state == HAL_SRAM_STATE_RESET)
{ {
switch (CallbackId) switch (CallbackId)
{ {
@ -752,12 +863,13 @@ HAL_StatusTypeDef HAL_SRAM_UnRegisterCallback (SRAM_HandleTypeDef *hsram, HAL_SR
* @param pCallback : pointer to the Callback function * @param pCallback : pointer to the Callback function
* @retval status * @retval status
*/ */
HAL_StatusTypeDef HAL_SRAM_RegisterDmaCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId, pSRAM_DmaCallbackTypeDef pCallback) HAL_StatusTypeDef HAL_SRAM_RegisterDmaCallback(SRAM_HandleTypeDef *hsram, HAL_SRAM_CallbackIDTypeDef CallbackId,
pSRAM_DmaCallbackTypeDef pCallback)
{ {
HAL_StatusTypeDef status = HAL_OK; HAL_StatusTypeDef status = HAL_OK;
HAL_SRAM_StateTypeDef state; HAL_SRAM_StateTypeDef state;
if(pCallback == NULL) if (pCallback == NULL)
{ {
return HAL_ERROR; return HAL_ERROR;
} }
@ -766,7 +878,7 @@ HAL_StatusTypeDef HAL_SRAM_RegisterDmaCallback(SRAM_HandleTypeDef *hsram, HAL_SR
__HAL_LOCK(hsram); __HAL_LOCK(hsram);
state = hsram->State; state = hsram->State;
if((state == HAL_SRAM_STATE_READY) || (state == HAL_SRAM_STATE_PROTECTED)) if ((state == HAL_SRAM_STATE_READY) || (state == HAL_SRAM_STATE_PROTECTED))
{ {
switch (CallbackId) switch (CallbackId)
{ {
@ -792,13 +904,14 @@ HAL_StatusTypeDef HAL_SRAM_RegisterDmaCallback(SRAM_HandleTypeDef *hsram, HAL_SR
__HAL_UNLOCK(hsram); __HAL_UNLOCK(hsram);
return status; return status;
} }
#endif #endif /* USE_HAL_SRAM_REGISTER_CALLBACKS */
/** /**
* @} * @}
*/ */
/** @defgroup SRAM_Exported_Functions_Group3 Control functions /** @defgroup SRAM_Exported_Functions_Group3 Control functions
* @brief management functions * @brief Control functions
* *
@verbatim @verbatim
============================================================================== ==============================================================================
@ -820,17 +933,28 @@ HAL_StatusTypeDef HAL_SRAM_RegisterDmaCallback(SRAM_HandleTypeDef *hsram, HAL_SR
*/ */
HAL_StatusTypeDef HAL_SRAM_WriteOperation_Enable(SRAM_HandleTypeDef *hsram) HAL_StatusTypeDef HAL_SRAM_WriteOperation_Enable(SRAM_HandleTypeDef *hsram)
{ {
/* Check the SRAM controller state */
if (hsram->State == HAL_SRAM_STATE_PROTECTED)
{
/* Process Locked */ /* Process Locked */
__HAL_LOCK(hsram); __HAL_LOCK(hsram);
/* Update the SRAM controller state */
hsram->State = HAL_SRAM_STATE_BUSY;
/* Enable write operation */ /* Enable write operation */
FMC_NORSRAM_WriteOperation_Enable(hsram->Instance, hsram->Init.NSBank); (void)FMC_NORSRAM_WriteOperation_Enable(hsram->Instance, hsram->Init.NSBank);
/* Update the SRAM controller state */ /* Update the SRAM controller state */
hsram->State = HAL_SRAM_STATE_READY; hsram->State = HAL_SRAM_STATE_READY;
/* Process unlocked */ /* Process unlocked */
__HAL_UNLOCK(hsram); __HAL_UNLOCK(hsram);
}
else
{
return HAL_ERROR;
}
return HAL_OK; return HAL_OK;
} }
@ -843,6 +967,9 @@ HAL_StatusTypeDef HAL_SRAM_WriteOperation_Enable(SRAM_HandleTypeDef *hsram)
*/ */
HAL_StatusTypeDef HAL_SRAM_WriteOperation_Disable(SRAM_HandleTypeDef *hsram) HAL_StatusTypeDef HAL_SRAM_WriteOperation_Disable(SRAM_HandleTypeDef *hsram)
{ {
/* Check the SRAM controller state */
if (hsram->State == HAL_SRAM_STATE_READY)
{
/* Process Locked */ /* Process Locked */
__HAL_LOCK(hsram); __HAL_LOCK(hsram);
@ -850,13 +977,18 @@ HAL_StatusTypeDef HAL_SRAM_WriteOperation_Disable(SRAM_HandleTypeDef *hsram)
hsram->State = HAL_SRAM_STATE_BUSY; hsram->State = HAL_SRAM_STATE_BUSY;
/* Disable write operation */ /* Disable write operation */
FMC_NORSRAM_WriteOperation_Disable(hsram->Instance, hsram->Init.NSBank); (void)FMC_NORSRAM_WriteOperation_Disable(hsram->Instance, hsram->Init.NSBank);
/* Update the SRAM controller state */ /* Update the SRAM controller state */
hsram->State = HAL_SRAM_STATE_PROTECTED; hsram->State = HAL_SRAM_STATE_PROTECTED;
/* Process unlocked */ /* Process unlocked */
__HAL_UNLOCK(hsram); __HAL_UNLOCK(hsram);
}
else
{
return HAL_ERROR;
}
return HAL_OK; return HAL_OK;
} }
@ -865,7 +997,7 @@ HAL_StatusTypeDef HAL_SRAM_WriteOperation_Disable(SRAM_HandleTypeDef *hsram)
* @} * @}
*/ */
/** @defgroup SRAM_Exported_Functions_Group4 State functions /** @defgroup SRAM_Exported_Functions_Group4 Peripheral State functions
* @brief Peripheral State functions * @brief Peripheral State functions
* *
@verbatim @verbatim
@ -890,6 +1022,7 @@ HAL_SRAM_StateTypeDef HAL_SRAM_GetState(SRAM_HandleTypeDef *hsram)
{ {
return hsram->State; return hsram->State;
} }
/** /**
* @} * @}
*/ */
@ -897,16 +1030,81 @@ HAL_SRAM_StateTypeDef HAL_SRAM_GetState(SRAM_HandleTypeDef *hsram)
/** /**
* @} * @}
*/ */
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx || STM32F412Zx ||\ /**
STM32F412Vx || STM32F412Rx || STM32F412Cx || STM32F413xx || STM32F423xx */ * @brief DMA SRAM process complete callback.
* @param hdma : DMA handle
* @retval None
*/
static void SRAM_DMACplt(DMA_HandleTypeDef *hdma)
{
SRAM_HandleTypeDef *hsram = (SRAM_HandleTypeDef *)(hdma->Parent);
/* Disable the DMA channel */
__HAL_DMA_DISABLE(hdma);
/* Update the SRAM controller state */
hsram->State = HAL_SRAM_STATE_READY;
#if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1)
hsram->DmaXferCpltCallback(hdma);
#else
HAL_SRAM_DMA_XferCpltCallback(hdma);
#endif /* USE_HAL_SRAM_REGISTER_CALLBACKS */
}
/**
* @brief DMA SRAM process complete callback.
* @param hdma : DMA handle
* @retval None
*/
static void SRAM_DMACpltProt(DMA_HandleTypeDef *hdma)
{
SRAM_HandleTypeDef *hsram = (SRAM_HandleTypeDef *)(hdma->Parent);
/* Disable the DMA channel */
__HAL_DMA_DISABLE(hdma);
/* Update the SRAM controller state */
hsram->State = HAL_SRAM_STATE_PROTECTED;
#if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1)
hsram->DmaXferCpltCallback(hdma);
#else
HAL_SRAM_DMA_XferCpltCallback(hdma);
#endif /* USE_HAL_SRAM_REGISTER_CALLBACKS */
}
/**
* @brief DMA SRAM error callback.
* @param hdma : DMA handle
* @retval None
*/
static void SRAM_DMAError(DMA_HandleTypeDef *hdma)
{
SRAM_HandleTypeDef *hsram = (SRAM_HandleTypeDef *)(hdma->Parent);
/* Disable the DMA channel */
__HAL_DMA_DISABLE(hdma);
/* Update the SRAM controller state */
hsram->State = HAL_SRAM_STATE_ERROR;
#if (USE_HAL_SRAM_REGISTER_CALLBACKS == 1)
hsram->DmaXferErrorCallback(hdma);
#else
HAL_SRAM_DMA_XferErrorCallback(hdma);
#endif /* USE_HAL_SRAM_REGISTER_CALLBACKS */
}
/**
* @}
*/
#endif /* HAL_SRAM_MODULE_ENABLED */ #endif /* HAL_SRAM_MODULE_ENABLED */
/**
* @}
*/
/** /**
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ #endif /* FMC_Bank1 || FSMC_Bank1 */

View file

@ -29,6 +29,17 @@
* + Commutation Event configuration with Interruption and DMA * + Commutation Event configuration with Interruption and DMA
* + TIM OCRef clear configuration * + TIM OCRef clear configuration
* + TIM External Clock configuration * + TIM External Clock configuration
******************************************************************************
* @attention
*
* Copyright (c) 2016 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
@verbatim @verbatim
============================================================================== ==============================================================================
##### TIMER Generic features ##### ##### TIMER Generic features #####
@ -169,17 +180,6 @@ all interrupt callbacks are set to the corresponding weak functions:
@endverbatim @endverbatim
****************************************************************************** ******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/ */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
@ -4470,13 +4470,11 @@ HAL_StatusTypeDef HAL_TIM_OnePulse_ConfigChannel(TIM_HandleTypeDef *htim, TIM_O
HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress, HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
uint32_t BurstRequestSrc, uint32_t *BurstBuffer, uint32_t BurstLength) uint32_t BurstRequestSrc, uint32_t *BurstBuffer, uint32_t BurstLength)
{ {
HAL_StatusTypeDef status = HAL_OK; HAL_StatusTypeDef status;
if (status == HAL_OK)
{
status = HAL_TIM_DMABurst_MultiWriteStart(htim, BurstBaseAddress, BurstRequestSrc, BurstBuffer, BurstLength, status = HAL_TIM_DMABurst_MultiWriteStart(htim, BurstBaseAddress, BurstRequestSrc, BurstBuffer, BurstLength,
((BurstLength) >> 8U) + 1U); ((BurstLength) >> 8U) + 1U);
}
return status; return status;
@ -4809,13 +4807,11 @@ HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStop(TIM_HandleTypeDef *htim, uint32_t B
HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress, HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
uint32_t BurstRequestSrc, uint32_t *BurstBuffer, uint32_t BurstLength) uint32_t BurstRequestSrc, uint32_t *BurstBuffer, uint32_t BurstLength)
{ {
HAL_StatusTypeDef status = HAL_OK; HAL_StatusTypeDef status;
if (status == HAL_OK)
{
status = HAL_TIM_DMABurst_MultiReadStart(htim, BurstBaseAddress, BurstRequestSrc, BurstBuffer, BurstLength, status = HAL_TIM_DMABurst_MultiReadStart(htim, BurstBaseAddress, BurstRequestSrc, BurstBuffer, BurstLength,
((BurstLength) >> 8U) + 1U); ((BurstLength) >> 8U) + 1U);
}
return status; return status;
} }
@ -7623,4 +7619,3 @@ void TIM_ResetCallback(TIM_HandleTypeDef *htim)
/** /**
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -10,6 +10,17 @@
* + Time Complementary signal break and dead time configuration * + Time Complementary signal break and dead time configuration
* + Time Master and Slave synchronization configuration * + Time Master and Slave synchronization configuration
* + Timer remapping capabilities configuration * + Timer remapping capabilities configuration
******************************************************************************
* @attention
*
* Copyright (c) 2016 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
@verbatim @verbatim
============================================================================== ==============================================================================
##### TIMER Extended features ##### ##### TIMER Extended features #####
@ -64,17 +75,6 @@
@endverbatim @endverbatim
****************************************************************************** ******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/ */
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
@ -2098,11 +2098,12 @@ HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim,
*/ */
HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap) HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap)
{ {
__HAL_LOCK(htim);
/* Check parameters */ /* Check parameters */
assert_param(IS_TIM_REMAP(htim->Instance, Remap)); assert_param(IS_TIM_REMAP(htim->Instance, Remap));
__HAL_LOCK(htim);
#if defined(LPTIM_OR_TIM1_ITR2_RMP) && defined(LPTIM_OR_TIM5_ITR1_RMP) && defined(LPTIM_OR_TIM9_ITR1_RMP) #if defined(LPTIM_OR_TIM1_ITR2_RMP) && defined(LPTIM_OR_TIM5_ITR1_RMP) && defined(LPTIM_OR_TIM9_ITR1_RMP)
if ((Remap & LPTIM_REMAP_MASK) == LPTIM_REMAP_MASK) if ((Remap & LPTIM_REMAP_MASK) == LPTIM_REMAP_MASK)
{ {
@ -2249,7 +2250,7 @@ HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(TIM_HandleTypeDef *htim,
*/ */
/* Private functions ---------------------------------------------------------*/ /* Private functions ---------------------------------------------------------*/
/** @defgroup TIMEx_Private_Functions TIMEx Private Functions /** @defgroup TIMEx_Private_Functions TIM Extended Private Functions
* @{ * @{
*/ */
@ -2425,5 +2426,3 @@ static void TIM_CCxNChannelCmd(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Cha
/** /**
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics. * Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -26,7 +25,7 @@
#include "stm32_assert.h" #include "stm32_assert.h"
#else #else
#define assert_param(expr) ((void)0U) #define assert_param(expr) ((void)0U)
#endif/* USE_FULL_ASSERT */ #endif /* USE_FULL_ASSERT */
/** @addtogroup STM32F4xx_LL_Driver /** @addtogroup STM32F4xx_LL_Driver
* @{ * @{
@ -102,6 +101,3 @@ ErrorStatus LL_CRC_DeInit(CRC_TypeDef *CRCx)
*/ */
#endif /* USE_FULL_LL_DRIVER */ #endif /* USE_FULL_LL_DRIVER */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file in
* the "License"; You may not use this file except in compliance with the * the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -422,4 +421,3 @@ void LL_DMA_StructInit(LL_DMA_InitTypeDef *DMA_InitStruct)
#endif /* USE_FULL_LL_DRIVER */ #endif /* USE_FULL_LL_DRIVER */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics. * Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.Clause
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -211,4 +210,3 @@ void LL_EXTI_StructInit(LL_EXTI_InitTypeDef *EXTI_InitStruct)
#endif /* USE_FULL_LL_DRIVER */ #endif /* USE_FULL_LL_DRIVER */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

File diff suppressed because it is too large Load diff

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -302,4 +301,3 @@ void LL_GPIO_StructInit(LL_GPIO_InitTypeDef *GPIO_InitStruct)
#endif /* USE_FULL_LL_DRIVER */ #endif /* USE_FULL_LL_DRIVER */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,14 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
* *
* This software is licensed under terms that can be found in the LICENSE file in
* the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
****************************************************************************** ******************************************************************************
*/ */
#if defined(USE_FULL_LL_DRIVER) #if defined(USE_FULL_LL_DRIVER)
@ -1660,4 +1658,3 @@ uint32_t RCC_PLLI2S_GetFreqDomain_48M(void)
#endif /* USE_FULL_LL_DRIVER */ #endif /* USE_FULL_LL_DRIVER */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics. * Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -623,4 +622,3 @@ ErrorStatus LL_I2S_InitFullDuplex(SPI_TypeDef *I2Sxext, LL_I2S_InitTypeDef *I2S
#endif /* USE_FULL_LL_DRIVER */ #endif /* USE_FULL_LL_DRIVER */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics. * Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -498,5 +497,4 @@ void LL_USART_ClockStructInit(LL_USART_ClockInitTypeDef *USART_ClockInitStruct)
#endif /* USE_FULL_LL_DRIVER */ #endif /* USE_FULL_LL_DRIVER */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -6,13 +6,12 @@
****************************************************************************** ******************************************************************************
* @attention * @attention
* *
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics. * Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2> * All rights reserved.
* *
* This software component is licensed by ST under BSD 3-Clause license, * This software is licensed under terms that can be found in the LICENSE file
* the "License"; You may not use this file except in compliance with the * in the root directory of this software component.
* License. You may obtain a copy of the License at: * If no LICENSE file comes with this software, it is provided AS-IS.
* opensource.org/licenses/BSD-3-Clause
* *
****************************************************************************** ******************************************************************************
*/ */
@ -748,5 +747,3 @@ static ErrorStatus UTILS_EnablePLLAndSwitchSystem(uint32_t SYSCLK_Frequency, LL_
/** /**
* @} * @}
*/ */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View file

@ -0,0 +1,18 @@
Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -26,7 +26,7 @@ public:
char buffer[bufSize]; char buffer[bufSize];
}; };
struct ISerialConsoleCallback { struct ISerialConsoleCallback { // these will be called from interrupt context
virtual void LineReceived(void *userParam, Buffer *buffer) = 0; virtual void LineReceived(void *userParam, Buffer *buffer) = 0;
virtual void TransmissionComplete(void *userParam, Buffer *buffer) = 0; virtual void TransmissionComplete(void *userParam, Buffer *buffer) = 0;
}; };

View file

@ -47,7 +47,9 @@ FSMC.BusTurnAroundDuration1=0
FSMC.DataSetupTime1=4 FSMC.DataSetupTime1=4
FSMC.IPParameters=DataSetupTime1,AddressSetupTime1,BusTurnAroundDuration1 FSMC.IPParameters=DataSetupTime1,AddressSetupTime1,BusTurnAroundDuration1
File.Version=6 File.Version=6
GPIO.groupedBy=Group By Peripherals
KeepUserPlacement=false KeepUserPlacement=false
Mcu.CPN=STM32F407VET6
Mcu.Family=STM32F4 Mcu.Family=STM32F4
Mcu.IP0=CRC Mcu.IP0=CRC
Mcu.IP1=DMA Mcu.IP1=DMA
@ -106,29 +108,30 @@ Mcu.PinsNb=41
Mcu.ThirdPartyNb=0 Mcu.ThirdPartyNb=0
Mcu.UserConstants= Mcu.UserConstants=
Mcu.UserName=STM32F407VETx Mcu.UserName=STM32F407VETx
MxCube.Version=6.3.0 MxCube.Version=6.6.1
MxDb.Version=DB.6.0.30 MxDb.Version=DB.6.0.60
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
NVIC.DMA2_Stream2_IRQn=true\:5\:0\:false\:false\:true\:false\:false\:true NVIC.DMA2_Stream2_IRQn=true\:5\:0\:false\:false\:true\:false\:false\:true\:true
NVIC.DMA2_Stream4_IRQn=true\:5\:0\:false\:false\:true\:false\:true\:true NVIC.DMA2_Stream4_IRQn=true\:5\:0\:false\:false\:true\:false\:true\:true\:true
NVIC.DMA2_Stream7_IRQn=true\:5\:0\:false\:false\:true\:false\:false\:true NVIC.DMA2_Stream7_IRQn=true\:5\:0\:false\:false\:true\:false\:false\:true\:true
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
NVIC.EXTI9_5_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true
NVIC.ForceEnableDMAVector=true NVIC.ForceEnableDMAVector=true
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
NVIC.PendSV_IRQn=true\:15\:0\:false\:false\:false\:false\:false\:false NVIC.PendSV_IRQn=true\:15\:0\:false\:false\:false\:false\:false\:false\:false
NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:false\:false\:false\:false NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:false\:false\:false\:false\:false
NVIC.SavedPendsvIrqHandlerGenerated=true NVIC.SavedPendsvIrqHandlerGenerated=true
NVIC.SavedSvcallIrqHandlerGenerated=true NVIC.SavedSvcallIrqHandlerGenerated=true
NVIC.SavedSystickIrqHandlerGenerated=true NVIC.SavedSystickIrqHandlerGenerated=true
NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:false\:false\:false\:false NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:false\:false\:false\:false\:false
NVIC.TIM6_DAC_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true NVIC.TIM6_DAC_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true\:true
NVIC.TimeBase=TIM6_DAC_IRQn NVIC.TimeBase=TIM6_DAC_IRQn
NVIC.TimeBaseIP=TIM6 NVIC.TimeBaseIP=TIM6
NVIC.USART1_IRQn=true\:5\:0\:false\:false\:true\:false\:true\:true NVIC.USART1_IRQn=true\:5\:0\:false\:false\:true\:false\:true\:true\:true
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
PA10.Mode=Asynchronous PA10.Mode=Asynchronous
PA10.Signal=USART1_RX PA10.Signal=USART1_RX
PA13.Mode=JTAG_5_pins PA13.Mode=JTAG_5_pins
@ -168,7 +171,7 @@ PB4.Signal=SYS_JTRST
PC5.GPIOParameters=GPIO_Label PC5.GPIOParameters=GPIO_Label
PC5.GPIO_Label=PENIRQ PC5.GPIO_Label=PENIRQ
PC5.Locked=true PC5.Locked=true
PC5.Signal=GPIO_Input PC5.Signal=GPXTI5
PD0.Mode=16b-d1 PD0.Mode=16b-d1
PD0.Signal=FSMC_D2 PD0.Signal=FSMC_D2
PD1.Mode=16b-d1 PD1.Mode=16b-d1
@ -231,7 +234,7 @@ ProjectManager.CustomerFirmwarePackage=
ProjectManager.DefaultFWLocation=true ProjectManager.DefaultFWLocation=true
ProjectManager.DeletePrevious=true ProjectManager.DeletePrevious=true
ProjectManager.DeviceId=STM32F407VETx ProjectManager.DeviceId=STM32F407VETx
ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.26.2 ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.27.1
ProjectManager.FreePins=false ProjectManager.FreePins=false
ProjectManager.HalAssertFull=false ProjectManager.HalAssertFull=false
ProjectManager.HeapSize=0x200 ProjectManager.HeapSize=0x200
@ -283,6 +286,8 @@ RCC.VCOI2SOutputFreq_Value=384000000
RCC.VCOInputFreq_Value=2000000 RCC.VCOInputFreq_Value=2000000
RCC.VCOOutputFreq_Value=336000000 RCC.VCOOutputFreq_Value=336000000
RCC.VcooutputI2S=192000000 RCC.VcooutputI2S=192000000
SH.GPXTI5.0=GPIO_EXTI5
SH.GPXTI5.ConfNb=1
SPI2.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_64 SPI2.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_64
SPI2.CalculateBaudRate=656.25 KBits/s SPI2.CalculateBaudRate=656.25 KBits/s
SPI2.Direction=SPI_DIRECTION_2LINES SPI2.Direction=SPI_DIRECTION_2LINES