更新SD读写,用DMA失败
This commit is contained in:
parent
587e9158f2
commit
0988d478e0
30
.mxproject
30
.mxproject
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "windows-gcc-x64",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/**"
|
||||||
|
],
|
||||||
|
"compilerPath": "C:/TDM-GCC-64/bin/gcc.exe",
|
||||||
|
"cStandard": "${default}",
|
||||||
|
"cppStandard": "${default}",
|
||||||
|
"intelliSenseMode": "windows-gcc-x64",
|
||||||
|
"compilerArgs": [
|
||||||
|
""
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": 4
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "C/C++ Runner: Debug Session",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"args": [],
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": true,
|
||||||
|
"cwd": "e:/work/stm32/study/freertos_f407/Core/Src",
|
||||||
|
"program": "e:/work/stm32/study/freertos_f407/Core/Src/build/Debug/outDebug",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"miDebuggerPath": "gdb",
|
||||||
|
"setupCommands": [
|
||||||
|
{
|
||||||
|
"description": "Enable pretty-printing for gdb",
|
||||||
|
"text": "-enable-pretty-printing",
|
||||||
|
"ignoreFailures": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file dma.h
|
||||||
|
* @brief This file contains all the function prototypes for
|
||||||
|
* the dma.c file
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __DMA_H__
|
||||||
|
#define __DMA_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
/* DMA memory to memory transfer handles -------------------------------------*/
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
|
|
||||||
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Private defines */
|
||||||
|
|
||||||
|
/* USER CODE END Private defines */
|
||||||
|
|
||||||
|
void MX_DMA_Init(void);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Prototypes */
|
||||||
|
|
||||||
|
/* USER CODE END Prototypes */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __DMA_H__ */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file sdio.h
|
||||||
|
* @brief This file contains all the function prototypes for
|
||||||
|
* the sdio.c file
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __SDIO_H__
|
||||||
|
#define __SDIO_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
|
|
||||||
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
extern SD_HandleTypeDef hsd;
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Private defines */
|
||||||
|
|
||||||
|
/* USER CODE END Private defines */
|
||||||
|
|
||||||
|
void MX_SDIO_SD_Init(void);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Prototypes */
|
||||||
|
|
||||||
|
/* USER CODE END Prototypes */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __SDIO_H__ */
|
||||||
|
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
/* #define HAL_RNG_MODULE_ENABLED */
|
/* #define HAL_RNG_MODULE_ENABLED */
|
||||||
#define HAL_RTC_MODULE_ENABLED
|
#define HAL_RTC_MODULE_ENABLED
|
||||||
/* #define HAL_SAI_MODULE_ENABLED */
|
/* #define HAL_SAI_MODULE_ENABLED */
|
||||||
/* #define HAL_SD_MODULE_ENABLED */
|
#define HAL_SD_MODULE_ENABLED
|
||||||
/* #define HAL_MMC_MODULE_ENABLED */
|
/* #define HAL_MMC_MODULE_ENABLED */
|
||||||
/* #define HAL_SPI_MODULE_ENABLED */
|
/* #define HAL_SPI_MODULE_ENABLED */
|
||||||
#define HAL_TIM_MODULE_ENABLED
|
#define HAL_TIM_MODULE_ENABLED
|
||||||
|
|
@ -214,7 +214,7 @@
|
||||||
#define MAC_ADDR5 0U
|
#define MAC_ADDR5 0U
|
||||||
|
|
||||||
/* Definition of the Ethernet driver buffers size and count */
|
/* Definition of the Ethernet driver buffers size and count */
|
||||||
#define ETH_RX_BUF_SIZE /* buffer size for receive */
|
#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
|
||||||
#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
|
#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
|
||||||
#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */
|
#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */
|
||||||
#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */
|
#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,8 @@ void BusFault_Handler(void);
|
||||||
void UsageFault_Handler(void);
|
void UsageFault_Handler(void);
|
||||||
void DebugMon_Handler(void);
|
void DebugMon_Handler(void);
|
||||||
void TIM6_DAC_IRQHandler(void);
|
void TIM6_DAC_IRQHandler(void);
|
||||||
|
void DMA2_Stream3_IRQHandler(void);
|
||||||
|
void DMA2_Stream6_IRQHandler(void);
|
||||||
/* USER CODE BEGIN EFP */
|
/* USER CODE BEGIN EFP */
|
||||||
|
|
||||||
/* USER CODE END EFP */
|
/* USER CODE END EFP */
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file dma.c
|
||||||
|
* @brief This file provides code for the configuration
|
||||||
|
* of all the requested memory to memory DMA transfers.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "dma.h"
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 0 */
|
||||||
|
|
||||||
|
/* USER CODE END 0 */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------*/
|
||||||
|
/* Configure DMA */
|
||||||
|
/*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
|
/* USER CODE END 1 */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable DMA controller clock
|
||||||
|
*/
|
||||||
|
void MX_DMA_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* DMA controller clock enable */
|
||||||
|
__HAL_RCC_DMA2_CLK_ENABLE();
|
||||||
|
|
||||||
|
/* DMA interrupt init */
|
||||||
|
/* DMA2_Stream3_IRQn interrupt configuration */
|
||||||
|
HAL_NVIC_SetPriority(DMA2_Stream3_IRQn, 15, 0);
|
||||||
|
HAL_NVIC_EnableIRQ(DMA2_Stream3_IRQn);
|
||||||
|
/* DMA2_Stream6_IRQn interrupt configuration */
|
||||||
|
HAL_NVIC_SetPriority(DMA2_Stream6_IRQn, 15, 0);
|
||||||
|
HAL_NVIC_EnableIRQ(DMA2_Stream6_IRQn);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 2 */
|
||||||
|
|
||||||
|
/* USER CODE END 2 */
|
||||||
|
|
||||||
|
|
@ -71,7 +71,7 @@ void MX_GPIO_Init(void)
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pin : PtPin */
|
/*Configure GPIO pin : LED_USER_Pin */
|
||||||
GPIO_InitStruct.Pin = LED_USER_Pin;
|
GPIO_InitStruct.Pin = LED_USER_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
|
@ -91,13 +91,9 @@ void MX_GPIO_Init(void)
|
||||||
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pins : PC0 PC1 PC2 PC3
|
/*Configure GPIO pins : PC0 PC1 PC2 PC3
|
||||||
PC4 PC5 PC6 PC7
|
PC4 PC5 PC6 PC7 */
|
||||||
PC8 PC9 PC10 PC11
|
|
||||||
PC12 */
|
|
||||||
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
|
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
|
||||||
|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7
|
|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7;
|
||||||
|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11
|
|
||||||
|GPIO_PIN_12;
|
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||||
|
|
@ -140,12 +136,12 @@ void MX_GPIO_Init(void)
|
||||||
|
|
||||||
/*Configure GPIO pins : PD8 PD9 PD10 PD11
|
/*Configure GPIO pins : PD8 PD9 PD10 PD11
|
||||||
PD12 PD13 PD14 PD15
|
PD12 PD13 PD14 PD15
|
||||||
PD0 PD1 PD2 PD3
|
PD0 PD1 PD3 PD4
|
||||||
PD4 PD5 PD6 PD7 */
|
PD5 PD6 PD7 */
|
||||||
GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11
|
GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11
|
||||||
|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15
|
|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15
|
||||||
|GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
|
|GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_3|GPIO_PIN_4
|
||||||
|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7;
|
|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,9 @@
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "cmsis_os.h"
|
#include "cmsis_os.h"
|
||||||
|
#include "dma.h"
|
||||||
#include "rtc.h"
|
#include "rtc.h"
|
||||||
|
#include "sdio.h"
|
||||||
#include "gpio.h"
|
#include "gpio.h"
|
||||||
|
|
||||||
/* Private includes ----------------------------------------------------------*/
|
/* Private includes ----------------------------------------------------------*/
|
||||||
|
|
@ -67,6 +69,7 @@ void MX_FREERTOS_Init(void);
|
||||||
*/
|
*/
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* USER CODE BEGIN 1 */
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
/* USER CODE END 1 */
|
/* USER CODE END 1 */
|
||||||
|
|
@ -89,19 +92,22 @@ int main(void)
|
||||||
|
|
||||||
/* Initialize all configured peripherals */
|
/* Initialize all configured peripherals */
|
||||||
MX_GPIO_Init();
|
MX_GPIO_Init();
|
||||||
|
MX_DMA_Init();
|
||||||
MX_RTC_Init();
|
MX_RTC_Init();
|
||||||
|
MX_SDIO_SD_Init();
|
||||||
/* USER CODE BEGIN 2 */
|
/* USER CODE BEGIN 2 */
|
||||||
board_init();
|
board_init();
|
||||||
app_init();
|
app_init();
|
||||||
/* USER CODE END 2 */
|
/* USER CODE END 2 */
|
||||||
|
|
||||||
/* Call init function for freertos objects (in freertos.c) */
|
/* Call init function for freertos objects (in cmsis_os2.c) */
|
||||||
MX_FREERTOS_Init();
|
MX_FREERTOS_Init();
|
||||||
|
|
||||||
/* Start scheduler */
|
/* Start scheduler */
|
||||||
osKernelStart();
|
osKernelStart();
|
||||||
|
|
||||||
/* We should never get here as control is now taken by the scheduler */
|
/* We should never get here as control is now taken by the scheduler */
|
||||||
|
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
/* USER CODE BEGIN WHILE */
|
/* USER CODE BEGIN WHILE */
|
||||||
while (1)
|
while (1)
|
||||||
|
|
@ -146,7 +152,8 @@ void SystemClock_Config(void)
|
||||||
|
|
||||||
/** Initializes the CPU, AHB and APB buses clocks
|
/** Initializes the CPU, AHB and APB buses clocks
|
||||||
*/
|
*/
|
||||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
|
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|
||||||
|
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
|
||||||
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
||||||
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
|
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
|
||||||
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
|
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
|
||||||
|
|
@ -175,8 +182,7 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
|
||||||
/* USER CODE BEGIN Callback 0 */
|
/* USER CODE BEGIN Callback 0 */
|
||||||
|
|
||||||
/* USER CODE END Callback 0 */
|
/* USER CODE END Callback 0 */
|
||||||
if (htim->Instance == TIM6)
|
if (htim->Instance == TIM6) {
|
||||||
{
|
|
||||||
HAL_IncTick();
|
HAL_IncTick();
|
||||||
}
|
}
|
||||||
/* USER CODE BEGIN Callback 1 */
|
/* USER CODE BEGIN Callback 1 */
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,7 @@ void MX_RTC_Init(void)
|
||||||
/* USER CODE BEGIN RTC_Init 2 */
|
/* USER CODE BEGIN RTC_Init 2 */
|
||||||
#endif
|
#endif
|
||||||
/* USER CODE END RTC_Init 2 */
|
/* USER CODE END RTC_Init 2 */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HAL_RTC_MspInit(RTC_HandleTypeDef* rtcHandle)
|
void HAL_RTC_MspInit(RTC_HandleTypeDef* rtcHandle)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,182 @@
|
||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file sdio.c
|
||||||
|
* @brief This file provides code for the configuration
|
||||||
|
* of the SDIO instances.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "sdio.h"
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 0 */
|
||||||
|
|
||||||
|
/* USER CODE END 0 */
|
||||||
|
|
||||||
|
SD_HandleTypeDef hsd;
|
||||||
|
DMA_HandleTypeDef hdma_sdio_rx;
|
||||||
|
DMA_HandleTypeDef hdma_sdio_tx;
|
||||||
|
|
||||||
|
/* SDIO init function */
|
||||||
|
|
||||||
|
void MX_SDIO_SD_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN SDIO_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END SDIO_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN SDIO_Init 1 */
|
||||||
|
#if 0
|
||||||
|
/* USER CODE END SDIO_Init 1 */
|
||||||
|
hsd.Instance = SDIO;
|
||||||
|
hsd.Init.ClockEdge = SDIO_CLOCK_EDGE_RISING;
|
||||||
|
hsd.Init.ClockBypass = SDIO_CLOCK_BYPASS_DISABLE;
|
||||||
|
hsd.Init.ClockPowerSave = SDIO_CLOCK_POWER_SAVE_DISABLE;
|
||||||
|
hsd.Init.BusWide = SDIO_BUS_WIDE_1B;
|
||||||
|
hsd.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_DISABLE;
|
||||||
|
hsd.Init.ClockDiv = 4;
|
||||||
|
if (HAL_SD_Init(&hsd) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_SD_ConfigWideBusOperation(&hsd, SDIO_BUS_WIDE_4B) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN SDIO_Init 2 */
|
||||||
|
#endif
|
||||||
|
/* USER CODE END SDIO_Init 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
void HAL_SD_MspInit(SD_HandleTypeDef *sdHandle)
|
||||||
|
{
|
||||||
|
|
||||||
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||||
|
if (sdHandle->Instance == SDIO)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN SDIO_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END SDIO_MspInit 0 */
|
||||||
|
/* SDIO clock enable */
|
||||||
|
__HAL_RCC_SDIO_CLK_ENABLE();
|
||||||
|
|
||||||
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOD_CLK_ENABLE();
|
||||||
|
/**SDIO GPIO Configuration
|
||||||
|
PC8 ------> SDIO_D0
|
||||||
|
PC9 ------> SDIO_D1
|
||||||
|
PC10 ------> SDIO_D2
|
||||||
|
PC11 ------> SDIO_D3
|
||||||
|
PC12 ------> SDIO_CK
|
||||||
|
PD2 ------> SDIO_CMD
|
||||||
|
*/
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF12_SDIO;
|
||||||
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_2;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF12_SDIO;
|
||||||
|
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/* SDIO DMA Init */
|
||||||
|
/* SDIO_RX Init */
|
||||||
|
hdma_sdio_rx.Instance = DMA2_Stream3;
|
||||||
|
hdma_sdio_rx.Init.Channel = DMA_CHANNEL_4;
|
||||||
|
hdma_sdio_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
|
||||||
|
hdma_sdio_rx.Init.PeriphInc = DMA_PINC_DISABLE;
|
||||||
|
hdma_sdio_rx.Init.MemInc = DMA_MINC_ENABLE;
|
||||||
|
hdma_sdio_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
|
||||||
|
hdma_sdio_rx.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
|
||||||
|
hdma_sdio_rx.Init.Mode = DMA_PFCTRL;
|
||||||
|
hdma_sdio_rx.Init.Priority = DMA_PRIORITY_LOW;
|
||||||
|
hdma_sdio_rx.Init.FIFOMode = DMA_FIFOMODE_ENABLE;
|
||||||
|
hdma_sdio_rx.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
|
||||||
|
hdma_sdio_rx.Init.MemBurst = DMA_MBURST_INC4;
|
||||||
|
hdma_sdio_rx.Init.PeriphBurst = DMA_PBURST_INC4;
|
||||||
|
if (HAL_DMA_Init(&hdma_sdio_rx) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
|
||||||
|
__HAL_LINKDMA(sdHandle, hdmarx, hdma_sdio_rx);
|
||||||
|
|
||||||
|
/* SDIO_TX Init */
|
||||||
|
hdma_sdio_tx.Instance = DMA2_Stream6;
|
||||||
|
hdma_sdio_tx.Init.Channel = DMA_CHANNEL_4;
|
||||||
|
hdma_sdio_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
|
||||||
|
hdma_sdio_tx.Init.PeriphInc = DMA_PINC_DISABLE;
|
||||||
|
hdma_sdio_tx.Init.MemInc = DMA_MINC_ENABLE;
|
||||||
|
hdma_sdio_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
|
||||||
|
hdma_sdio_tx.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
|
||||||
|
hdma_sdio_tx.Init.Mode = DMA_PFCTRL;
|
||||||
|
hdma_sdio_tx.Init.Priority = DMA_PRIORITY_LOW;
|
||||||
|
hdma_sdio_tx.Init.FIFOMode = DMA_FIFOMODE_ENABLE;
|
||||||
|
hdma_sdio_tx.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
|
||||||
|
hdma_sdio_tx.Init.MemBurst = DMA_MBURST_INC4;
|
||||||
|
hdma_sdio_tx.Init.PeriphBurst = DMA_PBURST_INC4;
|
||||||
|
if (HAL_DMA_Init(&hdma_sdio_tx) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
|
||||||
|
__HAL_LINKDMA(sdHandle, hdmatx, hdma_sdio_tx);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN SDIO_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END SDIO_MspInit 1 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void HAL_SD_MspDeInit(SD_HandleTypeDef *sdHandle)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (sdHandle->Instance == SDIO)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN SDIO_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END SDIO_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_SDIO_CLK_DISABLE();
|
||||||
|
|
||||||
|
/**SDIO GPIO Configuration
|
||||||
|
PC8 ------> SDIO_D0
|
||||||
|
PC9 ------> SDIO_D1
|
||||||
|
PC10 ------> SDIO_D2
|
||||||
|
PC11 ------> SDIO_D3
|
||||||
|
PC12 ------> SDIO_CK
|
||||||
|
PD2 ------> SDIO_CMD
|
||||||
|
*/
|
||||||
|
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12);
|
||||||
|
|
||||||
|
HAL_GPIO_DeInit(GPIOD, GPIO_PIN_2);
|
||||||
|
|
||||||
|
/* SDIO DMA DeInit */
|
||||||
|
HAL_DMA_DeInit(sdHandle->hdmarx);
|
||||||
|
HAL_DMA_DeInit(sdHandle->hdmatx);
|
||||||
|
/* USER CODE BEGIN SDIO_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END SDIO_MspDeInit 1 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
|
/* USER CODE END 1 */
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
/* USER CODE BEGIN Includes */
|
/* USER CODE BEGIN Includes */
|
||||||
|
|
||||||
/* USER CODE END Includes */
|
/* USER CODE END Includes */
|
||||||
|
|
@ -63,6 +62,7 @@
|
||||||
*/
|
*/
|
||||||
void HAL_MspInit(void)
|
void HAL_MspInit(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* USER CODE BEGIN MspInit 0 */
|
/* USER CODE BEGIN MspInit 0 */
|
||||||
|
|
||||||
/* USER CODE END MspInit 0 */
|
/* USER CODE END MspInit 0 */
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
|
||||||
|
|
||||||
uint32_t uwPrescalerValue = 0U;
|
uint32_t uwPrescalerValue = 0U;
|
||||||
uint32_t pFLatency;
|
uint32_t pFLatency;
|
||||||
|
|
||||||
HAL_StatusTypeDef status;
|
HAL_StatusTypeDef status;
|
||||||
|
|
||||||
/* Enable TIM6 clock */
|
/* Enable TIM6 clock */
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,8 @@
|
||||||
/* USER CODE END 0 */
|
/* USER CODE END 0 */
|
||||||
|
|
||||||
/* External variables --------------------------------------------------------*/
|
/* External variables --------------------------------------------------------*/
|
||||||
|
extern DMA_HandleTypeDef hdma_sdio_rx;
|
||||||
|
extern DMA_HandleTypeDef hdma_sdio_tx;
|
||||||
extern TIM_HandleTypeDef htim6;
|
extern TIM_HandleTypeDef htim6;
|
||||||
|
|
||||||
/* USER CODE BEGIN EV */
|
/* USER CODE BEGIN EV */
|
||||||
|
|
@ -173,6 +175,32 @@ void TIM6_DAC_IRQHandler(void)
|
||||||
/* USER CODE END TIM6_DAC_IRQn 1 */
|
/* USER CODE END TIM6_DAC_IRQn 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles DMA2 stream3 global interrupt.
|
||||||
|
*/
|
||||||
|
void DMA2_Stream3_IRQHandler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN DMA2_Stream3_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END DMA2_Stream3_IRQn 0 */
|
||||||
|
HAL_DMA_IRQHandler(&hdma_sdio_rx);
|
||||||
|
/* USER CODE BEGIN DMA2_Stream3_IRQn 1 */
|
||||||
|
/* USER CODE END DMA2_Stream3_IRQn 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles DMA2 stream6 global interrupt.
|
||||||
|
*/
|
||||||
|
void DMA2_Stream6_IRQHandler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN DMA2_Stream6_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END DMA2_Stream6_IRQn 0 */
|
||||||
|
HAL_DMA_IRQHandler(&hdma_sdio_tx);
|
||||||
|
/* USER CODE BEGIN DMA2_Stream6_IRQn 1 */
|
||||||
|
/* USER CODE END DMA2_Stream6_IRQn 1 */
|
||||||
|
}
|
||||||
|
|
||||||
/* USER CODE BEGIN 1 */
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
/* USER CODE END 1 */
|
/* USER CODE END 1 */
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
* This file contains:
|
* This file contains:
|
||||||
* - Data structures and the address mapping for all peripherals
|
* - Data structures and the address mapping for all peripherals
|
||||||
* - peripherals registers declarations and bits definition
|
* - peripherals registers declarations and bits definition
|
||||||
* - Macros to access peripheral’s registers hardware
|
* - Macros to access peripheral's registers hardware
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
|
@ -1170,7 +1170,7 @@ typedef struct
|
||||||
/* */
|
/* */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* @brief Specific device feature definitions (not present on all devices in the STM32F4 serie)
|
* @brief Specific device feature definitions (not present on all devices in the STM32F4 series)
|
||||||
*/
|
*/
|
||||||
#define ADC_MULTIMODE_SUPPORT /*!<ADC Multimode feature available on specific devices */
|
#define ADC_MULTIMODE_SUPPORT /*!<ADC Multimode feature available on specific devices */
|
||||||
|
|
||||||
|
|
@ -5446,7 +5446,7 @@ typedef struct
|
||||||
/* */
|
/* */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* @brief Specific device feature definitions (not present on all devices in the STM32F4 serie)
|
* @brief Specific device feature definitions (not present on all devices in the STM32F4 series)
|
||||||
*/
|
*/
|
||||||
#define DAC_CHANNEL2_SUPPORT /*!< DAC feature available only on specific devices: availability of DAC channel 2 */
|
#define DAC_CHANNEL2_SUPPORT /*!< DAC feature available only on specific devices: availability of DAC channel 2 */
|
||||||
/******************** Bit definition for DAC_CR register ********************/
|
/******************** Bit definition for DAC_CR register ********************/
|
||||||
|
|
@ -9481,7 +9481,7 @@ typedef struct
|
||||||
#define RCC_CR_PLLRDY_Msk (0x1UL << RCC_CR_PLLRDY_Pos) /*!< 0x02000000 */
|
#define RCC_CR_PLLRDY_Msk (0x1UL << RCC_CR_PLLRDY_Pos) /*!< 0x02000000 */
|
||||||
#define RCC_CR_PLLRDY RCC_CR_PLLRDY_Msk
|
#define RCC_CR_PLLRDY RCC_CR_PLLRDY_Msk
|
||||||
/*
|
/*
|
||||||
* @brief Specific device feature definitions (not present on all devices in the STM32F4 serie)
|
* @brief Specific device feature definitions (not present on all devices in the STM32F4 series)
|
||||||
*/
|
*/
|
||||||
#define RCC_PLLI2S_SUPPORT /*!< Support PLLI2S oscillator */
|
#define RCC_PLLI2S_SUPPORT /*!< Support PLLI2S oscillator */
|
||||||
|
|
||||||
|
|
@ -9947,7 +9947,7 @@ typedef struct
|
||||||
#define RCC_AHB1ENR_OTGHSULPIEN RCC_AHB1ENR_OTGHSULPIEN_Msk
|
#define RCC_AHB1ENR_OTGHSULPIEN RCC_AHB1ENR_OTGHSULPIEN_Msk
|
||||||
/******************** Bit definition for RCC_AHB2ENR register ***************/
|
/******************** Bit definition for RCC_AHB2ENR register ***************/
|
||||||
/*
|
/*
|
||||||
* @brief Specific device feature definitions (not present on all devices in the STM32F4 serie)
|
* @brief Specific device feature definitions (not present on all devices in the STM32F4 series)
|
||||||
*/
|
*/
|
||||||
#define RCC_AHB2_SUPPORT /*!< AHB2 Bus is supported */
|
#define RCC_AHB2_SUPPORT /*!< AHB2 Bus is supported */
|
||||||
|
|
||||||
|
|
@ -9963,7 +9963,7 @@ typedef struct
|
||||||
|
|
||||||
/******************** Bit definition for RCC_AHB3ENR register ***************/
|
/******************** Bit definition for RCC_AHB3ENR register ***************/
|
||||||
/*
|
/*
|
||||||
* @brief Specific device feature definitions (not present on all devices in the STM32F4 serie)
|
* @brief Specific device feature definitions (not present on all devices in the STM32F4 series)
|
||||||
*/
|
*/
|
||||||
#define RCC_AHB3_SUPPORT /*!< AHB3 Bus is supported */
|
#define RCC_AHB3_SUPPORT /*!< AHB3 Bus is supported */
|
||||||
|
|
||||||
|
|
@ -10411,7 +10411,7 @@ typedef struct
|
||||||
/* */
|
/* */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* @brief Specific device feature definitions (not present on all devices in the STM32F4 serie)
|
* @brief Specific device feature definitions (not present on all devices in the STM32F4 series)
|
||||||
*/
|
*/
|
||||||
#define RTC_TAMPER2_SUPPORT /*!< TAMPER 2 feature support */
|
#define RTC_TAMPER2_SUPPORT /*!< TAMPER 2 feature support */
|
||||||
#define RTC_AF2_SUPPORT /*!< RTC Alternate Function 2 mapping support */
|
#define RTC_AF2_SUPPORT /*!< RTC Alternate Function 2 mapping support */
|
||||||
|
|
@ -12824,6 +12824,9 @@ typedef struct
|
||||||
/* */
|
/* */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* Bit definition for Ethernet MAC Control Register register */
|
/* Bit definition for Ethernet MAC Control Register register */
|
||||||
|
#define ETH_MACCR_CSTF_Pos (25U)
|
||||||
|
#define ETH_MACCR_CSTF_Msk (0x1UL << ETH_MACCR_CSTF_Pos) /*!< 0x02000000 */
|
||||||
|
#define ETH_MACCR_CSTF ETH_MACCR_CSTF_Msk /* CRC stripping for Type frames */
|
||||||
#define ETH_MACCR_WD_Pos (23U)
|
#define ETH_MACCR_WD_Pos (23U)
|
||||||
#define ETH_MACCR_WD_Msk (0x1UL << ETH_MACCR_WD_Pos) /*!< 0x00800000 */
|
#define ETH_MACCR_WD_Msk (0x1UL << ETH_MACCR_WD_Pos) /*!< 0x00800000 */
|
||||||
#define ETH_MACCR_WD ETH_MACCR_WD_Msk /* Watchdog disable */
|
#define ETH_MACCR_WD ETH_MACCR_WD_Msk /* Watchdog disable */
|
||||||
|
|
@ -15569,7 +15572,7 @@ typedef struct
|
||||||
#define FLASH_SCALE2_LATENCY1_FREQ 30000000U /*!< HCLK frequency to set FLASH latency 1 in power scale 2 */
|
#define FLASH_SCALE2_LATENCY1_FREQ 30000000U /*!< HCLK frequency to set FLASH latency 1 in power scale 2 */
|
||||||
#define FLASH_SCALE2_LATENCY2_FREQ 60000000U /*!< HCLK frequency to set FLASH latency 2 in power scale 2 */
|
#define FLASH_SCALE2_LATENCY2_FREQ 60000000U /*!< HCLK frequency to set FLASH latency 2 in power scale 2 */
|
||||||
#define FLASH_SCALE2_LATENCY3_FREQ 90000000U /*!< HCLK frequency to set FLASH latency 3 in power scale 2 */
|
#define FLASH_SCALE2_LATENCY3_FREQ 90000000U /*!< HCLK frequency to set FLASH latency 3 in power scale 2 */
|
||||||
#define FLASH_SCALE2_LATENCY4_FREQ 12000000U /*!< HCLK frequency to set FLASH latency 4 in power scale 2 */
|
#define FLASH_SCALE2_LATENCY4_FREQ 120000000U /*!< HCLK frequency to set FLASH latency 4 in power scale 2 */
|
||||||
|
|
||||||
#define USB_OTG_HS_HOST_MAX_CHANNEL_NBR 12U
|
#define USB_OTG_HS_HOST_MAX_CHANNEL_NBR 12U
|
||||||
#define USB_OTG_HS_MAX_IN_ENDPOINTS 6U /* Including EP0 */
|
#define USB_OTG_HS_MAX_IN_ENDPOINTS 6U /* Including EP0 */
|
||||||
|
|
|
||||||
|
|
@ -105,11 +105,11 @@
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CMSIS version number V2.6.8
|
* @brief CMSIS version number V2.6.10
|
||||||
*/
|
*/
|
||||||
#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 (0x08U) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x0AU) /*!< [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)\
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,411 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* @file cachel1_armv7.h
|
||||||
|
* @brief CMSIS Level 1 Cache API for Armv7-M and later
|
||||||
|
* @version V1.0.1
|
||||||
|
* @date 19. April 2021
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020-2021 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined ( __ICCARM__ )
|
||||||
|
#pragma system_include /* treat file as system include file for MISRA check */
|
||||||
|
#elif defined (__clang__)
|
||||||
|
#pragma clang system_header /* treat file as system include file */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ARM_CACHEL1_ARMV7_H
|
||||||
|
#define ARM_CACHEL1_ARMV7_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_CacheFunctions Cache Functions
|
||||||
|
\brief Functions that configure Instruction and Data cache.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Cache Size ID Register Macros */
|
||||||
|
#define CCSIDR_WAYS(x) (((x) & SCB_CCSIDR_ASSOCIATIVITY_Msk) >> SCB_CCSIDR_ASSOCIATIVITY_Pos)
|
||||||
|
#define CCSIDR_SETS(x) (((x) & SCB_CCSIDR_NUMSETS_Msk ) >> SCB_CCSIDR_NUMSETS_Pos )
|
||||||
|
|
||||||
|
#ifndef __SCB_DCACHE_LINE_SIZE
|
||||||
|
#define __SCB_DCACHE_LINE_SIZE 32U /*!< Cortex-M7 cache line size is fixed to 32 bytes (8 words). See also register SCB_CCSIDR */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __SCB_ICACHE_LINE_SIZE
|
||||||
|
#define __SCB_ICACHE_LINE_SIZE 32U /*!< Cortex-M7 cache line size is fixed to 32 bytes (8 words). See also register SCB_CCSIDR */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Enable I-Cache
|
||||||
|
\details Turns on I-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_EnableICache (void)
|
||||||
|
{
|
||||||
|
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
|
||||||
|
if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
SCB->ICIALLU = 0UL; /* invalidate I-Cache */
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Disable I-Cache
|
||||||
|
\details Turns off I-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_DisableICache (void)
|
||||||
|
{
|
||||||
|
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
SCB->CCR &= ~(uint32_t)SCB_CCR_IC_Msk; /* disable I-Cache */
|
||||||
|
SCB->ICIALLU = 0UL; /* invalidate I-Cache */
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Invalidate I-Cache
|
||||||
|
\details Invalidates I-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_InvalidateICache (void)
|
||||||
|
{
|
||||||
|
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
SCB->ICIALLU = 0UL;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief I-Cache Invalidate by address
|
||||||
|
\details Invalidates I-Cache for the given address.
|
||||||
|
I-Cache is invalidated starting from a 32 byte aligned address in 32 byte granularity.
|
||||||
|
I-Cache memory blocks which are part of given address + given size are invalidated.
|
||||||
|
\param[in] addr address
|
||||||
|
\param[in] isize size of memory block (in number of bytes)
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_InvalidateICache_by_Addr (volatile void *addr, int32_t isize)
|
||||||
|
{
|
||||||
|
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
|
||||||
|
if ( isize > 0 ) {
|
||||||
|
int32_t op_size = isize + (((uint32_t)addr) & (__SCB_ICACHE_LINE_SIZE - 1U));
|
||||||
|
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_ICACHE_LINE_SIZE - 1U) */;
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
do {
|
||||||
|
SCB->ICIMVAU = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
|
||||||
|
op_addr += __SCB_ICACHE_LINE_SIZE;
|
||||||
|
op_size -= __SCB_ICACHE_LINE_SIZE;
|
||||||
|
} while ( op_size > 0 );
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Enable D-Cache
|
||||||
|
\details Turns on D-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_EnableDCache (void)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
uint32_t ccsidr;
|
||||||
|
uint32_t sets;
|
||||||
|
uint32_t ways;
|
||||||
|
|
||||||
|
if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */
|
||||||
|
|
||||||
|
SCB->CSSELR = 0U; /* select Level 1 data cache */
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
ccsidr = SCB->CCSIDR;
|
||||||
|
|
||||||
|
/* invalidate D-Cache */
|
||||||
|
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
||||||
|
do {
|
||||||
|
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
||||||
|
do {
|
||||||
|
SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) |
|
||||||
|
((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) );
|
||||||
|
#if defined ( __CC_ARM )
|
||||||
|
__schedule_barrier();
|
||||||
|
#endif
|
||||||
|
} while (ways-- != 0U);
|
||||||
|
} while(sets-- != 0U);
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Disable D-Cache
|
||||||
|
\details Turns off D-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_DisableDCache (void)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
uint32_t ccsidr;
|
||||||
|
uint32_t sets;
|
||||||
|
uint32_t ways;
|
||||||
|
|
||||||
|
SCB->CSSELR = 0U; /* select Level 1 data cache */
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
SCB->CCR &= ~(uint32_t)SCB_CCR_DC_Msk; /* disable D-Cache */
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
ccsidr = SCB->CCSIDR;
|
||||||
|
|
||||||
|
/* clean & invalidate D-Cache */
|
||||||
|
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
||||||
|
do {
|
||||||
|
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
||||||
|
do {
|
||||||
|
SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) |
|
||||||
|
((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) );
|
||||||
|
#if defined ( __CC_ARM )
|
||||||
|
__schedule_barrier();
|
||||||
|
#endif
|
||||||
|
} while (ways-- != 0U);
|
||||||
|
} while(sets-- != 0U);
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Invalidate D-Cache
|
||||||
|
\details Invalidates D-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_InvalidateDCache (void)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
uint32_t ccsidr;
|
||||||
|
uint32_t sets;
|
||||||
|
uint32_t ways;
|
||||||
|
|
||||||
|
SCB->CSSELR = 0U; /* select Level 1 data cache */
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
ccsidr = SCB->CCSIDR;
|
||||||
|
|
||||||
|
/* invalidate D-Cache */
|
||||||
|
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
||||||
|
do {
|
||||||
|
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
||||||
|
do {
|
||||||
|
SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) |
|
||||||
|
((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) );
|
||||||
|
#if defined ( __CC_ARM )
|
||||||
|
__schedule_barrier();
|
||||||
|
#endif
|
||||||
|
} while (ways-- != 0U);
|
||||||
|
} while(sets-- != 0U);
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Clean D-Cache
|
||||||
|
\details Cleans D-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_CleanDCache (void)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
uint32_t ccsidr;
|
||||||
|
uint32_t sets;
|
||||||
|
uint32_t ways;
|
||||||
|
|
||||||
|
SCB->CSSELR = 0U; /* select Level 1 data cache */
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
ccsidr = SCB->CCSIDR;
|
||||||
|
|
||||||
|
/* clean D-Cache */
|
||||||
|
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
||||||
|
do {
|
||||||
|
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
||||||
|
do {
|
||||||
|
SCB->DCCSW = (((sets << SCB_DCCSW_SET_Pos) & SCB_DCCSW_SET_Msk) |
|
||||||
|
((ways << SCB_DCCSW_WAY_Pos) & SCB_DCCSW_WAY_Msk) );
|
||||||
|
#if defined ( __CC_ARM )
|
||||||
|
__schedule_barrier();
|
||||||
|
#endif
|
||||||
|
} while (ways-- != 0U);
|
||||||
|
} while(sets-- != 0U);
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Clean & Invalidate D-Cache
|
||||||
|
\details Cleans and Invalidates D-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache (void)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
uint32_t ccsidr;
|
||||||
|
uint32_t sets;
|
||||||
|
uint32_t ways;
|
||||||
|
|
||||||
|
SCB->CSSELR = 0U; /* select Level 1 data cache */
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
ccsidr = SCB->CCSIDR;
|
||||||
|
|
||||||
|
/* clean & invalidate D-Cache */
|
||||||
|
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
||||||
|
do {
|
||||||
|
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
||||||
|
do {
|
||||||
|
SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) |
|
||||||
|
((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) );
|
||||||
|
#if defined ( __CC_ARM )
|
||||||
|
__schedule_barrier();
|
||||||
|
#endif
|
||||||
|
} while (ways-- != 0U);
|
||||||
|
} while(sets-- != 0U);
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief D-Cache Invalidate by address
|
||||||
|
\details Invalidates D-Cache for the given address.
|
||||||
|
D-Cache is invalidated starting from a 32 byte aligned address in 32 byte granularity.
|
||||||
|
D-Cache memory blocks which are part of given address + given size are invalidated.
|
||||||
|
\param[in] addr address
|
||||||
|
\param[in] dsize size of memory block (in number of bytes)
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr (volatile void *addr, int32_t dsize)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
if ( dsize > 0 ) {
|
||||||
|
int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
|
||||||
|
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */;
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
do {
|
||||||
|
SCB->DCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
|
||||||
|
op_addr += __SCB_DCACHE_LINE_SIZE;
|
||||||
|
op_size -= __SCB_DCACHE_LINE_SIZE;
|
||||||
|
} while ( op_size > 0 );
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief D-Cache Clean by address
|
||||||
|
\details Cleans D-Cache for the given address
|
||||||
|
D-Cache is cleaned starting from a 32 byte aligned address in 32 byte granularity.
|
||||||
|
D-Cache memory blocks which are part of given address + given size are cleaned.
|
||||||
|
\param[in] addr address
|
||||||
|
\param[in] dsize size of memory block (in number of bytes)
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_CleanDCache_by_Addr (volatile void *addr, int32_t dsize)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
if ( dsize > 0 ) {
|
||||||
|
int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
|
||||||
|
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */;
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
do {
|
||||||
|
SCB->DCCMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
|
||||||
|
op_addr += __SCB_DCACHE_LINE_SIZE;
|
||||||
|
op_size -= __SCB_DCACHE_LINE_SIZE;
|
||||||
|
} while ( op_size > 0 );
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief D-Cache Clean and Invalidate by address
|
||||||
|
\details Cleans and invalidates D_Cache for the given address
|
||||||
|
D-Cache is cleaned and invalidated starting from a 32 byte aligned address in 32 byte granularity.
|
||||||
|
D-Cache memory blocks which are part of given address + given size are cleaned and invalidated.
|
||||||
|
\param[in] addr address (aligned to 32-byte boundary)
|
||||||
|
\param[in] dsize size of memory block (in number of bytes)
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache_by_Addr (volatile void *addr, int32_t dsize)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
if ( dsize > 0 ) {
|
||||||
|
int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
|
||||||
|
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */;
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
do {
|
||||||
|
SCB->DCCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
|
||||||
|
op_addr += __SCB_DCACHE_LINE_SIZE;
|
||||||
|
op_size -= __SCB_DCACHE_LINE_SIZE;
|
||||||
|
} while ( op_size > 0 );
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_CacheFunctions */
|
||||||
|
|
||||||
|
#endif /* ARM_CACHEL1_ARMV7_H */
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file cmsis_armcc.h
|
* @file cmsis_armcc.h
|
||||||
* @brief CMSIS compiler ARMCC (Arm Compiler 5) header file
|
* @brief CMSIS compiler ARMCC (Arm Compiler 5) header file
|
||||||
* @version V5.0.4
|
* @version V5.3.2
|
||||||
* @date 10. January 2018
|
* @date 27. May 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -46,7 +46,12 @@
|
||||||
|
|
||||||
/* __ARM_ARCH_8M_BASE__ not applicable */
|
/* __ARM_ARCH_8M_BASE__ not applicable */
|
||||||
/* __ARM_ARCH_8M_MAIN__ not applicable */
|
/* __ARM_ARCH_8M_MAIN__ not applicable */
|
||||||
|
/* __ARM_ARCH_8_1M_MAIN__ not applicable */
|
||||||
|
|
||||||
|
/* CMSIS compiler control DSP macros */
|
||||||
|
#if ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
|
||||||
|
#define __ARM_FEATURE_DSP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* CMSIS compiler specific defines */
|
/* CMSIS compiler specific defines */
|
||||||
#ifndef __ASM
|
#ifndef __ASM
|
||||||
|
|
@ -100,279 +105,31 @@
|
||||||
#ifndef __RESTRICT
|
#ifndef __RESTRICT
|
||||||
#define __RESTRICT __restrict
|
#define __RESTRICT __restrict
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef __COMPILER_BARRIER
|
||||||
/* ########################### Core Function Access ########################### */
|
#define __COMPILER_BARRIER() __memory_changed()
|
||||||
/** \ingroup CMSIS_Core_FunctionInterface
|
|
||||||
\defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
|
|
||||||
@{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Enable IRQ Interrupts
|
|
||||||
\details Enables IRQ interrupts by clearing the I-bit in the CPSR.
|
|
||||||
Can only be executed in Privileged modes.
|
|
||||||
*/
|
|
||||||
/* intrinsic void __enable_irq(); */
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Disable IRQ Interrupts
|
|
||||||
\details Disables IRQ interrupts by setting the I-bit in the CPSR.
|
|
||||||
Can only be executed in Privileged modes.
|
|
||||||
*/
|
|
||||||
/* intrinsic void __disable_irq(); */
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get Control Register
|
|
||||||
\details Returns the content of the Control Register.
|
|
||||||
\return Control Register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_CONTROL(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regControl __ASM("control");
|
|
||||||
return(__regControl);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Set Control Register
|
|
||||||
\details Writes the given value to the Control Register.
|
|
||||||
\param [in] control Control Register value to set
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_CONTROL(uint32_t control)
|
|
||||||
{
|
|
||||||
register uint32_t __regControl __ASM("control");
|
|
||||||
__regControl = control;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get IPSR Register
|
|
||||||
\details Returns the content of the IPSR Register.
|
|
||||||
\return IPSR Register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_IPSR(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regIPSR __ASM("ipsr");
|
|
||||||
return(__regIPSR);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get APSR Register
|
|
||||||
\details Returns the content of the APSR Register.
|
|
||||||
\return APSR Register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_APSR(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regAPSR __ASM("apsr");
|
|
||||||
return(__regAPSR);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get xPSR Register
|
|
||||||
\details Returns the content of the xPSR Register.
|
|
||||||
\return xPSR Register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_xPSR(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regXPSR __ASM("xpsr");
|
|
||||||
return(__regXPSR);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get Process Stack Pointer
|
|
||||||
\details Returns the current value of the Process Stack Pointer (PSP).
|
|
||||||
\return PSP Register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_PSP(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regProcessStackPointer __ASM("psp");
|
|
||||||
return(__regProcessStackPointer);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Set Process Stack Pointer
|
|
||||||
\details Assigns the given value to the Process Stack Pointer (PSP).
|
|
||||||
\param [in] topOfProcStack Process Stack Pointer value to set
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
|
|
||||||
{
|
|
||||||
register uint32_t __regProcessStackPointer __ASM("psp");
|
|
||||||
__regProcessStackPointer = topOfProcStack;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get Main Stack Pointer
|
|
||||||
\details Returns the current value of the Main Stack Pointer (MSP).
|
|
||||||
\return MSP Register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_MSP(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regMainStackPointer __ASM("msp");
|
|
||||||
return(__regMainStackPointer);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Set Main Stack Pointer
|
|
||||||
\details Assigns the given value to the Main Stack Pointer (MSP).
|
|
||||||
\param [in] topOfMainStack Main Stack Pointer value to set
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
|
|
||||||
{
|
|
||||||
register uint32_t __regMainStackPointer __ASM("msp");
|
|
||||||
__regMainStackPointer = topOfMainStack;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get Priority Mask
|
|
||||||
\details Returns the current state of the priority mask bit from the Priority Mask Register.
|
|
||||||
\return Priority Mask value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_PRIMASK(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regPriMask __ASM("primask");
|
|
||||||
return(__regPriMask);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Set Priority Mask
|
|
||||||
\details Assigns the given value to the Priority Mask Register.
|
|
||||||
\param [in] priMask Priority Mask
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
|
|
||||||
{
|
|
||||||
register uint32_t __regPriMask __ASM("primask");
|
|
||||||
__regPriMask = (priMask);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
|
|
||||||
(defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Enable FIQ
|
|
||||||
\details Enables FIQ interrupts by clearing the F-bit in the CPSR.
|
|
||||||
Can only be executed in Privileged modes.
|
|
||||||
*/
|
|
||||||
#define __enable_fault_irq __enable_fiq
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Disable FIQ
|
|
||||||
\details Disables FIQ interrupts by setting the F-bit in the CPSR.
|
|
||||||
Can only be executed in Privileged modes.
|
|
||||||
*/
|
|
||||||
#define __disable_fault_irq __disable_fiq
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get Base Priority
|
|
||||||
\details Returns the current value of the Base Priority register.
|
|
||||||
\return Base Priority register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_BASEPRI(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regBasePri __ASM("basepri");
|
|
||||||
return(__regBasePri);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Set Base Priority
|
|
||||||
\details Assigns the given value to the Base Priority register.
|
|
||||||
\param [in] basePri Base Priority value to set
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
|
|
||||||
{
|
|
||||||
register uint32_t __regBasePri __ASM("basepri");
|
|
||||||
__regBasePri = (basePri & 0xFFU);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Set Base Priority with condition
|
|
||||||
\details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled,
|
|
||||||
or the new value increases the BASEPRI priority level.
|
|
||||||
\param [in] basePri Base Priority value to set
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_BASEPRI_MAX(uint32_t basePri)
|
|
||||||
{
|
|
||||||
register uint32_t __regBasePriMax __ASM("basepri_max");
|
|
||||||
__regBasePriMax = (basePri & 0xFFU);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get Fault Mask
|
|
||||||
\details Returns the current value of the Fault Mask register.
|
|
||||||
\return Fault Mask register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_FAULTMASK(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regFaultMask __ASM("faultmask");
|
|
||||||
return(__regFaultMask);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Set Fault Mask
|
|
||||||
\details Assigns the given value to the Fault Mask register.
|
|
||||||
\param [in] faultMask Fault Mask value to set
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
|
|
||||||
{
|
|
||||||
register uint32_t __regFaultMask __ASM("faultmask");
|
|
||||||
__regFaultMask = (faultMask & (uint32_t)1U);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
|
|
||||||
(defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get FPSCR
|
|
||||||
\details Returns the current value of the Floating Point Status/Control register.
|
|
||||||
\return Floating Point Status/Control register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_FPSCR(void)
|
|
||||||
{
|
|
||||||
#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
|
|
||||||
(defined (__FPU_USED ) && (__FPU_USED == 1U)) )
|
|
||||||
register uint32_t __regfpscr __ASM("fpscr");
|
|
||||||
return(__regfpscr);
|
|
||||||
#else
|
|
||||||
return(0U);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
|
/* ######################### Startup and Lowlevel Init ######################## */
|
||||||
|
|
||||||
/**
|
#ifndef __PROGRAM_START
|
||||||
\brief Set FPSCR
|
#define __PROGRAM_START __main
|
||||||
\details Assigns the given value to the Floating Point Status/Control register.
|
|
||||||
\param [in] fpscr Floating Point Status/Control value to set
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
|
|
||||||
{
|
|
||||||
#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
|
|
||||||
(defined (__FPU_USED ) && (__FPU_USED == 1U)) )
|
|
||||||
register uint32_t __regfpscr __ASM("fpscr");
|
|
||||||
__regfpscr = (fpscr);
|
|
||||||
#else
|
|
||||||
(void)fpscr;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
|
#ifndef __INITIAL_SP
|
||||||
|
#define __INITIAL_SP Image$$ARM_LIB_STACK$$ZI$$Limit
|
||||||
|
#endif
|
||||||
|
|
||||||
/*@} end of CMSIS_Core_RegAccFunctions */
|
#ifndef __STACK_LIMIT
|
||||||
|
#define __STACK_LIMIT Image$$ARM_LIB_STACK$$ZI$$Base
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VECTOR_TABLE
|
||||||
|
#define __VECTOR_TABLE __Vectors
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VECTOR_TABLE_ATTRIBUTE
|
||||||
|
#define __VECTOR_TABLE_ATTRIBUTE __attribute__((used, section("RESET")))
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ########################## Core Instruction Access ######################### */
|
/* ########################## Core Instruction Access ######################### */
|
||||||
/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface
|
/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface
|
||||||
|
|
@ -415,33 +172,21 @@ __STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
|
||||||
so that all instructions following the ISB are fetched from cache or memory,
|
so that all instructions following the ISB are fetched from cache or memory,
|
||||||
after the instruction has been completed.
|
after the instruction has been completed.
|
||||||
*/
|
*/
|
||||||
#define __ISB() do {\
|
#define __ISB() __isb(0xF)
|
||||||
__schedule_barrier();\
|
|
||||||
__isb(0xF);\
|
|
||||||
__schedule_barrier();\
|
|
||||||
} while (0U)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Data Synchronization Barrier
|
\brief Data Synchronization Barrier
|
||||||
\details Acts as a special kind of Data Memory Barrier.
|
\details Acts as a special kind of Data Memory Barrier.
|
||||||
It completes when all explicit memory accesses before this instruction complete.
|
It completes when all explicit memory accesses before this instruction complete.
|
||||||
*/
|
*/
|
||||||
#define __DSB() do {\
|
#define __DSB() __dsb(0xF)
|
||||||
__schedule_barrier();\
|
|
||||||
__dsb(0xF);\
|
|
||||||
__schedule_barrier();\
|
|
||||||
} while (0U)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Data Memory Barrier
|
\brief Data Memory Barrier
|
||||||
\details Ensures the apparent order of the explicit memory operations before
|
\details Ensures the apparent order of the explicit memory operations before
|
||||||
and after the instruction, without ensuring their completion.
|
and after the instruction, without ensuring their completion.
|
||||||
*/
|
*/
|
||||||
#define __DMB() do {\
|
#define __DMB() __dmb(0xF)
|
||||||
__schedule_barrier();\
|
|
||||||
__dmb(0xF);\
|
|
||||||
__schedule_barrier();\
|
|
||||||
} while (0U)
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -781,6 +526,280 @@ __attribute__((always_inline)) __STATIC_INLINE uint32_t __USAT(int32_t val, uint
|
||||||
/*@}*/ /* end of group CMSIS_Core_InstructionInterface */
|
/*@}*/ /* end of group CMSIS_Core_InstructionInterface */
|
||||||
|
|
||||||
|
|
||||||
|
/* ########################### Core Function Access ########################### */
|
||||||
|
/** \ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Enable IRQ Interrupts
|
||||||
|
\details Enables IRQ interrupts by clearing special-purpose register PRIMASK.
|
||||||
|
Can only be executed in Privileged modes.
|
||||||
|
*/
|
||||||
|
/* intrinsic void __enable_irq(); */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Disable IRQ Interrupts
|
||||||
|
\details Disables IRQ interrupts by setting special-purpose register PRIMASK.
|
||||||
|
Can only be executed in Privileged modes.
|
||||||
|
*/
|
||||||
|
/* intrinsic void __disable_irq(); */
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Control Register
|
||||||
|
\details Returns the content of the Control Register.
|
||||||
|
\return Control Register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_CONTROL(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regControl __ASM("control");
|
||||||
|
return(__regControl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Control Register
|
||||||
|
\details Writes the given value to the Control Register.
|
||||||
|
\param [in] control Control Register value to set
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_CONTROL(uint32_t control)
|
||||||
|
{
|
||||||
|
register uint32_t __regControl __ASM("control");
|
||||||
|
__regControl = control;
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get IPSR Register
|
||||||
|
\details Returns the content of the IPSR Register.
|
||||||
|
\return IPSR Register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_IPSR(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regIPSR __ASM("ipsr");
|
||||||
|
return(__regIPSR);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get APSR Register
|
||||||
|
\details Returns the content of the APSR Register.
|
||||||
|
\return APSR Register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_APSR(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regAPSR __ASM("apsr");
|
||||||
|
return(__regAPSR);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get xPSR Register
|
||||||
|
\details Returns the content of the xPSR Register.
|
||||||
|
\return xPSR Register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_xPSR(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regXPSR __ASM("xpsr");
|
||||||
|
return(__regXPSR);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Process Stack Pointer
|
||||||
|
\details Returns the current value of the Process Stack Pointer (PSP).
|
||||||
|
\return PSP Register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_PSP(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regProcessStackPointer __ASM("psp");
|
||||||
|
return(__regProcessStackPointer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Process Stack Pointer
|
||||||
|
\details Assigns the given value to the Process Stack Pointer (PSP).
|
||||||
|
\param [in] topOfProcStack Process Stack Pointer value to set
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
|
||||||
|
{
|
||||||
|
register uint32_t __regProcessStackPointer __ASM("psp");
|
||||||
|
__regProcessStackPointer = topOfProcStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Main Stack Pointer
|
||||||
|
\details Returns the current value of the Main Stack Pointer (MSP).
|
||||||
|
\return MSP Register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_MSP(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regMainStackPointer __ASM("msp");
|
||||||
|
return(__regMainStackPointer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Main Stack Pointer
|
||||||
|
\details Assigns the given value to the Main Stack Pointer (MSP).
|
||||||
|
\param [in] topOfMainStack Main Stack Pointer value to set
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
|
||||||
|
{
|
||||||
|
register uint32_t __regMainStackPointer __ASM("msp");
|
||||||
|
__regMainStackPointer = topOfMainStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Priority Mask
|
||||||
|
\details Returns the current state of the priority mask bit from the Priority Mask Register.
|
||||||
|
\return Priority Mask value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_PRIMASK(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regPriMask __ASM("primask");
|
||||||
|
return(__regPriMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Priority Mask
|
||||||
|
\details Assigns the given value to the Priority Mask Register.
|
||||||
|
\param [in] priMask Priority Mask
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
|
||||||
|
{
|
||||||
|
register uint32_t __regPriMask __ASM("primask");
|
||||||
|
__regPriMask = (priMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
|
||||||
|
(defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Enable FIQ
|
||||||
|
\details Enables FIQ interrupts by clearing special-purpose register FAULTMASK.
|
||||||
|
Can only be executed in Privileged modes.
|
||||||
|
*/
|
||||||
|
#define __enable_fault_irq __enable_fiq
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Disable FIQ
|
||||||
|
\details Disables FIQ interrupts by setting special-purpose register FAULTMASK.
|
||||||
|
Can only be executed in Privileged modes.
|
||||||
|
*/
|
||||||
|
#define __disable_fault_irq __disable_fiq
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Base Priority
|
||||||
|
\details Returns the current value of the Base Priority register.
|
||||||
|
\return Base Priority register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_BASEPRI(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regBasePri __ASM("basepri");
|
||||||
|
return(__regBasePri);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Base Priority
|
||||||
|
\details Assigns the given value to the Base Priority register.
|
||||||
|
\param [in] basePri Base Priority value to set
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
|
||||||
|
{
|
||||||
|
register uint32_t __regBasePri __ASM("basepri");
|
||||||
|
__regBasePri = (basePri & 0xFFU);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Base Priority with condition
|
||||||
|
\details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled,
|
||||||
|
or the new value increases the BASEPRI priority level.
|
||||||
|
\param [in] basePri Base Priority value to set
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_BASEPRI_MAX(uint32_t basePri)
|
||||||
|
{
|
||||||
|
register uint32_t __regBasePriMax __ASM("basepri_max");
|
||||||
|
__regBasePriMax = (basePri & 0xFFU);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Fault Mask
|
||||||
|
\details Returns the current value of the Fault Mask register.
|
||||||
|
\return Fault Mask register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_FAULTMASK(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regFaultMask __ASM("faultmask");
|
||||||
|
return(__regFaultMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Fault Mask
|
||||||
|
\details Assigns the given value to the Fault Mask register.
|
||||||
|
\param [in] faultMask Fault Mask value to set
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
|
||||||
|
{
|
||||||
|
register uint32_t __regFaultMask __ASM("faultmask");
|
||||||
|
__regFaultMask = (faultMask & (uint32_t)1U);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
|
||||||
|
(defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get FPSCR
|
||||||
|
\details Returns the current value of the Floating Point Status/Control register.
|
||||||
|
\return Floating Point Status/Control register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_FPSCR(void)
|
||||||
|
{
|
||||||
|
#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
|
||||||
|
(defined (__FPU_USED ) && (__FPU_USED == 1U)) )
|
||||||
|
register uint32_t __regfpscr __ASM("fpscr");
|
||||||
|
return(__regfpscr);
|
||||||
|
#else
|
||||||
|
return(0U);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set FPSCR
|
||||||
|
\details Assigns the given value to the Floating Point Status/Control register.
|
||||||
|
\param [in] fpscr Floating Point Status/Control value to set
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
|
||||||
|
{
|
||||||
|
#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
|
||||||
|
(defined (__FPU_USED ) && (__FPU_USED == 1U)) )
|
||||||
|
register uint32_t __regfpscr __ASM("fpscr");
|
||||||
|
__regfpscr = (fpscr);
|
||||||
|
#else
|
||||||
|
(void)fpscr;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_RegAccFunctions */
|
||||||
|
|
||||||
|
|
||||||
/* ################### Compiler specific Intrinsics ########################### */
|
/* ################### Compiler specific Intrinsics ########################### */
|
||||||
/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics
|
/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics
|
||||||
Access to dedicated SIMD instructions
|
Access to dedicated SIMD instructions
|
||||||
|
|
@ -858,6 +877,10 @@ __attribute__((always_inline)) __STATIC_INLINE uint32_t __USAT(int32_t val, uint
|
||||||
#define __SMMLA(ARG1,ARG2,ARG3) ( (int32_t)((((int64_t)(ARG1) * (ARG2)) + \
|
#define __SMMLA(ARG1,ARG2,ARG3) ( (int32_t)((((int64_t)(ARG1) * (ARG2)) + \
|
||||||
((int64_t)(ARG3) << 32U) ) >> 32U))
|
((int64_t)(ARG3) << 32U) ) >> 32U))
|
||||||
|
|
||||||
|
#define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
|
||||||
|
|
||||||
|
#define __SXTAB16_RORn(ARG1, ARG2, ARG3) __SXTAB16(ARG1, __ROR(ARG2, ARG3))
|
||||||
|
|
||||||
#endif /* ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
|
#endif /* ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
|
||||||
/*@} end of group CMSIS_SIMD_intrinsics */
|
/*@} end of group CMSIS_SIMD_intrinsics */
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,8 +1,8 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file cmsis_compiler.h
|
* @file cmsis_compiler.h
|
||||||
* @brief CMSIS compiler generic header file
|
* @brief CMSIS compiler generic header file
|
||||||
* @version V5.0.4
|
* @version V5.1.0
|
||||||
* @date 10. January 2018
|
* @date 09. October 2018
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
|
@ -35,9 +35,15 @@
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Arm Compiler 6 (armclang)
|
* Arm Compiler 6.6 LTM (armclang)
|
||||||
*/
|
*/
|
||||||
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) && (__ARMCC_VERSION < 6100100)
|
||||||
|
#include "cmsis_armclang_ltm.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Arm Compiler above 6.10.1 (armclang)
|
||||||
|
*/
|
||||||
|
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6100100)
|
||||||
#include "cmsis_armclang.h"
|
#include "cmsis_armclang.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -115,8 +121,11 @@
|
||||||
#define __ALIGNED(x) __attribute__((aligned(x)))
|
#define __ALIGNED(x) __attribute__((aligned(x)))
|
||||||
#endif
|
#endif
|
||||||
#ifndef __RESTRICT
|
#ifndef __RESTRICT
|
||||||
#warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
|
#define __RESTRICT __restrict
|
||||||
#define __RESTRICT
|
#endif
|
||||||
|
#ifndef __COMPILER_BARRIER
|
||||||
|
#warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored.
|
||||||
|
#define __COMPILER_BARRIER() (void)0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -187,6 +196,10 @@
|
||||||
#warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
|
#warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
|
||||||
#define __RESTRICT
|
#define __RESTRICT
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef __COMPILER_BARRIER
|
||||||
|
#warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored.
|
||||||
|
#define __COMPILER_BARRIER() (void)0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -255,6 +268,10 @@
|
||||||
#warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
|
#warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
|
||||||
#define __RESTRICT
|
#define __RESTRICT
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef __COMPILER_BARRIER
|
||||||
|
#warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored.
|
||||||
|
#define __COMPILER_BARRIER() (void)0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,13 +1,16 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file cmsis_iccarm.h
|
* @file cmsis_iccarm.h
|
||||||
* @brief CMSIS compiler ICCARM (IAR Compiler for Arm) header file
|
* @brief CMSIS compiler ICCARM (IAR Compiler for Arm) header file
|
||||||
* @version V5.0.7
|
* @version V5.3.0
|
||||||
* @date 19. June 2018
|
* @date 14. April 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Copyright (c) 2017-2018 IAR Systems
|
// Copyright (c) 2017-2021 IAR Systems
|
||||||
|
// Copyright (c) 2017-2021 Arm Limited. All rights reserved.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License")
|
// Licensed under the Apache License, Version 2.0 (the "License")
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
|
@ -110,6 +113,10 @@
|
||||||
#define __ASM __asm
|
#define __ASM __asm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __COMPILER_BARRIER
|
||||||
|
#define __COMPILER_BARRIER() __ASM volatile("":::"memory")
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __INLINE
|
#ifndef __INLINE
|
||||||
#define __INLINE inline
|
#define __INLINE inline
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -150,7 +157,12 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __RESTRICT
|
#ifndef __RESTRICT
|
||||||
|
#if __ICCARM_V8
|
||||||
#define __RESTRICT __restrict
|
#define __RESTRICT __restrict
|
||||||
|
#else
|
||||||
|
/* Needs IAR language extensions */
|
||||||
|
#define __RESTRICT restrict
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __STATIC_INLINE
|
#ifndef __STATIC_INLINE
|
||||||
|
|
@ -226,6 +238,7 @@ __packed struct __iar_u32 { uint32_t v; };
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#undef __WEAK /* undo the definition from DLib_Defaults.h */
|
||||||
#ifndef __WEAK
|
#ifndef __WEAK
|
||||||
#if __ICCARM_V8
|
#if __ICCARM_V8
|
||||||
#define __WEAK __attribute__((weak))
|
#define __WEAK __attribute__((weak))
|
||||||
|
|
@ -234,6 +247,43 @@ __packed struct __iar_u32 { uint32_t v; };
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __PROGRAM_START
|
||||||
|
#define __PROGRAM_START __iar_program_start
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __INITIAL_SP
|
||||||
|
#define __INITIAL_SP CSTACK$$Limit
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __STACK_LIMIT
|
||||||
|
#define __STACK_LIMIT CSTACK$$Base
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VECTOR_TABLE
|
||||||
|
#define __VECTOR_TABLE __vector_table
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VECTOR_TABLE_ATTRIBUTE
|
||||||
|
#define __VECTOR_TABLE_ATTRIBUTE @".intvec"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
#ifndef __STACK_SEAL
|
||||||
|
#define __STACK_SEAL STACKSEAL$$Base
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __TZ_STACK_SEAL_SIZE
|
||||||
|
#define __TZ_STACK_SEAL_SIZE 8U
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __TZ_STACK_SEAL_VALUE
|
||||||
|
#define __TZ_STACK_SEAL_VALUE 0xFEF5EDA5FEF5EDA5ULL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
__STATIC_FORCEINLINE void __TZ_set_STACKSEAL_S (uint32_t* stackTop) {
|
||||||
|
*((uint64_t *)stackTop) = __TZ_STACK_SEAL_VALUE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __ICCARM_INTRINSICS_VERSION__
|
#ifndef __ICCARM_INTRINSICS_VERSION__
|
||||||
#define __ICCARM_INTRINSICS_VERSION__ 0
|
#define __ICCARM_INTRINSICS_VERSION__ 0
|
||||||
|
|
@ -305,7 +355,13 @@ __packed struct __iar_u32 { uint32_t v; };
|
||||||
|
|
||||||
#define __set_BASEPRI(VALUE) (__arm_wsr("BASEPRI", (VALUE)))
|
#define __set_BASEPRI(VALUE) (__arm_wsr("BASEPRI", (VALUE)))
|
||||||
#define __set_BASEPRI_MAX(VALUE) (__arm_wsr("BASEPRI_MAX", (VALUE)))
|
#define __set_BASEPRI_MAX(VALUE) (__arm_wsr("BASEPRI_MAX", (VALUE)))
|
||||||
#define __set_CONTROL(VALUE) (__arm_wsr("CONTROL", (VALUE)))
|
|
||||||
|
__STATIC_FORCEINLINE void __set_CONTROL(uint32_t control)
|
||||||
|
{
|
||||||
|
__arm_wsr("CONTROL", control);
|
||||||
|
__iar_builtin_ISB();
|
||||||
|
}
|
||||||
|
|
||||||
#define __set_FAULTMASK(VALUE) (__arm_wsr("FAULTMASK", (VALUE)))
|
#define __set_FAULTMASK(VALUE) (__arm_wsr("FAULTMASK", (VALUE)))
|
||||||
#define __set_MSP(VALUE) (__arm_wsr("MSP", (VALUE)))
|
#define __set_MSP(VALUE) (__arm_wsr("MSP", (VALUE)))
|
||||||
|
|
||||||
|
|
@ -327,7 +383,13 @@ __packed struct __iar_u32 { uint32_t v; };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define __TZ_get_CONTROL_NS() (__arm_rsr("CONTROL_NS"))
|
#define __TZ_get_CONTROL_NS() (__arm_rsr("CONTROL_NS"))
|
||||||
#define __TZ_set_CONTROL_NS(VALUE) (__arm_wsr("CONTROL_NS", (VALUE)))
|
|
||||||
|
__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control)
|
||||||
|
{
|
||||||
|
__arm_wsr("CONTROL_NS", control);
|
||||||
|
__iar_builtin_ISB();
|
||||||
|
}
|
||||||
|
|
||||||
#define __TZ_get_PSP_NS() (__arm_rsr("PSP_NS"))
|
#define __TZ_get_PSP_NS() (__arm_rsr("PSP_NS"))
|
||||||
#define __TZ_set_PSP_NS(VALUE) (__arm_wsr("PSP_NS", (VALUE)))
|
#define __TZ_set_PSP_NS(VALUE) (__arm_wsr("PSP_NS", (VALUE)))
|
||||||
#define __TZ_get_MSP_NS() (__arm_rsr("MSP_NS"))
|
#define __TZ_get_MSP_NS() (__arm_rsr("MSP_NS"))
|
||||||
|
|
@ -567,7 +629,7 @@ __packed struct __iar_u32 { uint32_t v; };
|
||||||
__IAR_FT uint32_t __RRX(uint32_t value)
|
__IAR_FT uint32_t __RRX(uint32_t value)
|
||||||
{
|
{
|
||||||
uint32_t result;
|
uint32_t result;
|
||||||
__ASM("RRX %0, %1" : "=r"(result) : "r" (value) : "cc");
|
__ASM volatile("RRX %0, %1" : "=r"(result) : "r" (value));
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -649,6 +711,7 @@ __packed struct __iar_u32 { uint32_t v; };
|
||||||
__IAR_FT void __TZ_set_CONTROL_NS(uint32_t value)
|
__IAR_FT void __TZ_set_CONTROL_NS(uint32_t value)
|
||||||
{
|
{
|
||||||
__asm volatile("MSR CONTROL_NS,%0" :: "r" (value));
|
__asm volatile("MSR CONTROL_NS,%0" :: "r" (value));
|
||||||
|
__iar_builtin_ISB();
|
||||||
}
|
}
|
||||||
|
|
||||||
__IAR_FT uint32_t __TZ_get_PSP_NS(void)
|
__IAR_FT uint32_t __TZ_get_PSP_NS(void)
|
||||||
|
|
@ -806,37 +869,37 @@ __packed struct __iar_u32 { uint32_t v; };
|
||||||
__IAR_FT uint8_t __LDRBT(volatile uint8_t *addr)
|
__IAR_FT uint8_t __LDRBT(volatile uint8_t *addr)
|
||||||
{
|
{
|
||||||
uint32_t res;
|
uint32_t res;
|
||||||
__ASM("LDRBT %0, [%1]" : "=r" (res) : "r" (addr) : "memory");
|
__ASM volatile ("LDRBT %0, [%1]" : "=r" (res) : "r" (addr) : "memory");
|
||||||
return ((uint8_t)res);
|
return ((uint8_t)res);
|
||||||
}
|
}
|
||||||
|
|
||||||
__IAR_FT uint16_t __LDRHT(volatile uint16_t *addr)
|
__IAR_FT uint16_t __LDRHT(volatile uint16_t *addr)
|
||||||
{
|
{
|
||||||
uint32_t res;
|
uint32_t res;
|
||||||
__ASM("LDRHT %0, [%1]" : "=r" (res) : "r" (addr) : "memory");
|
__ASM volatile ("LDRHT %0, [%1]" : "=r" (res) : "r" (addr) : "memory");
|
||||||
return ((uint16_t)res);
|
return ((uint16_t)res);
|
||||||
}
|
}
|
||||||
|
|
||||||
__IAR_FT uint32_t __LDRT(volatile uint32_t *addr)
|
__IAR_FT uint32_t __LDRT(volatile uint32_t *addr)
|
||||||
{
|
{
|
||||||
uint32_t res;
|
uint32_t res;
|
||||||
__ASM("LDRT %0, [%1]" : "=r" (res) : "r" (addr) : "memory");
|
__ASM volatile ("LDRT %0, [%1]" : "=r" (res) : "r" (addr) : "memory");
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
__IAR_FT void __STRBT(uint8_t value, volatile uint8_t *addr)
|
__IAR_FT void __STRBT(uint8_t value, volatile uint8_t *addr)
|
||||||
{
|
{
|
||||||
__ASM("STRBT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory");
|
__ASM volatile ("STRBT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
__IAR_FT void __STRHT(uint16_t value, volatile uint16_t *addr)
|
__IAR_FT void __STRHT(uint16_t value, volatile uint16_t *addr)
|
||||||
{
|
{
|
||||||
__ASM("STRHT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory");
|
__ASM volatile ("STRHT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
__IAR_FT void __STRT(uint32_t value, volatile uint32_t *addr)
|
__IAR_FT void __STRT(uint32_t value, volatile uint32_t *addr)
|
||||||
{
|
{
|
||||||
__ASM("STRT %1, [%0]" : : "r" (addr), "r" (value) : "memory");
|
__ASM volatile ("STRT %1, [%0]" : : "r" (addr), "r" (value) : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* (__CORTEX_M >= 0x03) */
|
#endif /* (__CORTEX_M >= 0x03) */
|
||||||
|
|
@ -932,4 +995,8 @@ __packed struct __iar_u32 { uint32_t v; };
|
||||||
#pragma diag_default=Pe940
|
#pragma diag_default=Pe940
|
||||||
#pragma diag_default=Pe177
|
#pragma diag_default=Pe177
|
||||||
|
|
||||||
|
#define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
|
||||||
|
|
||||||
|
#define __SXTAB16_RORn(ARG1, ARG2, ARG3) __SXTAB16(ARG1, __ROR(ARG2, ARG3))
|
||||||
|
|
||||||
#endif /* __CMSIS_ICCARM_H__ */
|
#endif /* __CMSIS_ICCARM_H__ */
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file cmsis_version.h
|
* @file cmsis_version.h
|
||||||
* @brief CMSIS Core(M) Version definitions
|
* @brief CMSIS Core(M) Version definitions
|
||||||
* @version V5.0.2
|
* @version V5.0.5
|
||||||
* @date 19. April 2017
|
* @date 02. February 2022
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2017 ARM Limited. All rights reserved.
|
* Copyright (c) 2009-2022 ARM Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
/* CMSIS Version definitions */
|
/* CMSIS Version definitions */
|
||||||
#define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */
|
#define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */
|
||||||
#define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */
|
#define __CM_CMSIS_VERSION_SUB ( 6U) /*!< [15:0] CMSIS Core(M) sub version */
|
||||||
#define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \
|
#define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \
|
||||||
__CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */
|
__CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,11 +1,11 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_armv8mbl.h
|
* @file core_armv8mbl.h
|
||||||
* @brief CMSIS Armv8-M Baseline Core Peripheral Access Layer Header File
|
* @brief CMSIS Armv8-M Baseline Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.7
|
* @version V5.1.0
|
||||||
* @date 22. June 2018
|
* @date 27. March 2020
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -26,6 +26,8 @@
|
||||||
#pragma system_include /* treat file as system include file for MISRA check */
|
#pragma system_include /* treat file as system include file for MISRA check */
|
||||||
#elif defined (__clang__)
|
#elif defined (__clang__)
|
||||||
#pragma clang system_header /* treat file as system include file */
|
#pragma clang system_header /* treat file as system include file */
|
||||||
|
#elif defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic ignored "-Wpedantic" /* disable pedantic warning due to unnamed structs/unions */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __CORE_ARMV8MBL_H_GENERIC
|
#ifndef __CORE_ARMV8MBL_H_GENERIC
|
||||||
|
|
@ -81,7 +83,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
#if defined __ARM_PCS_VFP
|
#if defined __ARM_FP
|
||||||
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -975,6 +977,7 @@ typedef struct
|
||||||
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
|
||||||
|
/* CoreDebug is deprecated. replaced by DCB (Debug Control Block) */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
||||||
|
|
@ -983,7 +986,7 @@ typedef struct
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Structure type to access the Core Debug Register (CoreDebug).
|
\brief \deprecated Structure type to access the Core Debug Register (CoreDebug).
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
@ -991,91 +994,276 @@ typedef struct
|
||||||
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
uint32_t RESERVED4[1U];
|
uint32_t RESERVED0[1U];
|
||||||
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
} CoreDebug_Type;
|
} CoreDebug_Type;
|
||||||
|
|
||||||
/* Debug Halting Control and Status Register Definitions */
|
/* Debug Halting Control and Status Register Definitions */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */
|
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< \deprecated CoreDebug DHCSR: DBGKEY Position */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */
|
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< \deprecated CoreDebug DHCSR: DBGKEY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */
|
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */
|
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */
|
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Position */
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */
|
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */
|
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< \deprecated CoreDebug DHCSR: S_SLEEP Position */
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */
|
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< \deprecated CoreDebug DHCSR: S_SLEEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */
|
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< \deprecated CoreDebug DHCSR: S_HALT Position */
|
||||||
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */
|
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: S_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */
|
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< \deprecated CoreDebug DHCSR: S_REGRDY Position */
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */
|
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< \deprecated CoreDebug DHCSR: S_REGRDY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */
|
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Position */
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */
|
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */
|
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< \deprecated CoreDebug DHCSR: C_STEP Position */
|
||||||
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */
|
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< \deprecated CoreDebug DHCSR: C_STEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */
|
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< \deprecated CoreDebug DHCSR: C_HALT Position */
|
||||||
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */
|
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: C_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Position */
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Mask */
|
||||||
|
|
||||||
/* Debug Core Register Selector Register Definitions */
|
/* Debug Core Register Selector Register Definitions */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */
|
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< \deprecated CoreDebug DCRSR: REGWnR Position */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */
|
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< \deprecated CoreDebug DCRSR: REGWnR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */
|
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< \deprecated CoreDebug DCRSR: REGSEL Position */
|
||||||
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */
|
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< \deprecated CoreDebug DCRSR: REGSEL Mask */
|
||||||
|
|
||||||
/* Debug Exception and Monitor Control Register */
|
/* Debug Exception and Monitor Control Register Definitions */
|
||||||
#define CoreDebug_DEMCR_DWTENA_Pos 24U /*!< CoreDebug DEMCR: DWTENA Position */
|
#define CoreDebug_DEMCR_DWTENA_Pos 24U /*!< \deprecated CoreDebug DEMCR: DWTENA Position */
|
||||||
#define CoreDebug_DEMCR_DWTENA_Msk (1UL << CoreDebug_DEMCR_DWTENA_Pos) /*!< CoreDebug DEMCR: DWTENA Mask */
|
#define CoreDebug_DEMCR_DWTENA_Msk (1UL << CoreDebug_DEMCR_DWTENA_Pos) /*!< \deprecated CoreDebug DEMCR: DWTENA Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */
|
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */
|
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */
|
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Position */
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */
|
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Mask */
|
||||||
|
|
||||||
/* Debug Authentication Control Register Definitions */
|
/* Debug Authentication Control Register Definitions */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
||||||
|
|
||||||
/* Debug Security Control and Status Register Definitions */
|
/* Debug Security Control and Status Register Definitions */
|
||||||
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */
|
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< \deprecated CoreDebug DSCSR: CDS Position */
|
||||||
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */
|
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< \deprecated CoreDebug DSCSR: CDS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */
|
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< \deprecated CoreDebug DSCSR: SBRSEL Position */
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */
|
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< \deprecated CoreDebug DSCSR: SBRSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */
|
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< \deprecated CoreDebug DSCSR: SBRSELEN Position */
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */
|
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< \deprecated CoreDebug DSCSR: SBRSELEN Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_CoreDebug */
|
/*@} end of group CMSIS_CoreDebug */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DCB Debug Control Block
|
||||||
|
\brief Type definitions for the Debug Control Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Control Block Registers (DCB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */
|
||||||
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
|
uint32_t RESERVED0[1U];
|
||||||
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
|
} DCB_Type;
|
||||||
|
|
||||||
|
/* DHCSR, Debug Halting Control and Status Register Definitions */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Pos 16U /*!< DCB DHCSR: Debug key Position */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Msk (0xFFFFUL << DCB_DHCSR_DBGKEY_Pos) /*!< DCB DHCSR: Debug key Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Pos 26U /*!< DCB DHCSR: Restart sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Msk (0x1UL << DCB_DHCSR_S_RESTART_ST_Pos) /*!< DCB DHCSR: Restart sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Pos 25U /*!< DCB DHCSR: Reset sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Msk (0x1UL << DCB_DHCSR_S_RESET_ST_Pos) /*!< DCB DHCSR: Reset sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Pos 24U /*!< DCB DHCSR: Retire sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Msk (0x1UL << DCB_DHCSR_S_RETIRE_ST_Pos) /*!< DCB DHCSR: Retire sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SDE_Pos 20U /*!< DCB DHCSR: Secure debug enabled Position */
|
||||||
|
#define DCB_DHCSR_S_SDE_Msk (0x1UL << DCB_DHCSR_S_SDE_Pos) /*!< DCB DHCSR: Secure debug enabled Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Pos 19U /*!< DCB DHCSR: Lockup status Position */
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Msk (0x1UL << DCB_DHCSR_S_LOCKUP_Pos) /*!< DCB DHCSR: Lockup status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Pos 18U /*!< DCB DHCSR: Sleeping status Position */
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Msk (0x1UL << DCB_DHCSR_S_SLEEP_Pos) /*!< DCB DHCSR: Sleeping status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_HALT_Pos 17U /*!< DCB DHCSR: Halted status Position */
|
||||||
|
#define DCB_DHCSR_S_HALT_Msk (0x1UL << DCB_DHCSR_S_HALT_Pos) /*!< DCB DHCSR: Halted status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Pos 16U /*!< DCB DHCSR: Register ready status Position */
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Msk (0x1UL << DCB_DHCSR_S_REGRDY_Pos) /*!< DCB DHCSR: Register ready status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Pos 3U /*!< DCB DHCSR: Mask interrupts control Position */
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Msk (0x1UL << DCB_DHCSR_C_MASKINTS_Pos) /*!< DCB DHCSR: Mask interrupts control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_STEP_Pos 2U /*!< DCB DHCSR: Step control Position */
|
||||||
|
#define DCB_DHCSR_C_STEP_Msk (0x1UL << DCB_DHCSR_C_STEP_Pos) /*!< DCB DHCSR: Step control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_HALT_Pos 1U /*!< DCB DHCSR: Halt control Position */
|
||||||
|
#define DCB_DHCSR_C_HALT_Msk (0x1UL << DCB_DHCSR_C_HALT_Pos) /*!< DCB DHCSR: Halt control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Pos 0U /*!< DCB DHCSR: Debug enable control Position */
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Msk (0x1UL /*<< DCB_DHCSR_C_DEBUGEN_Pos*/) /*!< DCB DHCSR: Debug enable control Mask */
|
||||||
|
|
||||||
|
/* DCRSR, Debug Core Register Select Register Definitions */
|
||||||
|
#define DCB_DCRSR_REGWnR_Pos 16U /*!< DCB DCRSR: Register write/not-read Position */
|
||||||
|
#define DCB_DCRSR_REGWnR_Msk (0x1UL << DCB_DCRSR_REGWnR_Pos) /*!< DCB DCRSR: Register write/not-read Mask */
|
||||||
|
|
||||||
|
#define DCB_DCRSR_REGSEL_Pos 0U /*!< DCB DCRSR: Register selector Position */
|
||||||
|
#define DCB_DCRSR_REGSEL_Msk (0x7FUL /*<< DCB_DCRSR_REGSEL_Pos*/) /*!< DCB DCRSR: Register selector Mask */
|
||||||
|
|
||||||
|
/* DCRDR, Debug Core Register Data Register Definitions */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Pos 0U /*!< DCB DCRDR: Data temporary buffer Position */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Msk (0xFFFFFFFFUL /*<< DCB_DCRDR_DBGTMP_Pos*/) /*!< DCB DCRDR: Data temporary buffer Mask */
|
||||||
|
|
||||||
|
/* DEMCR, Debug Exception and Monitor Control Register Definitions */
|
||||||
|
#define DCB_DEMCR_TRCENA_Pos 24U /*!< DCB DEMCR: Trace enable Position */
|
||||||
|
#define DCB_DEMCR_TRCENA_Msk (0x1UL << DCB_DEMCR_TRCENA_Pos) /*!< DCB DEMCR: Trace enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Pos 10U /*!< DCB DEMCR: Vector Catch HardFault errors Position */
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Msk (0x1UL << DCB_DEMCR_VC_HARDERR_Pos) /*!< DCB DEMCR: Vector Catch HardFault errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Pos 0U /*!< DCB DEMCR: Vector Catch Core reset Position */
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Msk (0x1UL /*<< DCB_DEMCR_VC_CORERESET_Pos*/) /*!< DCB DEMCR: Vector Catch Core reset Mask */
|
||||||
|
|
||||||
|
/* DAUTHCTRL, Debug Authentication Control Register Definitions */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPNIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Msk (0x1UL << DCB_DAUTHCTRL_SPNIDENSEL_Pos) /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< DCB DAUTHCTRL: Secure invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Msk (0x1UL /*<< DCB_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< DCB DAUTHCTRL: Secure invasive debug enable select Mask */
|
||||||
|
|
||||||
|
/* DSCSR, Debug Security Control and Status Register Definitions */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Pos 17U /*!< DCB DSCSR: CDS write-enable key Position */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Msk (0x1UL << DCB_DSCSR_CDSKEY_Pos) /*!< DCB DSCSR: CDS write-enable key Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_CDS_Pos 16U /*!< DCB DSCSR: Current domain Secure Position */
|
||||||
|
#define DCB_DSCSR_CDS_Msk (0x1UL << DCB_DSCSR_CDS_Pos) /*!< DCB DSCSR: Current domain Secure Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSEL_Pos 1U /*!< DCB DSCSR: Secure banked register select Position */
|
||||||
|
#define DCB_DSCSR_SBRSEL_Msk (0x1UL << DCB_DSCSR_SBRSEL_Pos) /*!< DCB DSCSR: Secure banked register select Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Pos 0U /*!< DCB DSCSR: Secure banked register select enable Position */
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Msk (0x1UL /*<< DCB_DSCSR_SBRSELEN_Pos*/) /*!< DCB DSCSR: Secure banked register select enable Mask */
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DCB */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DIB Debug Identification Block
|
||||||
|
\brief Type definitions for the Debug Identification Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Identification Block Registers (DIB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__OM uint32_t DLAR; /*!< Offset: 0x000 ( /W) SCS Software Lock Access Register */
|
||||||
|
__IM uint32_t DLSR; /*!< Offset: 0x004 (R/ ) SCS Software Lock Status Register */
|
||||||
|
__IM uint32_t DAUTHSTATUS; /*!< Offset: 0x008 (R/ ) Debug Authentication Status Register */
|
||||||
|
__IM uint32_t DDEVARCH; /*!< Offset: 0x00C (R/ ) SCS Device Architecture Register */
|
||||||
|
__IM uint32_t DDEVTYPE; /*!< Offset: 0x010 (R/ ) SCS Device Type Register */
|
||||||
|
} DIB_Type;
|
||||||
|
|
||||||
|
/* DLAR, SCS Software Lock Access Register Definitions */
|
||||||
|
#define DIB_DLAR_KEY_Pos 0U /*!< DIB DLAR: KEY Position */
|
||||||
|
#define DIB_DLAR_KEY_Msk (0xFFFFFFFFUL /*<< DIB_DLAR_KEY_Pos */) /*!< DIB DLAR: KEY Mask */
|
||||||
|
|
||||||
|
/* DLSR, SCS Software Lock Status Register Definitions */
|
||||||
|
#define DIB_DLSR_nTT_Pos 2U /*!< DIB DLSR: Not thirty-two bit Position */
|
||||||
|
#define DIB_DLSR_nTT_Msk (0x1UL << DIB_DLSR_nTT_Pos ) /*!< DIB DLSR: Not thirty-two bit Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLK_Pos 1U /*!< DIB DLSR: Software Lock status Position */
|
||||||
|
#define DIB_DLSR_SLK_Msk (0x1UL << DIB_DLSR_SLK_Pos ) /*!< DIB DLSR: Software Lock status Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLI_Pos 0U /*!< DIB DLSR: Software Lock implemented Position */
|
||||||
|
#define DIB_DLSR_SLI_Msk (0x1UL /*<< DIB_DLSR_SLI_Pos*/) /*!< DIB DLSR: Software Lock implemented Mask */
|
||||||
|
|
||||||
|
/* DAUTHSTATUS, Debug Authentication Status Register Definitions */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Pos 6U /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Msk (0x3UL << DIB_DAUTHSTATUS_SNID_Pos ) /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Pos 4U /*!< DIB DAUTHSTATUS: Secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Msk (0x3UL << DIB_DAUTHSTATUS_SID_Pos ) /*!< DIB DAUTHSTATUS: Secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Pos 2U /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Msk (0x3UL << DIB_DAUTHSTATUS_NSNID_Pos ) /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Pos 0U /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Msk (0x3UL /*<< DIB_DAUTHSTATUS_NSID_Pos*/) /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
/* DDEVARCH, SCS Device Architecture Register Definitions */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Pos 21U /*!< DIB DDEVARCH: Architect Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Msk (0x7FFUL << DIB_DDEVARCH_ARCHITECT_Pos ) /*!< DIB DDEVARCH: Architect Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Pos 20U /*!< DIB DDEVARCH: DEVARCH Present Position */
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Msk (0x1FUL << DIB_DDEVARCH_PRESENT_Pos ) /*!< DIB DDEVARCH: DEVARCH Present Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_REVISION_Pos 16U /*!< DIB DDEVARCH: Revision Position */
|
||||||
|
#define DIB_DDEVARCH_REVISION_Msk (0xFUL << DIB_DDEVARCH_REVISION_Pos ) /*!< DIB DDEVARCH: Revision Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Pos 12U /*!< DIB DDEVARCH: Architecture Version Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Msk (0xFUL << DIB_DDEVARCH_ARCHVER_Pos ) /*!< DIB DDEVARCH: Architecture Version Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Pos 0U /*!< DIB DDEVARCH: Architecture Part Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Msk (0xFFFUL /*<< DIB_DDEVARCH_ARCHPART_Pos*/) /*!< DIB DDEVARCH: Architecture Part Mask */
|
||||||
|
|
||||||
|
/* DDEVTYPE, SCS Device Type Register Definitions */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Pos 4U /*!< DIB DDEVTYPE: Sub-type Position */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Msk (0xFUL << DIB_DDEVTYPE_SUB_Pos ) /*!< DIB DDEVTYPE: Sub-type Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Pos 0U /*!< DIB DDEVTYPE: Major type Position */
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Msk (0xFUL /*<< DIB_DDEVTYPE_MAJOR_Pos*/) /*!< DIB DDEVTYPE: Major type Mask */
|
||||||
|
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DIB */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_core_bitfield Core register bit field macros
|
\defgroup CMSIS_core_bitfield Core register bit field macros
|
||||||
|
|
@ -1113,7 +1301,9 @@ typedef struct
|
||||||
#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */
|
#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */
|
||||||
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
||||||
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
||||||
#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */
|
#define CoreDebug_BASE (0xE000EDF0UL) /*!< \deprecated Core Debug Base Address */
|
||||||
|
#define DCB_BASE (0xE000EDF0UL) /*!< DCB Base Address */
|
||||||
|
#define DIB_BASE (0xE000EFB0UL) /*!< DIB Base Address */
|
||||||
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
||||||
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
||||||
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
||||||
|
|
@ -1124,7 +1314,9 @@ typedef struct
|
||||||
#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */
|
#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */
|
||||||
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
||||||
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
||||||
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */
|
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< \deprecated Core Debug configuration struct */
|
||||||
|
#define DCB ((DCB_Type *) DCB_BASE ) /*!< DCB configuration struct */
|
||||||
|
#define DIB ((DIB_Type *) DIB_BASE ) /*!< DIB configuration struct */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
||||||
|
|
@ -1138,7 +1330,9 @@ typedef struct
|
||||||
|
|
||||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
||||||
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */
|
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< \deprecated Core Debug Base Address (non-secure address space) */
|
||||||
|
#define DCB_BASE_NS (0xE002EDF0UL) /*!< DCB Base Address (non-secure address space) */
|
||||||
|
#define DIB_BASE_NS (0xE002EFB0UL) /*!< DIB Base Address (non-secure address space) */
|
||||||
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
||||||
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
||||||
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
||||||
|
|
@ -1146,7 +1340,9 @@ typedef struct
|
||||||
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
||||||
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
||||||
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
||||||
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */
|
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< \deprecated Core Debug configuration struct (non-secure address space) */
|
||||||
|
#define DCB_NS ((DCB_Type *) DCB_BASE_NS ) /*!< DCB configuration struct (non-secure address space) */
|
||||||
|
#define DIB_NS ((DIB_Type *) DIB_BASE_NS ) /*!< DIB configuration struct (non-secure address space) */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
||||||
|
|
@ -1163,6 +1359,7 @@ typedef struct
|
||||||
Core Function Interface contains:
|
Core Function Interface contains:
|
||||||
- Core NVIC Functions
|
- Core NVIC Functions
|
||||||
- Core SysTick Functions
|
- Core SysTick Functions
|
||||||
|
- Core Debug Functions
|
||||||
- Core Register Access Functions
|
- Core Register Access Functions
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/**
|
/**
|
||||||
|
|
@ -1223,7 +1420,7 @@ typedef struct
|
||||||
#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */
|
#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */
|
||||||
#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */
|
#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */
|
||||||
#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */
|
#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */
|
||||||
#define EXC_RETURN_SPSEL (0x00000002UL) /* bit [1] stack pointer used to restore context: 0=MSP 1=PSP */
|
#define EXC_RETURN_SPSEL (0x00000004UL) /* bit [2] stack pointer used to restore context: 0=MSP 1=PSP */
|
||||||
#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */
|
#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */
|
||||||
|
|
||||||
/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */
|
/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */
|
||||||
|
|
@ -1253,7 +1450,9 @@ __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
if ((int32_t)(IRQn) >= 0)
|
if ((int32_t)(IRQn) >= 0)
|
||||||
{
|
{
|
||||||
|
__COMPILER_BARRIER();
|
||||||
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
||||||
|
__COMPILER_BARRIER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1552,6 +1751,7 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
uint32_t *vectors = (uint32_t *)0x0U;
|
uint32_t *vectors = (uint32_t *)0x0U;
|
||||||
#endif
|
#endif
|
||||||
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
|
__DSB();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1835,6 +2035,110 @@ __STATIC_INLINE void TZ_SAU_Disable(void)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Control function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DCBFunctions Debug Control Functions
|
||||||
|
\brief Functions that access the Debug Control Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register
|
||||||
|
\details writes to Debug Authentication Control register.
|
||||||
|
\param [in] value value to be writen.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void DCB_SetAuthCtrl(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register
|
||||||
|
\details Reads Debug Authentication Control register.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DCB_GetAuthCtrl(void)
|
||||||
|
{
|
||||||
|
return (DCB->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register (non-secure)
|
||||||
|
\details writes to non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\param [in] value value to be writen
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void TZ_DCB_SetAuthCtrl_NS(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB_NS->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DCB_GetAuthCtrl_NS(void)
|
||||||
|
{
|
||||||
|
return (DCB_NS->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Identification function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DIBFunctions Debug Identification Functions
|
||||||
|
\brief Functions that access the Debug Identification Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register
|
||||||
|
\details Reads Debug Authentication Status register.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DIB_GetAuthStatus(void)
|
||||||
|
{
|
||||||
|
return (DIB->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Status register when in secure state.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DIB_GetAuthStatus_NS(void)
|
||||||
|
{
|
||||||
|
return (DIB_NS->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ################################## SysTick function ############################################ */
|
/* ################################## SysTick function ############################################ */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_Core_FunctionInterface
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_armv8mml.h
|
* @file core_armv8mml.h
|
||||||
* @brief CMSIS Armv8-M Mainline Core Peripheral Access Layer Header File
|
* @brief CMSIS Armv8-M Mainline Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.7
|
* @version V5.2.3
|
||||||
* @date 06. July 2018
|
* @date 13. October 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -26,6 +26,8 @@
|
||||||
#pragma system_include /* treat file as system include file for MISRA check */
|
#pragma system_include /* treat file as system include file for MISRA check */
|
||||||
#elif defined (__clang__)
|
#elif defined (__clang__)
|
||||||
#pragma clang system_header /* treat file as system include file */
|
#pragma clang system_header /* treat file as system include file */
|
||||||
|
#elif defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic ignored "-Wpedantic" /* disable pedantic warning due to unnamed structs/unions */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __CORE_ARMV8MML_H_GENERIC
|
#ifndef __CORE_ARMV8MML_H_GENERIC
|
||||||
|
|
@ -68,7 +70,7 @@
|
||||||
#define __ARMv8MML_CMSIS_VERSION ((__ARMv8MML_CMSIS_VERSION_MAIN << 16U) | \
|
#define __ARMv8MML_CMSIS_VERSION ((__ARMv8MML_CMSIS_VERSION_MAIN << 16U) | \
|
||||||
__ARMv8MML_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */
|
__ARMv8MML_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */
|
||||||
|
|
||||||
#define __CORTEX_M (81U) /*!< Cortex-M Core */
|
#define __CORTEX_M (80U) /*!< Cortex-M Core */
|
||||||
|
|
||||||
/** __FPU_USED indicates whether an FPU is used or not.
|
/** __FPU_USED indicates whether an FPU is used or not.
|
||||||
For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions.
|
For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions.
|
||||||
|
|
@ -97,7 +99,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
#if defined __ARM_PCS_VFP
|
#if defined __ARM_FP
|
||||||
#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
|
#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
|
||||||
#define __FPU_USED 1U
|
#define __FPU_USED 1U
|
||||||
#else
|
#else
|
||||||
|
|
@ -248,6 +250,11 @@
|
||||||
#warning "__DSP_PRESENT not defined in device header file; using default!"
|
#warning "__DSP_PRESENT not defined in device header file; using default!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VTOR_PRESENT
|
||||||
|
#define __VTOR_PRESENT 1U
|
||||||
|
#warning "__VTOR_PRESENT not defined in device header file; using default!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NVIC_PRIO_BITS
|
#ifndef __NVIC_PRIO_BITS
|
||||||
#define __NVIC_PRIO_BITS 3U
|
#define __NVIC_PRIO_BITS 3U
|
||||||
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
||||||
|
|
@ -512,7 +519,7 @@ typedef struct
|
||||||
__IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */
|
__IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */
|
||||||
__IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */
|
__IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */
|
||||||
__IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */
|
__IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */
|
||||||
__IM uint32_t ID_ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */
|
__IM uint32_t ID_AFR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */
|
||||||
__IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */
|
__IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */
|
||||||
__IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */
|
__IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */
|
||||||
__IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */
|
__IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */
|
||||||
|
|
@ -521,7 +528,10 @@ typedef struct
|
||||||
__IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */
|
__IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */
|
||||||
__IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */
|
__IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */
|
||||||
__IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */
|
__IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */
|
||||||
uint32_t RESERVED3[92U];
|
uint32_t RESERVED7[21U];
|
||||||
|
__IOM uint32_t SFSR; /*!< Offset: 0x0E4 (R/W) Secure Fault Status Register */
|
||||||
|
__IOM uint32_t SFAR; /*!< Offset: 0x0E8 (R/W) Secure Fault Address Register */
|
||||||
|
uint32_t RESERVED3[69U];
|
||||||
__OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */
|
__OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */
|
||||||
uint32_t RESERVED4[15U];
|
uint32_t RESERVED4[15U];
|
||||||
__IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */
|
__IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */
|
||||||
|
|
@ -538,14 +548,7 @@ typedef struct
|
||||||
__OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */
|
__OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */
|
||||||
__OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */
|
__OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */
|
||||||
__OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */
|
__OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */
|
||||||
uint32_t RESERVED7[6U];
|
__OM uint32_t BPIALL; /*!< Offset: 0x278 ( /W) Branch Predictor Invalidate All */
|
||||||
__IOM uint32_t ITCMCR; /*!< Offset: 0x290 (R/W) Instruction Tightly-Coupled Memory Control Register */
|
|
||||||
__IOM uint32_t DTCMCR; /*!< Offset: 0x294 (R/W) Data Tightly-Coupled Memory Control Registers */
|
|
||||||
__IOM uint32_t AHBPCR; /*!< Offset: 0x298 (R/W) AHBP Control Register */
|
|
||||||
__IOM uint32_t CACR; /*!< Offset: 0x29C (R/W) L1 Cache Control Register */
|
|
||||||
__IOM uint32_t AHBSCR; /*!< Offset: 0x2A0 (R/W) AHB Slave Control Register */
|
|
||||||
uint32_t RESERVED8[1U];
|
|
||||||
__IOM uint32_t ABFSR; /*!< Offset: 0x2A8 (R/W) Auxiliary Bus Fault Status Register */
|
|
||||||
} SCB_Type;
|
} SCB_Type;
|
||||||
|
|
||||||
/* SCB CPUID Register Definitions */
|
/* SCB CPUID Register Definitions */
|
||||||
|
|
@ -746,22 +749,22 @@ typedef struct
|
||||||
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
||||||
|
|
||||||
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
#define SCB_CFSR_MMARVALID_Pos (SCB_CFSR_MEMFAULTSR_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
||||||
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
#define SCB_CFSR_MLSPERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
||||||
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
#define SCB_CFSR_MSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
||||||
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
#define SCB_CFSR_MUNSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
||||||
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
#define SCB_CFSR_DACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
||||||
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
#define SCB_CFSR_IACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
||||||
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
||||||
|
|
||||||
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
|
|
@ -921,78 +924,6 @@ typedef struct
|
||||||
#define SCB_DCCISW_SET_Pos 5U /*!< SCB DCCISW: Set Position */
|
#define SCB_DCCISW_SET_Pos 5U /*!< SCB DCCISW: Set Position */
|
||||||
#define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos) /*!< SCB DCCISW: Set Mask */
|
#define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos) /*!< SCB DCCISW: Set Mask */
|
||||||
|
|
||||||
/* Instruction Tightly-Coupled Memory Control Register Definitions */
|
|
||||||
#define SCB_ITCMCR_SZ_Pos 3U /*!< SCB ITCMCR: SZ Position */
|
|
||||||
#define SCB_ITCMCR_SZ_Msk (0xFUL << SCB_ITCMCR_SZ_Pos) /*!< SCB ITCMCR: SZ Mask */
|
|
||||||
|
|
||||||
#define SCB_ITCMCR_RETEN_Pos 2U /*!< SCB ITCMCR: RETEN Position */
|
|
||||||
#define SCB_ITCMCR_RETEN_Msk (1UL << SCB_ITCMCR_RETEN_Pos) /*!< SCB ITCMCR: RETEN Mask */
|
|
||||||
|
|
||||||
#define SCB_ITCMCR_RMW_Pos 1U /*!< SCB ITCMCR: RMW Position */
|
|
||||||
#define SCB_ITCMCR_RMW_Msk (1UL << SCB_ITCMCR_RMW_Pos) /*!< SCB ITCMCR: RMW Mask */
|
|
||||||
|
|
||||||
#define SCB_ITCMCR_EN_Pos 0U /*!< SCB ITCMCR: EN Position */
|
|
||||||
#define SCB_ITCMCR_EN_Msk (1UL /*<< SCB_ITCMCR_EN_Pos*/) /*!< SCB ITCMCR: EN Mask */
|
|
||||||
|
|
||||||
/* Data Tightly-Coupled Memory Control Register Definitions */
|
|
||||||
#define SCB_DTCMCR_SZ_Pos 3U /*!< SCB DTCMCR: SZ Position */
|
|
||||||
#define SCB_DTCMCR_SZ_Msk (0xFUL << SCB_DTCMCR_SZ_Pos) /*!< SCB DTCMCR: SZ Mask */
|
|
||||||
|
|
||||||
#define SCB_DTCMCR_RETEN_Pos 2U /*!< SCB DTCMCR: RETEN Position */
|
|
||||||
#define SCB_DTCMCR_RETEN_Msk (1UL << SCB_DTCMCR_RETEN_Pos) /*!< SCB DTCMCR: RETEN Mask */
|
|
||||||
|
|
||||||
#define SCB_DTCMCR_RMW_Pos 1U /*!< SCB DTCMCR: RMW Position */
|
|
||||||
#define SCB_DTCMCR_RMW_Msk (1UL << SCB_DTCMCR_RMW_Pos) /*!< SCB DTCMCR: RMW Mask */
|
|
||||||
|
|
||||||
#define SCB_DTCMCR_EN_Pos 0U /*!< SCB DTCMCR: EN Position */
|
|
||||||
#define SCB_DTCMCR_EN_Msk (1UL /*<< SCB_DTCMCR_EN_Pos*/) /*!< SCB DTCMCR: EN Mask */
|
|
||||||
|
|
||||||
/* AHBP Control Register Definitions */
|
|
||||||
#define SCB_AHBPCR_SZ_Pos 1U /*!< SCB AHBPCR: SZ Position */
|
|
||||||
#define SCB_AHBPCR_SZ_Msk (7UL << SCB_AHBPCR_SZ_Pos) /*!< SCB AHBPCR: SZ Mask */
|
|
||||||
|
|
||||||
#define SCB_AHBPCR_EN_Pos 0U /*!< SCB AHBPCR: EN Position */
|
|
||||||
#define SCB_AHBPCR_EN_Msk (1UL /*<< SCB_AHBPCR_EN_Pos*/) /*!< SCB AHBPCR: EN Mask */
|
|
||||||
|
|
||||||
/* L1 Cache Control Register Definitions */
|
|
||||||
#define SCB_CACR_FORCEWT_Pos 2U /*!< SCB CACR: FORCEWT Position */
|
|
||||||
#define SCB_CACR_FORCEWT_Msk (1UL << SCB_CACR_FORCEWT_Pos) /*!< SCB CACR: FORCEWT Mask */
|
|
||||||
|
|
||||||
#define SCB_CACR_ECCEN_Pos 1U /*!< SCB CACR: ECCEN Position */
|
|
||||||
#define SCB_CACR_ECCEN_Msk (1UL << SCB_CACR_ECCEN_Pos) /*!< SCB CACR: ECCEN Mask */
|
|
||||||
|
|
||||||
#define SCB_CACR_SIWT_Pos 0U /*!< SCB CACR: SIWT Position */
|
|
||||||
#define SCB_CACR_SIWT_Msk (1UL /*<< SCB_CACR_SIWT_Pos*/) /*!< SCB CACR: SIWT Mask */
|
|
||||||
|
|
||||||
/* AHBS Control Register Definitions */
|
|
||||||
#define SCB_AHBSCR_INITCOUNT_Pos 11U /*!< SCB AHBSCR: INITCOUNT Position */
|
|
||||||
#define SCB_AHBSCR_INITCOUNT_Msk (0x1FUL << SCB_AHBPCR_INITCOUNT_Pos) /*!< SCB AHBSCR: INITCOUNT Mask */
|
|
||||||
|
|
||||||
#define SCB_AHBSCR_TPRI_Pos 2U /*!< SCB AHBSCR: TPRI Position */
|
|
||||||
#define SCB_AHBSCR_TPRI_Msk (0x1FFUL << SCB_AHBPCR_TPRI_Pos) /*!< SCB AHBSCR: TPRI Mask */
|
|
||||||
|
|
||||||
#define SCB_AHBSCR_CTL_Pos 0U /*!< SCB AHBSCR: CTL Position*/
|
|
||||||
#define SCB_AHBSCR_CTL_Msk (3UL /*<< SCB_AHBPCR_CTL_Pos*/) /*!< SCB AHBSCR: CTL Mask */
|
|
||||||
|
|
||||||
/* Auxiliary Bus Fault Status Register Definitions */
|
|
||||||
#define SCB_ABFSR_AXIMTYPE_Pos 8U /*!< SCB ABFSR: AXIMTYPE Position*/
|
|
||||||
#define SCB_ABFSR_AXIMTYPE_Msk (3UL << SCB_ABFSR_AXIMTYPE_Pos) /*!< SCB ABFSR: AXIMTYPE Mask */
|
|
||||||
|
|
||||||
#define SCB_ABFSR_EPPB_Pos 4U /*!< SCB ABFSR: EPPB Position*/
|
|
||||||
#define SCB_ABFSR_EPPB_Msk (1UL << SCB_ABFSR_EPPB_Pos) /*!< SCB ABFSR: EPPB Mask */
|
|
||||||
|
|
||||||
#define SCB_ABFSR_AXIM_Pos 3U /*!< SCB ABFSR: AXIM Position*/
|
|
||||||
#define SCB_ABFSR_AXIM_Msk (1UL << SCB_ABFSR_AXIM_Pos) /*!< SCB ABFSR: AXIM Mask */
|
|
||||||
|
|
||||||
#define SCB_ABFSR_AHBP_Pos 2U /*!< SCB ABFSR: AHBP Position*/
|
|
||||||
#define SCB_ABFSR_AHBP_Msk (1UL << SCB_ABFSR_AHBP_Pos) /*!< SCB ABFSR: AHBP Mask */
|
|
||||||
|
|
||||||
#define SCB_ABFSR_DTCM_Pos 1U /*!< SCB ABFSR: DTCM Position*/
|
|
||||||
#define SCB_ABFSR_DTCM_Msk (1UL << SCB_ABFSR_DTCM_Pos) /*!< SCB ABFSR: DTCM Mask */
|
|
||||||
|
|
||||||
#define SCB_ABFSR_ITCM_Pos 0U /*!< SCB ABFSR: ITCM Position*/
|
|
||||||
#define SCB_ABFSR_ITCM_Msk (1UL /*<< SCB_ABFSR_ITCM_Pos*/) /*!< SCB ABFSR: ITCM Mask */
|
|
||||||
|
|
||||||
/*@} end of group CMSIS_SCB */
|
/*@} end of group CMSIS_SCB */
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1097,10 +1028,7 @@ typedef struct
|
||||||
__IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */
|
__IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */
|
||||||
uint32_t RESERVED2[15U];
|
uint32_t RESERVED2[15U];
|
||||||
__IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */
|
__IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */
|
||||||
uint32_t RESERVED3[29U];
|
uint32_t RESERVED3[32U];
|
||||||
__OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */
|
|
||||||
__IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */
|
|
||||||
__IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */
|
|
||||||
uint32_t RESERVED4[43U];
|
uint32_t RESERVED4[43U];
|
||||||
__OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */
|
__OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */
|
||||||
__IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */
|
__IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */
|
||||||
|
|
@ -1163,18 +1091,6 @@ typedef struct
|
||||||
#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */
|
#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */
|
||||||
#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */
|
#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */
|
||||||
|
|
||||||
/* ITM Integration Write Register Definitions */
|
|
||||||
#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */
|
|
||||||
#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */
|
|
||||||
|
|
||||||
/* ITM Integration Read Register Definitions */
|
|
||||||
#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */
|
|
||||||
#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */
|
|
||||||
|
|
||||||
/* ITM Integration Mode Control Register Definitions */
|
|
||||||
#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */
|
|
||||||
#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */
|
|
||||||
|
|
||||||
/* ITM Lock Status Register Definitions */
|
/* ITM Lock Status Register Definitions */
|
||||||
#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */
|
#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */
|
||||||
#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */
|
#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */
|
||||||
|
|
@ -1688,8 +1604,9 @@ typedef struct
|
||||||
__IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */
|
__IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */
|
||||||
__IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */
|
__IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */
|
||||||
__IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */
|
__IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */
|
||||||
__IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */
|
__IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and VFP Feature Register 0 */
|
||||||
__IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */
|
__IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and VFP Feature Register 1 */
|
||||||
|
__IM uint32_t MVFR2; /*!< Offset: 0x018 (R/ ) Media and VFP Feature Register 2 */
|
||||||
} FPU_Type;
|
} FPU_Type;
|
||||||
|
|
||||||
/* Floating-Point Context Control Register Definitions */
|
/* Floating-Point Context Control Register Definitions */
|
||||||
|
|
@ -1761,7 +1678,7 @@ typedef struct
|
||||||
#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */
|
#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */
|
||||||
#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */
|
#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */
|
||||||
|
|
||||||
/* Media and FP Feature Register 0 Definitions */
|
/* Media and VFP Feature Register 0 Definitions */
|
||||||
#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */
|
#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */
|
||||||
#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */
|
#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */
|
||||||
|
|
||||||
|
|
@ -1786,7 +1703,7 @@ typedef struct
|
||||||
#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */
|
#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */
|
||||||
#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */
|
#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */
|
||||||
|
|
||||||
/* Media and FP Feature Register 1 Definitions */
|
/* Media and VFP Feature Register 1 Definitions */
|
||||||
#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */
|
#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */
|
||||||
#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */
|
#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */
|
||||||
|
|
||||||
|
|
@ -1799,9 +1716,13 @@ typedef struct
|
||||||
#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */
|
#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */
|
||||||
#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */
|
#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */
|
||||||
|
|
||||||
|
/* Media and VFP Feature Register 2 Definitions */
|
||||||
|
#define FPU_MVFR2_FPMisc_Pos 4U /*!< MVFR2: FPMisc bits Position */
|
||||||
|
#define FPU_MVFR2_FPMisc_Msk (0xFUL << FPU_MVFR2_FPMisc_Pos) /*!< MVFR2: FPMisc bits Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_FPU */
|
/*@} end of group CMSIS_FPU */
|
||||||
|
|
||||||
|
/* CoreDebug is deprecated. replaced by DCB (Debug Control Block) */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
||||||
|
|
@ -1810,7 +1731,7 @@ typedef struct
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Structure type to access the Core Debug Register (CoreDebug).
|
\brief \deprecated Structure type to access the Core Debug Register (CoreDebug).
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
@ -1818,124 +1739,354 @@ typedef struct
|
||||||
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
uint32_t RESERVED4[1U];
|
uint32_t RESERVED0[1U];
|
||||||
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
} CoreDebug_Type;
|
} CoreDebug_Type;
|
||||||
|
|
||||||
/* Debug Halting Control and Status Register Definitions */
|
/* Debug Halting Control and Status Register Definitions */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */
|
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< \deprecated CoreDebug DHCSR: DBGKEY Position */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */
|
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< \deprecated CoreDebug DHCSR: DBGKEY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */
|
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */
|
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */
|
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Position */
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */
|
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */
|
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< \deprecated CoreDebug DHCSR: S_SLEEP Position */
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */
|
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< \deprecated CoreDebug DHCSR: S_SLEEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */
|
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< \deprecated CoreDebug DHCSR: S_HALT Position */
|
||||||
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */
|
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: S_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */
|
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< \deprecated CoreDebug DHCSR: S_REGRDY Position */
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */
|
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< \deprecated CoreDebug DHCSR: S_REGRDY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */
|
#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< \deprecated CoreDebug DHCSR: C_SNAPSTALL Position */
|
||||||
#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */
|
#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< \deprecated CoreDebug DHCSR: C_SNAPSTALL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */
|
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Position */
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */
|
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */
|
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< \deprecated CoreDebug DHCSR: C_STEP Position */
|
||||||
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */
|
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< \deprecated CoreDebug DHCSR: C_STEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */
|
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< \deprecated CoreDebug DHCSR: C_HALT Position */
|
||||||
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */
|
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: C_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Position */
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Mask */
|
||||||
|
|
||||||
/* Debug Core Register Selector Register Definitions */
|
/* Debug Core Register Selector Register Definitions */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */
|
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< \deprecated CoreDebug DCRSR: REGWnR Position */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */
|
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< \deprecated CoreDebug DCRSR: REGWnR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */
|
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< \deprecated CoreDebug DCRSR: REGSEL Position */
|
||||||
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */
|
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< \deprecated CoreDebug DCRSR: REGSEL Mask */
|
||||||
|
|
||||||
/* Debug Exception and Monitor Control Register Definitions */
|
/* Debug Exception and Monitor Control Register Definitions */
|
||||||
#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */
|
#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< \deprecated CoreDebug DEMCR: TRCENA Position */
|
||||||
#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */
|
#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< \deprecated CoreDebug DEMCR: TRCENA Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */
|
#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< \deprecated CoreDebug DEMCR: MON_REQ Position */
|
||||||
#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */
|
#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< \deprecated CoreDebug DEMCR: MON_REQ Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */
|
#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< \deprecated CoreDebug DEMCR: MON_STEP Position */
|
||||||
#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */
|
#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< \deprecated CoreDebug DEMCR: MON_STEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */
|
#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< \deprecated CoreDebug DEMCR: MON_PEND Position */
|
||||||
#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */
|
#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< \deprecated CoreDebug DEMCR: MON_PEND Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */
|
#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< \deprecated CoreDebug DEMCR: MON_EN Position */
|
||||||
#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */
|
#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< \deprecated CoreDebug DEMCR: MON_EN Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */
|
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */
|
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */
|
#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< \deprecated CoreDebug DEMCR: VC_INTERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */
|
#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_INTERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */
|
#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< \deprecated CoreDebug DEMCR: VC_BUSERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */
|
#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_BUSERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */
|
#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< \deprecated CoreDebug DEMCR: VC_STATERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */
|
#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_STATERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */
|
#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< \deprecated CoreDebug DEMCR: VC_CHKERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */
|
#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_CHKERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */
|
#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< \deprecated CoreDebug DEMCR: VC_NOCPERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */
|
#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_NOCPERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */
|
#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< \deprecated CoreDebug DEMCR: VC_MMERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */
|
#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_MMERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */
|
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Position */
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */
|
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Mask */
|
||||||
|
|
||||||
/* Debug Authentication Control Register Definitions */
|
/* Debug Authentication Control Register Definitions */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
||||||
|
|
||||||
/* Debug Security Control and Status Register Definitions */
|
/* Debug Security Control and Status Register Definitions */
|
||||||
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */
|
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< \deprecated CoreDebug DSCSR: CDS Position */
|
||||||
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */
|
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< \deprecated CoreDebug DSCSR: CDS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */
|
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< \deprecated CoreDebug DSCSR: SBRSEL Position */
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */
|
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< \deprecated CoreDebug DSCSR: SBRSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */
|
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< \deprecated CoreDebug DSCSR: SBRSELEN Position */
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */
|
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< \deprecated CoreDebug DSCSR: SBRSELEN Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_CoreDebug */
|
/*@} end of group CMSIS_CoreDebug */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DCB Debug Control Block
|
||||||
|
\brief Type definitions for the Debug Control Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Control Block Registers (DCB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */
|
||||||
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
|
uint32_t RESERVED0[1U];
|
||||||
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
|
} DCB_Type;
|
||||||
|
|
||||||
|
/* DHCSR, Debug Halting Control and Status Register Definitions */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Pos 16U /*!< DCB DHCSR: Debug key Position */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Msk (0xFFFFUL << DCB_DHCSR_DBGKEY_Pos) /*!< DCB DHCSR: Debug key Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Pos 26U /*!< DCB DHCSR: Restart sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Msk (0x1UL << DCB_DHCSR_S_RESTART_ST_Pos) /*!< DCB DHCSR: Restart sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Pos 25U /*!< DCB DHCSR: Reset sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Msk (0x1UL << DCB_DHCSR_S_RESET_ST_Pos) /*!< DCB DHCSR: Reset sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Pos 24U /*!< DCB DHCSR: Retire sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Msk (0x1UL << DCB_DHCSR_S_RETIRE_ST_Pos) /*!< DCB DHCSR: Retire sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SDE_Pos 20U /*!< DCB DHCSR: Secure debug enabled Position */
|
||||||
|
#define DCB_DHCSR_S_SDE_Msk (0x1UL << DCB_DHCSR_S_SDE_Pos) /*!< DCB DHCSR: Secure debug enabled Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Pos 19U /*!< DCB DHCSR: Lockup status Position */
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Msk (0x1UL << DCB_DHCSR_S_LOCKUP_Pos) /*!< DCB DHCSR: Lockup status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Pos 18U /*!< DCB DHCSR: Sleeping status Position */
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Msk (0x1UL << DCB_DHCSR_S_SLEEP_Pos) /*!< DCB DHCSR: Sleeping status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_HALT_Pos 17U /*!< DCB DHCSR: Halted status Position */
|
||||||
|
#define DCB_DHCSR_S_HALT_Msk (0x1UL << DCB_DHCSR_S_HALT_Pos) /*!< DCB DHCSR: Halted status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Pos 16U /*!< DCB DHCSR: Register ready status Position */
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Msk (0x1UL << DCB_DHCSR_S_REGRDY_Pos) /*!< DCB DHCSR: Register ready status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_SNAPSTALL_Pos 5U /*!< DCB DHCSR: Snap stall control Position */
|
||||||
|
#define DCB_DHCSR_C_SNAPSTALL_Msk (0x1UL << DCB_DHCSR_C_SNAPSTALL_Pos) /*!< DCB DHCSR: Snap stall control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Pos 3U /*!< DCB DHCSR: Mask interrupts control Position */
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Msk (0x1UL << DCB_DHCSR_C_MASKINTS_Pos) /*!< DCB DHCSR: Mask interrupts control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_STEP_Pos 2U /*!< DCB DHCSR: Step control Position */
|
||||||
|
#define DCB_DHCSR_C_STEP_Msk (0x1UL << DCB_DHCSR_C_STEP_Pos) /*!< DCB DHCSR: Step control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_HALT_Pos 1U /*!< DCB DHCSR: Halt control Position */
|
||||||
|
#define DCB_DHCSR_C_HALT_Msk (0x1UL << DCB_DHCSR_C_HALT_Pos) /*!< DCB DHCSR: Halt control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Pos 0U /*!< DCB DHCSR: Debug enable control Position */
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Msk (0x1UL /*<< DCB_DHCSR_C_DEBUGEN_Pos*/) /*!< DCB DHCSR: Debug enable control Mask */
|
||||||
|
|
||||||
|
/* DCRSR, Debug Core Register Select Register Definitions */
|
||||||
|
#define DCB_DCRSR_REGWnR_Pos 16U /*!< DCB DCRSR: Register write/not-read Position */
|
||||||
|
#define DCB_DCRSR_REGWnR_Msk (0x1UL << DCB_DCRSR_REGWnR_Pos) /*!< DCB DCRSR: Register write/not-read Mask */
|
||||||
|
|
||||||
|
#define DCB_DCRSR_REGSEL_Pos 0U /*!< DCB DCRSR: Register selector Position */
|
||||||
|
#define DCB_DCRSR_REGSEL_Msk (0x7FUL /*<< DCB_DCRSR_REGSEL_Pos*/) /*!< DCB DCRSR: Register selector Mask */
|
||||||
|
|
||||||
|
/* DCRDR, Debug Core Register Data Register Definitions */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Pos 0U /*!< DCB DCRDR: Data temporary buffer Position */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Msk (0xFFFFFFFFUL /*<< DCB_DCRDR_DBGTMP_Pos*/) /*!< DCB DCRDR: Data temporary buffer Mask */
|
||||||
|
|
||||||
|
/* DEMCR, Debug Exception and Monitor Control Register Definitions */
|
||||||
|
#define DCB_DEMCR_TRCENA_Pos 24U /*!< DCB DEMCR: Trace enable Position */
|
||||||
|
#define DCB_DEMCR_TRCENA_Msk (0x1UL << DCB_DEMCR_TRCENA_Pos) /*!< DCB DEMCR: Trace enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MONPRKEY_Pos 23U /*!< DCB DEMCR: Monitor pend req key Position */
|
||||||
|
#define DCB_DEMCR_MONPRKEY_Msk (0x1UL << DCB_DEMCR_MONPRKEY_Pos) /*!< DCB DEMCR: Monitor pend req key Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_UMON_EN_Pos 21U /*!< DCB DEMCR: Unprivileged monitor enable Position */
|
||||||
|
#define DCB_DEMCR_UMON_EN_Msk (0x1UL << DCB_DEMCR_UMON_EN_Pos) /*!< DCB DEMCR: Unprivileged monitor enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_SDME_Pos 20U /*!< DCB DEMCR: Secure DebugMonitor enable Position */
|
||||||
|
#define DCB_DEMCR_SDME_Msk (0x1UL << DCB_DEMCR_SDME_Pos) /*!< DCB DEMCR: Secure DebugMonitor enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_REQ_Pos 19U /*!< DCB DEMCR: Monitor request Position */
|
||||||
|
#define DCB_DEMCR_MON_REQ_Msk (0x1UL << DCB_DEMCR_MON_REQ_Pos) /*!< DCB DEMCR: Monitor request Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_STEP_Pos 18U /*!< DCB DEMCR: Monitor step Position */
|
||||||
|
#define DCB_DEMCR_MON_STEP_Msk (0x1UL << DCB_DEMCR_MON_STEP_Pos) /*!< DCB DEMCR: Monitor step Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_PEND_Pos 17U /*!< DCB DEMCR: Monitor pend Position */
|
||||||
|
#define DCB_DEMCR_MON_PEND_Msk (0x1UL << DCB_DEMCR_MON_PEND_Pos) /*!< DCB DEMCR: Monitor pend Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_EN_Pos 16U /*!< DCB DEMCR: Monitor enable Position */
|
||||||
|
#define DCB_DEMCR_MON_EN_Msk (0x1UL << DCB_DEMCR_MON_EN_Pos) /*!< DCB DEMCR: Monitor enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_SFERR_Pos 11U /*!< DCB DEMCR: Vector Catch SecureFault Position */
|
||||||
|
#define DCB_DEMCR_VC_SFERR_Msk (0x1UL << DCB_DEMCR_VC_SFERR_Pos) /*!< DCB DEMCR: Vector Catch SecureFault Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Pos 10U /*!< DCB DEMCR: Vector Catch HardFault errors Position */
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Msk (0x1UL << DCB_DEMCR_VC_HARDERR_Pos) /*!< DCB DEMCR: Vector Catch HardFault errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_INTERR_Pos 9U /*!< DCB DEMCR: Vector Catch interrupt errors Position */
|
||||||
|
#define DCB_DEMCR_VC_INTERR_Msk (0x1UL << DCB_DEMCR_VC_INTERR_Pos) /*!< DCB DEMCR: Vector Catch interrupt errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_BUSERR_Pos 8U /*!< DCB DEMCR: Vector Catch BusFault errors Position */
|
||||||
|
#define DCB_DEMCR_VC_BUSERR_Msk (0x1UL << DCB_DEMCR_VC_BUSERR_Pos) /*!< DCB DEMCR: Vector Catch BusFault errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_STATERR_Pos 7U /*!< DCB DEMCR: Vector Catch state errors Position */
|
||||||
|
#define DCB_DEMCR_VC_STATERR_Msk (0x1UL << DCB_DEMCR_VC_STATERR_Pos) /*!< DCB DEMCR: Vector Catch state errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_CHKERR_Pos 6U /*!< DCB DEMCR: Vector Catch check errors Position */
|
||||||
|
#define DCB_DEMCR_VC_CHKERR_Msk (0x1UL << DCB_DEMCR_VC_CHKERR_Pos) /*!< DCB DEMCR: Vector Catch check errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_NOCPERR_Pos 5U /*!< DCB DEMCR: Vector Catch NOCP errors Position */
|
||||||
|
#define DCB_DEMCR_VC_NOCPERR_Msk (0x1UL << DCB_DEMCR_VC_NOCPERR_Pos) /*!< DCB DEMCR: Vector Catch NOCP errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_MMERR_Pos 4U /*!< DCB DEMCR: Vector Catch MemManage errors Position */
|
||||||
|
#define DCB_DEMCR_VC_MMERR_Msk (0x1UL << DCB_DEMCR_VC_MMERR_Pos) /*!< DCB DEMCR: Vector Catch MemManage errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Pos 0U /*!< DCB DEMCR: Vector Catch Core reset Position */
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Msk (0x1UL /*<< DCB_DEMCR_VC_CORERESET_Pos*/) /*!< DCB DEMCR: Vector Catch Core reset Mask */
|
||||||
|
|
||||||
|
/* DAUTHCTRL, Debug Authentication Control Register Definitions */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPNIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Msk (0x1UL << DCB_DAUTHCTRL_SPNIDENSEL_Pos) /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< DCB DAUTHCTRL: Secure invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Msk (0x1UL /*<< DCB_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< DCB DAUTHCTRL: Secure invasive debug enable select Mask */
|
||||||
|
|
||||||
|
/* DSCSR, Debug Security Control and Status Register Definitions */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Pos 17U /*!< DCB DSCSR: CDS write-enable key Position */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Msk (0x1UL << DCB_DSCSR_CDSKEY_Pos) /*!< DCB DSCSR: CDS write-enable key Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_CDS_Pos 16U /*!< DCB DSCSR: Current domain Secure Position */
|
||||||
|
#define DCB_DSCSR_CDS_Msk (0x1UL << DCB_DSCSR_CDS_Pos) /*!< DCB DSCSR: Current domain Secure Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSEL_Pos 1U /*!< DCB DSCSR: Secure banked register select Position */
|
||||||
|
#define DCB_DSCSR_SBRSEL_Msk (0x1UL << DCB_DSCSR_SBRSEL_Pos) /*!< DCB DSCSR: Secure banked register select Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Pos 0U /*!< DCB DSCSR: Secure banked register select enable Position */
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Msk (0x1UL /*<< DCB_DSCSR_SBRSELEN_Pos*/) /*!< DCB DSCSR: Secure banked register select enable Mask */
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DCB */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DIB Debug Identification Block
|
||||||
|
\brief Type definitions for the Debug Identification Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Identification Block Registers (DIB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__OM uint32_t DLAR; /*!< Offset: 0x000 ( /W) SCS Software Lock Access Register */
|
||||||
|
__IM uint32_t DLSR; /*!< Offset: 0x004 (R/ ) SCS Software Lock Status Register */
|
||||||
|
__IM uint32_t DAUTHSTATUS; /*!< Offset: 0x008 (R/ ) Debug Authentication Status Register */
|
||||||
|
__IM uint32_t DDEVARCH; /*!< Offset: 0x00C (R/ ) SCS Device Architecture Register */
|
||||||
|
__IM uint32_t DDEVTYPE; /*!< Offset: 0x010 (R/ ) SCS Device Type Register */
|
||||||
|
} DIB_Type;
|
||||||
|
|
||||||
|
/* DLAR, SCS Software Lock Access Register Definitions */
|
||||||
|
#define DIB_DLAR_KEY_Pos 0U /*!< DIB DLAR: KEY Position */
|
||||||
|
#define DIB_DLAR_KEY_Msk (0xFFFFFFFFUL /*<< DIB_DLAR_KEY_Pos */) /*!< DIB DLAR: KEY Mask */
|
||||||
|
|
||||||
|
/* DLSR, SCS Software Lock Status Register Definitions */
|
||||||
|
#define DIB_DLSR_nTT_Pos 2U /*!< DIB DLSR: Not thirty-two bit Position */
|
||||||
|
#define DIB_DLSR_nTT_Msk (0x1UL << DIB_DLSR_nTT_Pos ) /*!< DIB DLSR: Not thirty-two bit Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLK_Pos 1U /*!< DIB DLSR: Software Lock status Position */
|
||||||
|
#define DIB_DLSR_SLK_Msk (0x1UL << DIB_DLSR_SLK_Pos ) /*!< DIB DLSR: Software Lock status Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLI_Pos 0U /*!< DIB DLSR: Software Lock implemented Position */
|
||||||
|
#define DIB_DLSR_SLI_Msk (0x1UL /*<< DIB_DLSR_SLI_Pos*/) /*!< DIB DLSR: Software Lock implemented Mask */
|
||||||
|
|
||||||
|
/* DAUTHSTATUS, Debug Authentication Status Register Definitions */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Pos 6U /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Msk (0x3UL << DIB_DAUTHSTATUS_SNID_Pos ) /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Pos 4U /*!< DIB DAUTHSTATUS: Secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Msk (0x3UL << DIB_DAUTHSTATUS_SID_Pos ) /*!< DIB DAUTHSTATUS: Secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Pos 2U /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Msk (0x3UL << DIB_DAUTHSTATUS_NSNID_Pos ) /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Pos 0U /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Msk (0x3UL /*<< DIB_DAUTHSTATUS_NSID_Pos*/) /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
/* DDEVARCH, SCS Device Architecture Register Definitions */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Pos 21U /*!< DIB DDEVARCH: Architect Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Msk (0x7FFUL << DIB_DDEVARCH_ARCHITECT_Pos ) /*!< DIB DDEVARCH: Architect Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Pos 20U /*!< DIB DDEVARCH: DEVARCH Present Position */
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Msk (0x1FUL << DIB_DDEVARCH_PRESENT_Pos ) /*!< DIB DDEVARCH: DEVARCH Present Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_REVISION_Pos 16U /*!< DIB DDEVARCH: Revision Position */
|
||||||
|
#define DIB_DDEVARCH_REVISION_Msk (0xFUL << DIB_DDEVARCH_REVISION_Pos ) /*!< DIB DDEVARCH: Revision Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Pos 12U /*!< DIB DDEVARCH: Architecture Version Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Msk (0xFUL << DIB_DDEVARCH_ARCHVER_Pos ) /*!< DIB DDEVARCH: Architecture Version Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Pos 0U /*!< DIB DDEVARCH: Architecture Part Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Msk (0xFFFUL /*<< DIB_DDEVARCH_ARCHPART_Pos*/) /*!< DIB DDEVARCH: Architecture Part Mask */
|
||||||
|
|
||||||
|
/* DDEVTYPE, SCS Device Type Register Definitions */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Pos 4U /*!< DIB DDEVTYPE: Sub-type Position */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Msk (0xFUL << DIB_DDEVTYPE_SUB_Pos ) /*!< DIB DDEVTYPE: Sub-type Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Pos 0U /*!< DIB DDEVTYPE: Major type Position */
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Msk (0xFUL /*<< DIB_DDEVTYPE_MAJOR_Pos*/) /*!< DIB DDEVTYPE: Major type Mask */
|
||||||
|
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DIB */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_core_bitfield Core register bit field macros
|
\defgroup CMSIS_core_bitfield Core register bit field macros
|
||||||
|
|
@ -1974,7 +2125,9 @@ typedef struct
|
||||||
#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */
|
#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */
|
||||||
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
||||||
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
||||||
#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */
|
#define CoreDebug_BASE (0xE000EDF0UL) /*!< \deprecated Core Debug Base Address */
|
||||||
|
#define DCB_BASE (0xE000EDF0UL) /*!< DCB Base Address */
|
||||||
|
#define DIB_BASE (0xE000EFB0UL) /*!< DIB Base Address */
|
||||||
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
||||||
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
||||||
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
||||||
|
|
@ -1986,7 +2139,9 @@ typedef struct
|
||||||
#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */
|
#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */
|
||||||
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
||||||
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
||||||
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */
|
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< \deprecated Core Debug configuration struct */
|
||||||
|
#define DCB ((DCB_Type *) DCB_BASE ) /*!< DCB configuration struct */
|
||||||
|
#define DIB ((DIB_Type *) DIB_BASE ) /*!< DIB configuration struct */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
||||||
|
|
@ -2003,7 +2158,9 @@ typedef struct
|
||||||
|
|
||||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
||||||
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */
|
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< \deprecated Core Debug Base Address (non-secure address space) */
|
||||||
|
#define DCB_BASE_NS (0xE002EDF0UL) /*!< DCB Base Address (non-secure address space) */
|
||||||
|
#define DIB_BASE_NS (0xE002EFB0UL) /*!< DIB Base Address (non-secure address space) */
|
||||||
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
||||||
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
||||||
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
||||||
|
|
@ -2012,7 +2169,9 @@ typedef struct
|
||||||
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
||||||
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
||||||
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
||||||
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */
|
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< \deprecated Core Debug configuration struct (non-secure address space) */
|
||||||
|
#define DCB_NS ((DCB_Type *) DCB_BASE_NS ) /*!< DCB configuration struct (non-secure address space) */
|
||||||
|
#define DIB_NS ((DIB_Type *) DIB_BASE_NS ) /*!< DIB configuration struct (non-secure address space) */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
||||||
|
|
@ -2026,6 +2185,15 @@ typedef struct
|
||||||
/*@} */
|
/*@} */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_register_aliases Backwards Compatibility Aliases
|
||||||
|
\brief Register alias definitions for backwards compatibility.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
#define ID_ADR (ID_AFR) /*!< SCB Auxiliary Feature Register */
|
||||||
|
/*@} */
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Hardware Abstraction Layer
|
* Hardware Abstraction Layer
|
||||||
|
|
@ -2093,7 +2261,7 @@ typedef struct
|
||||||
#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */
|
#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */
|
||||||
#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */
|
#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */
|
||||||
#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */
|
#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */
|
||||||
#define EXC_RETURN_SPSEL (0x00000002UL) /* bit [1] stack pointer used to restore context: 0=MSP 1=PSP */
|
#define EXC_RETURN_SPSEL (0x00000004UL) /* bit [2] stack pointer used to restore context: 0=MSP 1=PSP */
|
||||||
#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */
|
#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */
|
||||||
|
|
||||||
/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */
|
/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */
|
||||||
|
|
@ -2122,7 +2290,7 @@ __STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
|
||||||
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
|
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
|
||||||
reg_value = (reg_value |
|
reg_value = (reg_value |
|
||||||
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
|
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
|
||||||
(PriorityGroupTmp << 8U) ); /* Insert write key and priorty group */
|
(PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
|
||||||
SCB->AIRCR = reg_value;
|
SCB->AIRCR = reg_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2148,7 +2316,9 @@ __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
if ((int32_t)(IRQn) >= 0)
|
if ((int32_t)(IRQn) >= 0)
|
||||||
{
|
{
|
||||||
|
__COMPILER_BARRIER();
|
||||||
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
||||||
|
__COMPILER_BARRIER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2440,6 +2610,7 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
|
__DSB();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2496,7 +2667,7 @@ __STATIC_INLINE void TZ_NVIC_SetPriorityGrouping_NS(uint32_t PriorityGroup)
|
||||||
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
|
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
|
||||||
reg_value = (reg_value |
|
reg_value = (reg_value |
|
||||||
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
|
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
|
||||||
(PriorityGroupTmp << 8U) ); /* Insert write key and priorty group */
|
(PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
|
||||||
SCB_NS->AIRCR = reg_value;
|
SCB_NS->AIRCR = reg_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2728,6 +2899,13 @@ __STATIC_INLINE uint32_t SCB_GetFPUType(void)
|
||||||
/*@} end of CMSIS_Core_FpuFunctions */
|
/*@} end of CMSIS_Core_FpuFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
/* ########################## Cache functions #################################### */
|
||||||
|
|
||||||
|
#if ((defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)) || \
|
||||||
|
(defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)))
|
||||||
|
#include "cachel1_armv7.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* ########################## SAU functions #################################### */
|
/* ########################## SAU functions #################################### */
|
||||||
/**
|
/**
|
||||||
|
|
@ -2766,6 +2944,110 @@ __STATIC_INLINE void TZ_SAU_Disable(void)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Control function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DCBFunctions Debug Control Functions
|
||||||
|
\brief Functions that access the Debug Control Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register
|
||||||
|
\details writes to Debug Authentication Control register.
|
||||||
|
\param [in] value value to be writen.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void DCB_SetAuthCtrl(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register
|
||||||
|
\details Reads Debug Authentication Control register.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DCB_GetAuthCtrl(void)
|
||||||
|
{
|
||||||
|
return (DCB->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register (non-secure)
|
||||||
|
\details writes to non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\param [in] value value to be writen
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void TZ_DCB_SetAuthCtrl_NS(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB_NS->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DCB_GetAuthCtrl_NS(void)
|
||||||
|
{
|
||||||
|
return (DCB_NS->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Identification function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DIBFunctions Debug Identification Functions
|
||||||
|
\brief Functions that access the Debug Identification Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register
|
||||||
|
\details Reads Debug Authentication Status register.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DIB_GetAuthStatus(void)
|
||||||
|
{
|
||||||
|
return (DIB->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Status register when in secure state.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DIB_GetAuthStatus_NS(void)
|
||||||
|
{
|
||||||
|
return (DIB_NS->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ################################## SysTick function ############################################ */
|
/* ################################## SysTick function ############################################ */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_Core_FunctionInterface
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm0.h
|
* @file core_cm0.h
|
||||||
* @brief CMSIS Cortex-M0 Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M0 Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.5
|
* @version V5.0.8
|
||||||
* @date 28. May 2018
|
* @date 21. August 2019
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
#if defined __ARM_PCS_VFP
|
#if defined __ARM_FP
|
||||||
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -316,7 +316,7 @@ typedef struct
|
||||||
__IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */
|
__IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */
|
||||||
uint32_t RESERVED0[31U];
|
uint32_t RESERVED0[31U];
|
||||||
__IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */
|
__IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */
|
||||||
uint32_t RSERVED1[31U];
|
uint32_t RESERVED1[31U];
|
||||||
__IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */
|
__IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */
|
||||||
uint32_t RESERVED2[31U];
|
uint32_t RESERVED2[31U];
|
||||||
__IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */
|
__IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */
|
||||||
|
|
@ -624,7 +624,9 @@ __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
if ((int32_t)(IRQn) >= 0)
|
if ((int32_t)(IRQn) >= 0)
|
||||||
{
|
{
|
||||||
|
__COMPILER_BARRIER();
|
||||||
NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
||||||
|
__COMPILER_BARRIER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -829,8 +831,9 @@ __STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGr
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
uint32_t *vectors = (uint32_t *)0x0U;
|
uint32_t *vectors = (uint32_t *)(NVIC_USER_IRQ_OFFSET << 2); /* point to 1st user interrupt */
|
||||||
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
*(vectors + (int32_t)IRQn) = vector; /* use pointer arithmetic to access vector */
|
||||||
|
/* ARM Application Note 321 states that the M0 does not require the architectural barrier */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -844,8 +847,8 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
|
__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
uint32_t *vectors = (uint32_t *)0x0U;
|
uint32_t *vectors = (uint32_t *)(NVIC_USER_IRQ_OFFSET << 2); /* point to 1st user interrupt */
|
||||||
return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET];
|
return *(vectors + (int32_t)IRQn); /* use pointer arithmetic to access vector */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm0plus.h
|
* @file core_cm0plus.h
|
||||||
* @brief CMSIS Cortex-M0+ Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M0+ Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.6
|
* @version V5.0.9
|
||||||
* @date 28. May 2018
|
* @date 21. August 2019
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
#if defined __ARM_PCS_VFP
|
#if defined __ARM_FP
|
||||||
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -330,7 +330,7 @@ typedef struct
|
||||||
__IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */
|
__IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */
|
||||||
uint32_t RESERVED0[31U];
|
uint32_t RESERVED0[31U];
|
||||||
__IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */
|
__IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */
|
||||||
uint32_t RSERVED1[31U];
|
uint32_t RESERVED1[31U];
|
||||||
__IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */
|
__IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */
|
||||||
uint32_t RESERVED2[31U];
|
uint32_t RESERVED2[31U];
|
||||||
__IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */
|
__IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */
|
||||||
|
|
@ -742,7 +742,9 @@ __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
if ((int32_t)(IRQn) >= 0)
|
if ((int32_t)(IRQn) >= 0)
|
||||||
{
|
{
|
||||||
|
__COMPILER_BARRIER();
|
||||||
NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
||||||
|
__COMPILER_BARRIER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -949,10 +951,12 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
|
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
|
||||||
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
#else
|
|
||||||
uint32_t *vectors = (uint32_t *)0x0U;
|
|
||||||
#endif
|
|
||||||
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
|
#else
|
||||||
|
uint32_t *vectors = (uint32_t *)(NVIC_USER_IRQ_OFFSET << 2); /* point to 1st user interrupt */
|
||||||
|
*(vectors + (int32_t)IRQn) = vector; /* use pointer arithmetic to access vector */
|
||||||
|
#endif
|
||||||
|
/* ARM Application Note 321 states that the M0+ does not require the architectural barrier */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -968,11 +972,11 @@ __STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
|
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
|
||||||
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
#else
|
|
||||||
uint32_t *vectors = (uint32_t *)0x0U;
|
|
||||||
#endif
|
|
||||||
return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET];
|
return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET];
|
||||||
|
#else
|
||||||
|
uint32_t *vectors = (uint32_t *)(NVIC_USER_IRQ_OFFSET << 2); /* point to 1st user interrupt */
|
||||||
|
return *(vectors + (int32_t)IRQn); /* use pointer arithmetic to access vector */
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm1.h
|
* @file core_cm1.h
|
||||||
* @brief CMSIS Cortex-M1 Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M1 Core Peripheral Access Layer Header File
|
||||||
* @version V1.0.0
|
* @version V1.0.1
|
||||||
* @date 23. July 2018
|
* @date 12. November 2018
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
#if defined __ARM_PCS_VFP
|
#if defined __ARM_FP
|
||||||
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -651,7 +651,9 @@ __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
if ((int32_t)(IRQn) >= 0)
|
if ((int32_t)(IRQn) >= 0)
|
||||||
{
|
{
|
||||||
|
__COMPILER_BARRIER();
|
||||||
NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
||||||
|
__COMPILER_BARRIER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -858,6 +860,7 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
uint32_t *vectors = (uint32_t *)0x0U;
|
uint32_t *vectors = (uint32_t *)0x0U;
|
||||||
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
|
/* ARM Application Note 321 states that the M1 does not require the architectural barrier */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm23.h
|
* @file core_cm23.h
|
||||||
* @brief CMSIS Cortex-M23 Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M23 Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.7
|
* @version V5.1.0
|
||||||
* @date 22. June 2018
|
* @date 11. February 2020
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -26,6 +26,8 @@
|
||||||
#pragma system_include /* treat file as system include file for MISRA check */
|
#pragma system_include /* treat file as system include file for MISRA check */
|
||||||
#elif defined (__clang__)
|
#elif defined (__clang__)
|
||||||
#pragma clang system_header /* treat file as system include file */
|
#pragma clang system_header /* treat file as system include file */
|
||||||
|
#elif defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic ignored "-Wpedantic" /* disable pedantic warning due to unnamed structs/unions */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __CORE_CM23_H_GENERIC
|
#ifndef __CORE_CM23_H_GENERIC
|
||||||
|
|
@ -81,7 +83,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
#if defined __ARM_PCS_VFP
|
#if defined __ARM_FP
|
||||||
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -1050,6 +1052,7 @@ typedef struct
|
||||||
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
|
||||||
|
/* CoreDebug is deprecated. replaced by DCB (Debug Control Block) */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
||||||
|
|
@ -1058,7 +1061,7 @@ typedef struct
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Structure type to access the Core Debug Register (CoreDebug).
|
\brief \deprecated Structure type to access the Core Debug Register (CoreDebug).
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
@ -1066,91 +1069,276 @@ typedef struct
|
||||||
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
uint32_t RESERVED4[1U];
|
uint32_t RESERVED0[1U];
|
||||||
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
} CoreDebug_Type;
|
} CoreDebug_Type;
|
||||||
|
|
||||||
/* Debug Halting Control and Status Register Definitions */
|
/* Debug Halting Control and Status Register Definitions */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */
|
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< \deprecated CoreDebug DHCSR: DBGKEY Position */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */
|
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< \deprecated CoreDebug DHCSR: DBGKEY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */
|
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */
|
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */
|
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Position */
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */
|
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */
|
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< \deprecated CoreDebug DHCSR: S_SLEEP Position */
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */
|
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< \deprecated CoreDebug DHCSR: S_SLEEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */
|
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< \deprecated CoreDebug DHCSR: S_HALT Position */
|
||||||
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */
|
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: S_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */
|
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< \deprecated CoreDebug DHCSR: S_REGRDY Position */
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */
|
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< \deprecated CoreDebug DHCSR: S_REGRDY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */
|
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Position */
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */
|
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */
|
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< \deprecated CoreDebug DHCSR: C_STEP Position */
|
||||||
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */
|
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< \deprecated CoreDebug DHCSR: C_STEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */
|
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< \deprecated CoreDebug DHCSR: C_HALT Position */
|
||||||
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */
|
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: C_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Position */
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Mask */
|
||||||
|
|
||||||
/* Debug Core Register Selector Register Definitions */
|
/* Debug Core Register Selector Register Definitions */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */
|
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< \deprecated CoreDebug DCRSR: REGWnR Position */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */
|
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< \deprecated CoreDebug DCRSR: REGWnR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */
|
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< \deprecated CoreDebug DCRSR: REGSEL Position */
|
||||||
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */
|
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< \deprecated CoreDebug DCRSR: REGSEL Mask */
|
||||||
|
|
||||||
/* Debug Exception and Monitor Control Register */
|
/* Debug Exception and Monitor Control Register */
|
||||||
#define CoreDebug_DEMCR_DWTENA_Pos 24U /*!< CoreDebug DEMCR: DWTENA Position */
|
#define CoreDebug_DEMCR_DWTENA_Pos 24U /*!< \deprecated CoreDebug DEMCR: DWTENA Position */
|
||||||
#define CoreDebug_DEMCR_DWTENA_Msk (1UL << CoreDebug_DEMCR_DWTENA_Pos) /*!< CoreDebug DEMCR: DWTENA Mask */
|
#define CoreDebug_DEMCR_DWTENA_Msk (1UL << CoreDebug_DEMCR_DWTENA_Pos) /*!< \deprecated CoreDebug DEMCR: DWTENA Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */
|
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */
|
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */
|
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Position */
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */
|
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Mask */
|
||||||
|
|
||||||
/* Debug Authentication Control Register Definitions */
|
/* Debug Authentication Control Register Definitions */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
||||||
|
|
||||||
/* Debug Security Control and Status Register Definitions */
|
/* Debug Security Control and Status Register Definitions */
|
||||||
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */
|
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< \deprecated CoreDebug DSCSR: CDS Position */
|
||||||
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */
|
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< \deprecated CoreDebug DSCSR: CDS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */
|
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< \deprecated CoreDebug DSCSR: SBRSEL Position */
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */
|
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< \deprecated CoreDebug DSCSR: SBRSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */
|
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< \deprecated CoreDebug DSCSR: SBRSELEN Position */
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */
|
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< \deprecated CoreDebug DSCSR: SBRSELEN Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_CoreDebug */
|
/*@} end of group CMSIS_CoreDebug */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DCB Debug Control Block
|
||||||
|
\brief Type definitions for the Debug Control Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Control Block Registers (DCB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */
|
||||||
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
|
uint32_t RESERVED0[1U];
|
||||||
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
|
} DCB_Type;
|
||||||
|
|
||||||
|
/* DHCSR, Debug Halting Control and Status Register Definitions */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Pos 16U /*!< DCB DHCSR: Debug key Position */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Msk (0xFFFFUL << DCB_DHCSR_DBGKEY_Pos) /*!< DCB DHCSR: Debug key Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Pos 26U /*!< DCB DHCSR: Restart sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Msk (0x1UL << DCB_DHCSR_S_RESTART_ST_Pos) /*!< DCB DHCSR: Restart sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Pos 25U /*!< DCB DHCSR: Reset sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Msk (0x1UL << DCB_DHCSR_S_RESET_ST_Pos) /*!< DCB DHCSR: Reset sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Pos 24U /*!< DCB DHCSR: Retire sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Msk (0x1UL << DCB_DHCSR_S_RETIRE_ST_Pos) /*!< DCB DHCSR: Retire sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SDE_Pos 20U /*!< DCB DHCSR: Secure debug enabled Position */
|
||||||
|
#define DCB_DHCSR_S_SDE_Msk (0x1UL << DCB_DHCSR_S_SDE_Pos) /*!< DCB DHCSR: Secure debug enabled Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Pos 19U /*!< DCB DHCSR: Lockup status Position */
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Msk (0x1UL << DCB_DHCSR_S_LOCKUP_Pos) /*!< DCB DHCSR: Lockup status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Pos 18U /*!< DCB DHCSR: Sleeping status Position */
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Msk (0x1UL << DCB_DHCSR_S_SLEEP_Pos) /*!< DCB DHCSR: Sleeping status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_HALT_Pos 17U /*!< DCB DHCSR: Halted status Position */
|
||||||
|
#define DCB_DHCSR_S_HALT_Msk (0x1UL << DCB_DHCSR_S_HALT_Pos) /*!< DCB DHCSR: Halted status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Pos 16U /*!< DCB DHCSR: Register ready status Position */
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Msk (0x1UL << DCB_DHCSR_S_REGRDY_Pos) /*!< DCB DHCSR: Register ready status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Pos 3U /*!< DCB DHCSR: Mask interrupts control Position */
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Msk (0x1UL << DCB_DHCSR_C_MASKINTS_Pos) /*!< DCB DHCSR: Mask interrupts control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_STEP_Pos 2U /*!< DCB DHCSR: Step control Position */
|
||||||
|
#define DCB_DHCSR_C_STEP_Msk (0x1UL << DCB_DHCSR_C_STEP_Pos) /*!< DCB DHCSR: Step control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_HALT_Pos 1U /*!< DCB DHCSR: Halt control Position */
|
||||||
|
#define DCB_DHCSR_C_HALT_Msk (0x1UL << DCB_DHCSR_C_HALT_Pos) /*!< DCB DHCSR: Halt control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Pos 0U /*!< DCB DHCSR: Debug enable control Position */
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Msk (0x1UL /*<< DCB_DHCSR_C_DEBUGEN_Pos*/) /*!< DCB DHCSR: Debug enable control Mask */
|
||||||
|
|
||||||
|
/* DCRSR, Debug Core Register Select Register Definitions */
|
||||||
|
#define DCB_DCRSR_REGWnR_Pos 16U /*!< DCB DCRSR: Register write/not-read Position */
|
||||||
|
#define DCB_DCRSR_REGWnR_Msk (0x1UL << DCB_DCRSR_REGWnR_Pos) /*!< DCB DCRSR: Register write/not-read Mask */
|
||||||
|
|
||||||
|
#define DCB_DCRSR_REGSEL_Pos 0U /*!< DCB DCRSR: Register selector Position */
|
||||||
|
#define DCB_DCRSR_REGSEL_Msk (0x7FUL /*<< DCB_DCRSR_REGSEL_Pos*/) /*!< DCB DCRSR: Register selector Mask */
|
||||||
|
|
||||||
|
/* DCRDR, Debug Core Register Data Register Definitions */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Pos 0U /*!< DCB DCRDR: Data temporary buffer Position */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Msk (0xFFFFFFFFUL /*<< DCB_DCRDR_DBGTMP_Pos*/) /*!< DCB DCRDR: Data temporary buffer Mask */
|
||||||
|
|
||||||
|
/* DEMCR, Debug Exception and Monitor Control Register Definitions */
|
||||||
|
#define DCB_DEMCR_TRCENA_Pos 24U /*!< DCB DEMCR: Trace enable Position */
|
||||||
|
#define DCB_DEMCR_TRCENA_Msk (0x1UL << DCB_DEMCR_TRCENA_Pos) /*!< DCB DEMCR: Trace enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Pos 10U /*!< DCB DEMCR: Vector Catch HardFault errors Position */
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Msk (0x1UL << DCB_DEMCR_VC_HARDERR_Pos) /*!< DCB DEMCR: Vector Catch HardFault errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Pos 0U /*!< DCB DEMCR: Vector Catch Core reset Position */
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Msk (0x1UL /*<< DCB_DEMCR_VC_CORERESET_Pos*/) /*!< DCB DEMCR: Vector Catch Core reset Mask */
|
||||||
|
|
||||||
|
/* DAUTHCTRL, Debug Authentication Control Register Definitions */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPNIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Msk (0x1UL << DCB_DAUTHCTRL_SPNIDENSEL_Pos) /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< DCB DAUTHCTRL: Secure invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Msk (0x1UL /*<< DCB_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< DCB DAUTHCTRL: Secure invasive debug enable select Mask */
|
||||||
|
|
||||||
|
/* DSCSR, Debug Security Control and Status Register Definitions */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Pos 17U /*!< DCB DSCSR: CDS write-enable key Position */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Msk (0x1UL << DCB_DSCSR_CDSKEY_Pos) /*!< DCB DSCSR: CDS write-enable key Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_CDS_Pos 16U /*!< DCB DSCSR: Current domain Secure Position */
|
||||||
|
#define DCB_DSCSR_CDS_Msk (0x1UL << DCB_DSCSR_CDS_Pos) /*!< DCB DSCSR: Current domain Secure Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSEL_Pos 1U /*!< DCB DSCSR: Secure banked register select Position */
|
||||||
|
#define DCB_DSCSR_SBRSEL_Msk (0x1UL << DCB_DSCSR_SBRSEL_Pos) /*!< DCB DSCSR: Secure banked register select Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Pos 0U /*!< DCB DSCSR: Secure banked register select enable Position */
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Msk (0x1UL /*<< DCB_DSCSR_SBRSELEN_Pos*/) /*!< DCB DSCSR: Secure banked register select enable Mask */
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DCB */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DIB Debug Identification Block
|
||||||
|
\brief Type definitions for the Debug Identification Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Identification Block Registers (DIB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__OM uint32_t DLAR; /*!< Offset: 0x000 ( /W) SCS Software Lock Access Register */
|
||||||
|
__IM uint32_t DLSR; /*!< Offset: 0x004 (R/ ) SCS Software Lock Status Register */
|
||||||
|
__IM uint32_t DAUTHSTATUS; /*!< Offset: 0x008 (R/ ) Debug Authentication Status Register */
|
||||||
|
__IM uint32_t DDEVARCH; /*!< Offset: 0x00C (R/ ) SCS Device Architecture Register */
|
||||||
|
__IM uint32_t DDEVTYPE; /*!< Offset: 0x010 (R/ ) SCS Device Type Register */
|
||||||
|
} DIB_Type;
|
||||||
|
|
||||||
|
/* DLAR, SCS Software Lock Access Register Definitions */
|
||||||
|
#define DIB_DLAR_KEY_Pos 0U /*!< DIB DLAR: KEY Position */
|
||||||
|
#define DIB_DLAR_KEY_Msk (0xFFFFFFFFUL /*<< DIB_DLAR_KEY_Pos */) /*!< DIB DLAR: KEY Mask */
|
||||||
|
|
||||||
|
/* DLSR, SCS Software Lock Status Register Definitions */
|
||||||
|
#define DIB_DLSR_nTT_Pos 2U /*!< DIB DLSR: Not thirty-two bit Position */
|
||||||
|
#define DIB_DLSR_nTT_Msk (0x1UL << DIB_DLSR_nTT_Pos ) /*!< DIB DLSR: Not thirty-two bit Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLK_Pos 1U /*!< DIB DLSR: Software Lock status Position */
|
||||||
|
#define DIB_DLSR_SLK_Msk (0x1UL << DIB_DLSR_SLK_Pos ) /*!< DIB DLSR: Software Lock status Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLI_Pos 0U /*!< DIB DLSR: Software Lock implemented Position */
|
||||||
|
#define DIB_DLSR_SLI_Msk (0x1UL /*<< DIB_DLSR_SLI_Pos*/) /*!< DIB DLSR: Software Lock implemented Mask */
|
||||||
|
|
||||||
|
/* DAUTHSTATUS, Debug Authentication Status Register Definitions */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Pos 6U /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Msk (0x3UL << DIB_DAUTHSTATUS_SNID_Pos ) /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Pos 4U /*!< DIB DAUTHSTATUS: Secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Msk (0x3UL << DIB_DAUTHSTATUS_SID_Pos ) /*!< DIB DAUTHSTATUS: Secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Pos 2U /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Msk (0x3UL << DIB_DAUTHSTATUS_NSNID_Pos ) /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Pos 0U /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Msk (0x3UL /*<< DIB_DAUTHSTATUS_NSID_Pos*/) /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
/* DDEVARCH, SCS Device Architecture Register Definitions */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Pos 21U /*!< DIB DDEVARCH: Architect Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Msk (0x7FFUL << DIB_DDEVARCH_ARCHITECT_Pos ) /*!< DIB DDEVARCH: Architect Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Pos 20U /*!< DIB DDEVARCH: DEVARCH Present Position */
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Msk (0x1FUL << DIB_DDEVARCH_PRESENT_Pos ) /*!< DIB DDEVARCH: DEVARCH Present Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_REVISION_Pos 16U /*!< DIB DDEVARCH: Revision Position */
|
||||||
|
#define DIB_DDEVARCH_REVISION_Msk (0xFUL << DIB_DDEVARCH_REVISION_Pos ) /*!< DIB DDEVARCH: Revision Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Pos 12U /*!< DIB DDEVARCH: Architecture Version Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Msk (0xFUL << DIB_DDEVARCH_ARCHVER_Pos ) /*!< DIB DDEVARCH: Architecture Version Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Pos 0U /*!< DIB DDEVARCH: Architecture Part Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Msk (0xFFFUL /*<< DIB_DDEVARCH_ARCHPART_Pos*/) /*!< DIB DDEVARCH: Architecture Part Mask */
|
||||||
|
|
||||||
|
/* DDEVTYPE, SCS Device Type Register Definitions */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Pos 4U /*!< DIB DDEVTYPE: Sub-type Position */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Msk (0xFUL << DIB_DDEVTYPE_SUB_Pos ) /*!< DIB DDEVTYPE: Sub-type Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Pos 0U /*!< DIB DDEVTYPE: Major type Position */
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Msk (0xFUL /*<< DIB_DDEVTYPE_MAJOR_Pos*/) /*!< DIB DDEVTYPE: Major type Mask */
|
||||||
|
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DIB */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_core_bitfield Core register bit field macros
|
\defgroup CMSIS_core_bitfield Core register bit field macros
|
||||||
|
|
@ -1188,7 +1376,9 @@ typedef struct
|
||||||
#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */
|
#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */
|
||||||
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
||||||
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
||||||
#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */
|
#define CoreDebug_BASE (0xE000EDF0UL) /*!< \deprecated Core Debug Base Address */
|
||||||
|
#define DCB_BASE (0xE000EDF0UL) /*!< DCB Base Address */
|
||||||
|
#define DIB_BASE (0xE000EFB0UL) /*!< DIB Base Address */
|
||||||
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
||||||
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
||||||
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
||||||
|
|
@ -1199,7 +1389,9 @@ typedef struct
|
||||||
#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */
|
#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */
|
||||||
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
||||||
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
||||||
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */
|
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< \deprecated Core Debug configuration struct */
|
||||||
|
#define DCB ((DCB_Type *) DCB_BASE ) /*!< DCB configuration struct */
|
||||||
|
#define DIB ((DIB_Type *) DIB_BASE ) /*!< DIB configuration struct */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
||||||
|
|
@ -1213,7 +1405,9 @@ typedef struct
|
||||||
|
|
||||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
||||||
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */
|
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< \deprecated Core Debug Base Address (non-secure address space) */
|
||||||
|
#define DCB_BASE_NS (0xE002EDF0UL) /*!< DCB Base Address (non-secure address space) */
|
||||||
|
#define DIB_BASE_NS (0xE002EFB0UL) /*!< DIB Base Address (non-secure address space) */
|
||||||
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
||||||
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
||||||
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
||||||
|
|
@ -1221,7 +1415,9 @@ typedef struct
|
||||||
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
||||||
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
||||||
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
||||||
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */
|
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< \deprecated Core Debug configuration struct (non-secure address space) */
|
||||||
|
#define DCB_NS ((DCB_Type *) DCB_BASE_NS ) /*!< DCB configuration struct (non-secure address space) */
|
||||||
|
#define DIB_NS ((DIB_Type *) DIB_BASE_NS ) /*!< DIB configuration struct (non-secure address space) */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
||||||
|
|
@ -1238,6 +1434,7 @@ typedef struct
|
||||||
Core Function Interface contains:
|
Core Function Interface contains:
|
||||||
- Core NVIC Functions
|
- Core NVIC Functions
|
||||||
- Core SysTick Functions
|
- Core SysTick Functions
|
||||||
|
- Core Debug Functions
|
||||||
- Core Register Access Functions
|
- Core Register Access Functions
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/**
|
/**
|
||||||
|
|
@ -1298,7 +1495,7 @@ typedef struct
|
||||||
#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */
|
#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */
|
||||||
#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */
|
#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */
|
||||||
#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */
|
#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */
|
||||||
#define EXC_RETURN_SPSEL (0x00000002UL) /* bit [1] stack pointer used to restore context: 0=MSP 1=PSP */
|
#define EXC_RETURN_SPSEL (0x00000004UL) /* bit [2] stack pointer used to restore context: 0=MSP 1=PSP */
|
||||||
#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */
|
#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */
|
||||||
|
|
||||||
/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */
|
/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */
|
||||||
|
|
@ -1328,7 +1525,9 @@ __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
if ((int32_t)(IRQn) >= 0)
|
if ((int32_t)(IRQn) >= 0)
|
||||||
{
|
{
|
||||||
|
__COMPILER_BARRIER();
|
||||||
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
||||||
|
__COMPILER_BARRIER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1627,6 +1826,7 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
uint32_t *vectors = (uint32_t *)0x0U;
|
uint32_t *vectors = (uint32_t *)0x0U;
|
||||||
#endif
|
#endif
|
||||||
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
|
__DSB();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1910,6 +2110,110 @@ __STATIC_INLINE void TZ_SAU_Disable(void)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Control function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DCBFunctions Debug Control Functions
|
||||||
|
\brief Functions that access the Debug Control Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register
|
||||||
|
\details writes to Debug Authentication Control register.
|
||||||
|
\param [in] value value to be writen.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void DCB_SetAuthCtrl(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register
|
||||||
|
\details Reads Debug Authentication Control register.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DCB_GetAuthCtrl(void)
|
||||||
|
{
|
||||||
|
return (DCB->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register (non-secure)
|
||||||
|
\details writes to non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\param [in] value value to be writen
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void TZ_DCB_SetAuthCtrl_NS(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB_NS->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DCB_GetAuthCtrl_NS(void)
|
||||||
|
{
|
||||||
|
return (DCB_NS->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Identification function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DIBFunctions Debug Identification Functions
|
||||||
|
\brief Functions that access the Debug Identification Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register
|
||||||
|
\details Reads Debug Authentication Status register.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DIB_GetAuthStatus(void)
|
||||||
|
{
|
||||||
|
return (DIB->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Status register when in secure state.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DIB_GetAuthStatus_NS(void)
|
||||||
|
{
|
||||||
|
return (DIB_NS->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ################################## SysTick function ############################################ */
|
/* ################################## SysTick function ############################################ */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_Core_FunctionInterface
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm3.h
|
* @file core_cm3.h
|
||||||
* @brief CMSIS Cortex-M3 Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M3 Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.8
|
* @version V5.1.2
|
||||||
* @date 04. June 2018
|
* @date 04. June 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
#if defined __ARM_PCS_VFP
|
#if defined __ARM_FP
|
||||||
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -142,6 +142,11 @@
|
||||||
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VTOR_PRESENT
|
||||||
|
#define __VTOR_PRESENT 1U
|
||||||
|
#warning "__VTOR_PRESENT not defined in device header file; using default!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NVIC_PRIO_BITS
|
#ifndef __NVIC_PRIO_BITS
|
||||||
#define __NVIC_PRIO_BITS 3U
|
#define __NVIC_PRIO_BITS 3U
|
||||||
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
||||||
|
|
@ -342,7 +347,7 @@ typedef struct
|
||||||
__IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */
|
__IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */
|
||||||
uint32_t RESERVED0[24U];
|
uint32_t RESERVED0[24U];
|
||||||
__IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */
|
__IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */
|
||||||
uint32_t RSERVED1[24U];
|
uint32_t RESERVED1[24U];
|
||||||
__IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */
|
__IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */
|
||||||
uint32_t RESERVED2[24U];
|
uint32_t RESERVED2[24U];
|
||||||
__IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */
|
__IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */
|
||||||
|
|
@ -560,19 +565,19 @@ typedef struct
|
||||||
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
||||||
|
|
||||||
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
#define SCB_CFSR_MMARVALID_Pos (SCB_CFSR_MEMFAULTSR_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
||||||
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
#define SCB_CFSR_MSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
||||||
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
#define SCB_CFSR_MUNSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
||||||
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
#define SCB_CFSR_DACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
||||||
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
#define SCB_CFSR_IACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
||||||
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
||||||
|
|
||||||
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
|
|
@ -668,6 +673,12 @@ typedef struct
|
||||||
#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */
|
#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */
|
||||||
|
|
||||||
/* Auxiliary Control Register Definitions */
|
/* Auxiliary Control Register Definitions */
|
||||||
|
#if defined (__CM3_REV) && (__CM3_REV >= 0x200U)
|
||||||
|
#define SCnSCB_ACTLR_DISOOFP_Pos 9U /*!< ACTLR: DISOOFP Position */
|
||||||
|
#define SCnSCB_ACTLR_DISOOFP_Msk (1UL << SCnSCB_ACTLR_DISOOFP_Pos) /*!< ACTLR: DISOOFP Mask */
|
||||||
|
|
||||||
|
#define SCnSCB_ACTLR_DISFPCA_Pos 8U /*!< ACTLR: DISFPCA Position */
|
||||||
|
#define SCnSCB_ACTLR_DISFPCA_Msk (1UL << SCnSCB_ACTLR_DISFPCA_Pos) /*!< ACTLR: DISFPCA Mask */
|
||||||
|
|
||||||
#define SCnSCB_ACTLR_DISFOLD_Pos 2U /*!< ACTLR: DISFOLD Position */
|
#define SCnSCB_ACTLR_DISFOLD_Pos 2U /*!< ACTLR: DISFOLD Position */
|
||||||
#define SCnSCB_ACTLR_DISFOLD_Msk (1UL << SCnSCB_ACTLR_DISFOLD_Pos) /*!< ACTLR: DISFOLD Mask */
|
#define SCnSCB_ACTLR_DISFOLD_Msk (1UL << SCnSCB_ACTLR_DISFOLD_Pos) /*!< ACTLR: DISFOLD Mask */
|
||||||
|
|
@ -677,6 +688,7 @@ typedef struct
|
||||||
|
|
||||||
#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */
|
#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */
|
||||||
#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */
|
#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */
|
||||||
|
#endif
|
||||||
|
|
||||||
/*@} end of group CMSIS_SCnotSCB */
|
/*@} end of group CMSIS_SCnotSCB */
|
||||||
|
|
||||||
|
|
@ -757,10 +769,7 @@ typedef struct
|
||||||
__IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */
|
__IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */
|
||||||
uint32_t RESERVED2[15U];
|
uint32_t RESERVED2[15U];
|
||||||
__IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */
|
__IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */
|
||||||
uint32_t RESERVED3[29U];
|
uint32_t RESERVED3[32U];
|
||||||
__OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */
|
|
||||||
__IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */
|
|
||||||
__IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */
|
|
||||||
uint32_t RESERVED4[43U];
|
uint32_t RESERVED4[43U];
|
||||||
__OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */
|
__OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */
|
||||||
__IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */
|
__IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */
|
||||||
|
|
@ -811,18 +820,6 @@ typedef struct
|
||||||
#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */
|
#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */
|
||||||
#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */
|
#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */
|
||||||
|
|
||||||
/* ITM Integration Write Register Definitions */
|
|
||||||
#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */
|
|
||||||
#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */
|
|
||||||
|
|
||||||
/* ITM Integration Read Register Definitions */
|
|
||||||
#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */
|
|
||||||
#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */
|
|
||||||
|
|
||||||
/* ITM Integration Mode Control Register Definitions */
|
|
||||||
#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */
|
|
||||||
#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */
|
|
||||||
|
|
||||||
/* ITM Lock Status Register Definitions */
|
/* ITM Lock Status Register Definitions */
|
||||||
#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */
|
#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */
|
||||||
#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */
|
#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */
|
||||||
|
|
@ -1055,13 +1052,13 @@ typedef struct
|
||||||
|
|
||||||
/* TPI Integration ETM Data Register Definitions (FIFO0) */
|
/* TPI Integration ETM Data Register Definitions (FIFO0) */
|
||||||
#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */
|
#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */
|
||||||
#define TPI_FIFO0_ITM_ATVALID_Msk (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */
|
#define TPI_FIFO0_ITM_ATVALID_Msk (0x1UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */
|
#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */
|
||||||
#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */
|
#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */
|
||||||
|
|
||||||
#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */
|
#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */
|
||||||
#define TPI_FIFO0_ETM_ATVALID_Msk (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */
|
#define TPI_FIFO0_ETM_ATVALID_Msk (0x1UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */
|
#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */
|
||||||
#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */
|
#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */
|
||||||
|
|
@ -1084,13 +1081,13 @@ typedef struct
|
||||||
|
|
||||||
/* TPI Integration ITM Data Register Definitions (FIFO1) */
|
/* TPI Integration ITM Data Register Definitions (FIFO1) */
|
||||||
#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */
|
#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */
|
||||||
#define TPI_FIFO1_ITM_ATVALID_Msk (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */
|
#define TPI_FIFO1_ITM_ATVALID_Msk (0x1UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */
|
#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */
|
||||||
#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */
|
#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */
|
||||||
|
|
||||||
#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */
|
#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */
|
||||||
#define TPI_FIFO1_ETM_ATVALID_Msk (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */
|
#define TPI_FIFO1_ETM_ATVALID_Msk (0x1UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */
|
#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */
|
||||||
#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */
|
#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */
|
||||||
|
|
@ -1512,7 +1509,9 @@ __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
if ((int32_t)(IRQn) >= 0)
|
if ((int32_t)(IRQn) >= 0)
|
||||||
{
|
{
|
||||||
|
__COMPILER_BARRIER();
|
||||||
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
||||||
|
__COMPILER_BARRIER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1737,6 +1736,7 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
|
/* ARM Application Note 321 states that the M3 does not require the architectural barrier */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1776,6 +1776,7 @@ __NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void)
|
||||||
|
|
||||||
/*@} end of CMSIS_Core_NVICFunctions */
|
/*@} end of CMSIS_Core_NVICFunctions */
|
||||||
|
|
||||||
|
|
||||||
/* ########################## MPU functions #################################### */
|
/* ########################## MPU functions #################################### */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
|
|
@ -1784,6 +1785,7 @@ __NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* ########################## FPU functions #################################### */
|
/* ########################## FPU functions #################################### */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_Core_FunctionInterface
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm33.h
|
* @file core_cm33.h
|
||||||
* @brief CMSIS Cortex-M33 Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M33 Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.9
|
* @version V5.2.3
|
||||||
* @date 06. July 2018
|
* @date 13. October 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -26,6 +26,8 @@
|
||||||
#pragma system_include /* treat file as system include file for MISRA check */
|
#pragma system_include /* treat file as system include file for MISRA check */
|
||||||
#elif defined (__clang__)
|
#elif defined (__clang__)
|
||||||
#pragma clang system_header /* treat file as system include file */
|
#pragma clang system_header /* treat file as system include file */
|
||||||
|
#elif defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic ignored "-Wpedantic" /* disable pedantic warning due to unnamed structs/unions */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __CORE_CM33_H_GENERIC
|
#ifndef __CORE_CM33_H_GENERIC
|
||||||
|
|
@ -97,7 +99,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
#if defined (__ARM_PCS_VFP)
|
#if defined (__ARM_FP)
|
||||||
#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
|
#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
|
||||||
#define __FPU_USED 1U
|
#define __FPU_USED 1U
|
||||||
#else
|
#else
|
||||||
|
|
@ -248,6 +250,11 @@
|
||||||
#warning "__DSP_PRESENT not defined in device header file; using default!"
|
#warning "__DSP_PRESENT not defined in device header file; using default!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VTOR_PRESENT
|
||||||
|
#define __VTOR_PRESENT 1U
|
||||||
|
#warning "__VTOR_PRESENT not defined in device header file; using default!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NVIC_PRIO_BITS
|
#ifndef __NVIC_PRIO_BITS
|
||||||
#define __NVIC_PRIO_BITS 3U
|
#define __NVIC_PRIO_BITS 3U
|
||||||
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
||||||
|
|
@ -512,7 +519,7 @@ typedef struct
|
||||||
__IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */
|
__IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */
|
||||||
__IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */
|
__IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */
|
||||||
__IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */
|
__IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */
|
||||||
__IM uint32_t ID_ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */
|
__IM uint32_t ID_AFR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */
|
||||||
__IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */
|
__IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */
|
||||||
__IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */
|
__IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */
|
||||||
__IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */
|
__IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */
|
||||||
|
|
@ -521,7 +528,10 @@ typedef struct
|
||||||
__IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */
|
__IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */
|
||||||
__IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */
|
__IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */
|
||||||
__IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */
|
__IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */
|
||||||
uint32_t RESERVED3[92U];
|
uint32_t RESERVED7[21U];
|
||||||
|
__IOM uint32_t SFSR; /*!< Offset: 0x0E4 (R/W) Secure Fault Status Register */
|
||||||
|
__IOM uint32_t SFAR; /*!< Offset: 0x0E8 (R/W) Secure Fault Address Register */
|
||||||
|
uint32_t RESERVED3[69U];
|
||||||
__OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */
|
__OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */
|
||||||
uint32_t RESERVED4[15U];
|
uint32_t RESERVED4[15U];
|
||||||
__IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */
|
__IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */
|
||||||
|
|
@ -538,14 +548,7 @@ typedef struct
|
||||||
__OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */
|
__OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */
|
||||||
__OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */
|
__OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */
|
||||||
__OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */
|
__OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */
|
||||||
uint32_t RESERVED7[6U];
|
__OM uint32_t BPIALL; /*!< Offset: 0x278 ( /W) Branch Predictor Invalidate All */
|
||||||
__IOM uint32_t ITCMCR; /*!< Offset: 0x290 (R/W) Instruction Tightly-Coupled Memory Control Register */
|
|
||||||
__IOM uint32_t DTCMCR; /*!< Offset: 0x294 (R/W) Data Tightly-Coupled Memory Control Registers */
|
|
||||||
__IOM uint32_t AHBPCR; /*!< Offset: 0x298 (R/W) AHBP Control Register */
|
|
||||||
__IOM uint32_t CACR; /*!< Offset: 0x29C (R/W) L1 Cache Control Register */
|
|
||||||
__IOM uint32_t AHBSCR; /*!< Offset: 0x2A0 (R/W) AHB Slave Control Register */
|
|
||||||
uint32_t RESERVED8[1U];
|
|
||||||
__IOM uint32_t ABFSR; /*!< Offset: 0x2A8 (R/W) Auxiliary Bus Fault Status Register */
|
|
||||||
} SCB_Type;
|
} SCB_Type;
|
||||||
|
|
||||||
/* SCB CPUID Register Definitions */
|
/* SCB CPUID Register Definitions */
|
||||||
|
|
@ -746,22 +749,22 @@ typedef struct
|
||||||
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
||||||
|
|
||||||
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
#define SCB_CFSR_MMARVALID_Pos (SCB_CFSR_MEMFAULTSR_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
||||||
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
#define SCB_CFSR_MLSPERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
||||||
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
#define SCB_CFSR_MSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
||||||
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
#define SCB_CFSR_MUNSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
||||||
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
#define SCB_CFSR_DACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
||||||
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
#define SCB_CFSR_IACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
||||||
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
||||||
|
|
||||||
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
|
|
@ -921,78 +924,6 @@ typedef struct
|
||||||
#define SCB_DCCISW_SET_Pos 5U /*!< SCB DCCISW: Set Position */
|
#define SCB_DCCISW_SET_Pos 5U /*!< SCB DCCISW: Set Position */
|
||||||
#define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos) /*!< SCB DCCISW: Set Mask */
|
#define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos) /*!< SCB DCCISW: Set Mask */
|
||||||
|
|
||||||
/* Instruction Tightly-Coupled Memory Control Register Definitions */
|
|
||||||
#define SCB_ITCMCR_SZ_Pos 3U /*!< SCB ITCMCR: SZ Position */
|
|
||||||
#define SCB_ITCMCR_SZ_Msk (0xFUL << SCB_ITCMCR_SZ_Pos) /*!< SCB ITCMCR: SZ Mask */
|
|
||||||
|
|
||||||
#define SCB_ITCMCR_RETEN_Pos 2U /*!< SCB ITCMCR: RETEN Position */
|
|
||||||
#define SCB_ITCMCR_RETEN_Msk (1UL << SCB_ITCMCR_RETEN_Pos) /*!< SCB ITCMCR: RETEN Mask */
|
|
||||||
|
|
||||||
#define SCB_ITCMCR_RMW_Pos 1U /*!< SCB ITCMCR: RMW Position */
|
|
||||||
#define SCB_ITCMCR_RMW_Msk (1UL << SCB_ITCMCR_RMW_Pos) /*!< SCB ITCMCR: RMW Mask */
|
|
||||||
|
|
||||||
#define SCB_ITCMCR_EN_Pos 0U /*!< SCB ITCMCR: EN Position */
|
|
||||||
#define SCB_ITCMCR_EN_Msk (1UL /*<< SCB_ITCMCR_EN_Pos*/) /*!< SCB ITCMCR: EN Mask */
|
|
||||||
|
|
||||||
/* Data Tightly-Coupled Memory Control Register Definitions */
|
|
||||||
#define SCB_DTCMCR_SZ_Pos 3U /*!< SCB DTCMCR: SZ Position */
|
|
||||||
#define SCB_DTCMCR_SZ_Msk (0xFUL << SCB_DTCMCR_SZ_Pos) /*!< SCB DTCMCR: SZ Mask */
|
|
||||||
|
|
||||||
#define SCB_DTCMCR_RETEN_Pos 2U /*!< SCB DTCMCR: RETEN Position */
|
|
||||||
#define SCB_DTCMCR_RETEN_Msk (1UL << SCB_DTCMCR_RETEN_Pos) /*!< SCB DTCMCR: RETEN Mask */
|
|
||||||
|
|
||||||
#define SCB_DTCMCR_RMW_Pos 1U /*!< SCB DTCMCR: RMW Position */
|
|
||||||
#define SCB_DTCMCR_RMW_Msk (1UL << SCB_DTCMCR_RMW_Pos) /*!< SCB DTCMCR: RMW Mask */
|
|
||||||
|
|
||||||
#define SCB_DTCMCR_EN_Pos 0U /*!< SCB DTCMCR: EN Position */
|
|
||||||
#define SCB_DTCMCR_EN_Msk (1UL /*<< SCB_DTCMCR_EN_Pos*/) /*!< SCB DTCMCR: EN Mask */
|
|
||||||
|
|
||||||
/* AHBP Control Register Definitions */
|
|
||||||
#define SCB_AHBPCR_SZ_Pos 1U /*!< SCB AHBPCR: SZ Position */
|
|
||||||
#define SCB_AHBPCR_SZ_Msk (7UL << SCB_AHBPCR_SZ_Pos) /*!< SCB AHBPCR: SZ Mask */
|
|
||||||
|
|
||||||
#define SCB_AHBPCR_EN_Pos 0U /*!< SCB AHBPCR: EN Position */
|
|
||||||
#define SCB_AHBPCR_EN_Msk (1UL /*<< SCB_AHBPCR_EN_Pos*/) /*!< SCB AHBPCR: EN Mask */
|
|
||||||
|
|
||||||
/* L1 Cache Control Register Definitions */
|
|
||||||
#define SCB_CACR_FORCEWT_Pos 2U /*!< SCB CACR: FORCEWT Position */
|
|
||||||
#define SCB_CACR_FORCEWT_Msk (1UL << SCB_CACR_FORCEWT_Pos) /*!< SCB CACR: FORCEWT Mask */
|
|
||||||
|
|
||||||
#define SCB_CACR_ECCEN_Pos 1U /*!< SCB CACR: ECCEN Position */
|
|
||||||
#define SCB_CACR_ECCEN_Msk (1UL << SCB_CACR_ECCEN_Pos) /*!< SCB CACR: ECCEN Mask */
|
|
||||||
|
|
||||||
#define SCB_CACR_SIWT_Pos 0U /*!< SCB CACR: SIWT Position */
|
|
||||||
#define SCB_CACR_SIWT_Msk (1UL /*<< SCB_CACR_SIWT_Pos*/) /*!< SCB CACR: SIWT Mask */
|
|
||||||
|
|
||||||
/* AHBS Control Register Definitions */
|
|
||||||
#define SCB_AHBSCR_INITCOUNT_Pos 11U /*!< SCB AHBSCR: INITCOUNT Position */
|
|
||||||
#define SCB_AHBSCR_INITCOUNT_Msk (0x1FUL << SCB_AHBPCR_INITCOUNT_Pos) /*!< SCB AHBSCR: INITCOUNT Mask */
|
|
||||||
|
|
||||||
#define SCB_AHBSCR_TPRI_Pos 2U /*!< SCB AHBSCR: TPRI Position */
|
|
||||||
#define SCB_AHBSCR_TPRI_Msk (0x1FFUL << SCB_AHBPCR_TPRI_Pos) /*!< SCB AHBSCR: TPRI Mask */
|
|
||||||
|
|
||||||
#define SCB_AHBSCR_CTL_Pos 0U /*!< SCB AHBSCR: CTL Position*/
|
|
||||||
#define SCB_AHBSCR_CTL_Msk (3UL /*<< SCB_AHBPCR_CTL_Pos*/) /*!< SCB AHBSCR: CTL Mask */
|
|
||||||
|
|
||||||
/* Auxiliary Bus Fault Status Register Definitions */
|
|
||||||
#define SCB_ABFSR_AXIMTYPE_Pos 8U /*!< SCB ABFSR: AXIMTYPE Position*/
|
|
||||||
#define SCB_ABFSR_AXIMTYPE_Msk (3UL << SCB_ABFSR_AXIMTYPE_Pos) /*!< SCB ABFSR: AXIMTYPE Mask */
|
|
||||||
|
|
||||||
#define SCB_ABFSR_EPPB_Pos 4U /*!< SCB ABFSR: EPPB Position*/
|
|
||||||
#define SCB_ABFSR_EPPB_Msk (1UL << SCB_ABFSR_EPPB_Pos) /*!< SCB ABFSR: EPPB Mask */
|
|
||||||
|
|
||||||
#define SCB_ABFSR_AXIM_Pos 3U /*!< SCB ABFSR: AXIM Position*/
|
|
||||||
#define SCB_ABFSR_AXIM_Msk (1UL << SCB_ABFSR_AXIM_Pos) /*!< SCB ABFSR: AXIM Mask */
|
|
||||||
|
|
||||||
#define SCB_ABFSR_AHBP_Pos 2U /*!< SCB ABFSR: AHBP Position*/
|
|
||||||
#define SCB_ABFSR_AHBP_Msk (1UL << SCB_ABFSR_AHBP_Pos) /*!< SCB ABFSR: AHBP Mask */
|
|
||||||
|
|
||||||
#define SCB_ABFSR_DTCM_Pos 1U /*!< SCB ABFSR: DTCM Position*/
|
|
||||||
#define SCB_ABFSR_DTCM_Msk (1UL << SCB_ABFSR_DTCM_Pos) /*!< SCB ABFSR: DTCM Mask */
|
|
||||||
|
|
||||||
#define SCB_ABFSR_ITCM_Pos 0U /*!< SCB ABFSR: ITCM Position*/
|
|
||||||
#define SCB_ABFSR_ITCM_Msk (1UL /*<< SCB_ABFSR_ITCM_Pos*/) /*!< SCB ABFSR: ITCM Mask */
|
|
||||||
|
|
||||||
/*@} end of group CMSIS_SCB */
|
/*@} end of group CMSIS_SCB */
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1097,10 +1028,7 @@ typedef struct
|
||||||
__IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */
|
__IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */
|
||||||
uint32_t RESERVED2[15U];
|
uint32_t RESERVED2[15U];
|
||||||
__IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */
|
__IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */
|
||||||
uint32_t RESERVED3[29U];
|
uint32_t RESERVED3[32U];
|
||||||
__OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */
|
|
||||||
__IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */
|
|
||||||
__IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */
|
|
||||||
uint32_t RESERVED4[43U];
|
uint32_t RESERVED4[43U];
|
||||||
__OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */
|
__OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */
|
||||||
__IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */
|
__IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */
|
||||||
|
|
@ -1163,18 +1091,6 @@ typedef struct
|
||||||
#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */
|
#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */
|
||||||
#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */
|
#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */
|
||||||
|
|
||||||
/* ITM Integration Write Register Definitions */
|
|
||||||
#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */
|
|
||||||
#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */
|
|
||||||
|
|
||||||
/* ITM Integration Read Register Definitions */
|
|
||||||
#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */
|
|
||||||
#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */
|
|
||||||
|
|
||||||
/* ITM Integration Mode Control Register Definitions */
|
|
||||||
#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */
|
|
||||||
#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */
|
|
||||||
|
|
||||||
/* ITM Lock Status Register Definitions */
|
/* ITM Lock Status Register Definitions */
|
||||||
#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */
|
#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */
|
||||||
#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */
|
#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */
|
||||||
|
|
@ -1763,8 +1679,9 @@ typedef struct
|
||||||
__IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */
|
__IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */
|
||||||
__IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */
|
__IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */
|
||||||
__IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */
|
__IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */
|
||||||
__IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */
|
__IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and VFP Feature Register 0 */
|
||||||
__IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */
|
__IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and VFP Feature Register 1 */
|
||||||
|
__IM uint32_t MVFR2; /*!< Offset: 0x018 (R/ ) Media and VFP Feature Register 2 */
|
||||||
} FPU_Type;
|
} FPU_Type;
|
||||||
|
|
||||||
/* Floating-Point Context Control Register Definitions */
|
/* Floating-Point Context Control Register Definitions */
|
||||||
|
|
@ -1836,7 +1753,7 @@ typedef struct
|
||||||
#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */
|
#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */
|
||||||
#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */
|
#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */
|
||||||
|
|
||||||
/* Media and FP Feature Register 0 Definitions */
|
/* Media and VFP Feature Register 0 Definitions */
|
||||||
#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */
|
#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */
|
||||||
#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */
|
#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */
|
||||||
|
|
||||||
|
|
@ -1861,7 +1778,7 @@ typedef struct
|
||||||
#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */
|
#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */
|
||||||
#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */
|
#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */
|
||||||
|
|
||||||
/* Media and FP Feature Register 1 Definitions */
|
/* Media and VFP Feature Register 1 Definitions */
|
||||||
#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */
|
#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */
|
||||||
#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */
|
#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */
|
||||||
|
|
||||||
|
|
@ -1874,9 +1791,13 @@ typedef struct
|
||||||
#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */
|
#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */
|
||||||
#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */
|
#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */
|
||||||
|
|
||||||
|
/* Media and VFP Feature Register 2 Definitions */
|
||||||
|
#define FPU_MVFR2_FPMisc_Pos 4U /*!< MVFR2: FPMisc bits Position */
|
||||||
|
#define FPU_MVFR2_FPMisc_Msk (0xFUL << FPU_MVFR2_FPMisc_Pos) /*!< MVFR2: FPMisc bits Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_FPU */
|
/*@} end of group CMSIS_FPU */
|
||||||
|
|
||||||
|
/* CoreDebug is deprecated. replaced by DCB (Debug Control Block) */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
||||||
|
|
@ -1885,7 +1806,7 @@ typedef struct
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Structure type to access the Core Debug Register (CoreDebug).
|
\brief \deprecated Structure type to access the Core Debug Register (CoreDebug).
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
@ -1893,124 +1814,354 @@ typedef struct
|
||||||
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
uint32_t RESERVED4[1U];
|
uint32_t RESERVED0[1U];
|
||||||
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
} CoreDebug_Type;
|
} CoreDebug_Type;
|
||||||
|
|
||||||
/* Debug Halting Control and Status Register Definitions */
|
/* Debug Halting Control and Status Register Definitions */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */
|
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< \deprecated CoreDebug DHCSR: DBGKEY Position */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */
|
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< \deprecated CoreDebug DHCSR: DBGKEY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */
|
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */
|
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */
|
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Position */
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */
|
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */
|
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< \deprecated CoreDebug DHCSR: S_SLEEP Position */
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */
|
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< \deprecated CoreDebug DHCSR: S_SLEEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */
|
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< \deprecated CoreDebug DHCSR: S_HALT Position */
|
||||||
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */
|
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: S_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */
|
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< \deprecated CoreDebug DHCSR: S_REGRDY Position */
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */
|
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< \deprecated CoreDebug DHCSR: S_REGRDY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */
|
#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< \deprecated CoreDebug DHCSR: C_SNAPSTALL Position */
|
||||||
#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */
|
#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< \deprecated CoreDebug DHCSR: C_SNAPSTALL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */
|
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Position */
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */
|
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */
|
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< \deprecated CoreDebug DHCSR: C_STEP Position */
|
||||||
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */
|
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< \deprecated CoreDebug DHCSR: C_STEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */
|
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< \deprecated CoreDebug DHCSR: C_HALT Position */
|
||||||
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */
|
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: C_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Position */
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Mask */
|
||||||
|
|
||||||
/* Debug Core Register Selector Register Definitions */
|
/* Debug Core Register Selector Register Definitions */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */
|
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< \deprecated CoreDebug DCRSR: REGWnR Position */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */
|
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< \deprecated CoreDebug DCRSR: REGWnR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */
|
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< \deprecated CoreDebug DCRSR: REGSEL Position */
|
||||||
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */
|
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< \deprecated CoreDebug DCRSR: REGSEL Mask */
|
||||||
|
|
||||||
/* Debug Exception and Monitor Control Register Definitions */
|
/* Debug Exception and Monitor Control Register Definitions */
|
||||||
#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */
|
#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< \deprecated CoreDebug DEMCR: TRCENA Position */
|
||||||
#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */
|
#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< \deprecated CoreDebug DEMCR: TRCENA Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */
|
#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< \deprecated CoreDebug DEMCR: MON_REQ Position */
|
||||||
#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */
|
#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< \deprecated CoreDebug DEMCR: MON_REQ Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */
|
#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< \deprecated CoreDebug DEMCR: MON_STEP Position */
|
||||||
#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */
|
#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< \deprecated CoreDebug DEMCR: MON_STEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */
|
#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< \deprecated CoreDebug DEMCR: MON_PEND Position */
|
||||||
#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */
|
#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< \deprecated CoreDebug DEMCR: MON_PEND Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */
|
#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< \deprecated CoreDebug DEMCR: MON_EN Position */
|
||||||
#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */
|
#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< \deprecated CoreDebug DEMCR: MON_EN Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */
|
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */
|
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */
|
#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< \deprecated CoreDebug DEMCR: VC_INTERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */
|
#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_INTERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */
|
#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< \deprecated CoreDebug DEMCR: VC_BUSERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */
|
#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_BUSERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */
|
#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< \deprecated CoreDebug DEMCR: VC_STATERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */
|
#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_STATERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */
|
#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< \deprecated CoreDebug DEMCR: VC_CHKERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */
|
#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_CHKERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */
|
#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< \deprecated CoreDebug DEMCR: VC_NOCPERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */
|
#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_NOCPERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */
|
#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< \deprecated CoreDebug DEMCR: VC_MMERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */
|
#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_MMERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */
|
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Position */
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */
|
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Mask */
|
||||||
|
|
||||||
/* Debug Authentication Control Register Definitions */
|
/* Debug Authentication Control Register Definitions */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
||||||
|
|
||||||
/* Debug Security Control and Status Register Definitions */
|
/* Debug Security Control and Status Register Definitions */
|
||||||
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */
|
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< \deprecated CoreDebug DSCSR: CDS Position */
|
||||||
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */
|
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< \deprecated CoreDebug DSCSR: CDS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */
|
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< \deprecated CoreDebug DSCSR: SBRSEL Position */
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */
|
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< \deprecated CoreDebug DSCSR: SBRSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */
|
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< \deprecated CoreDebug DSCSR: SBRSELEN Position */
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */
|
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< \deprecated CoreDebug DSCSR: SBRSELEN Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_CoreDebug */
|
/*@} end of group CMSIS_CoreDebug */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DCB Debug Control Block
|
||||||
|
\brief Type definitions for the Debug Control Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Control Block Registers (DCB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */
|
||||||
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
|
uint32_t RESERVED0[1U];
|
||||||
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
|
} DCB_Type;
|
||||||
|
|
||||||
|
/* DHCSR, Debug Halting Control and Status Register Definitions */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Pos 16U /*!< DCB DHCSR: Debug key Position */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Msk (0xFFFFUL << DCB_DHCSR_DBGKEY_Pos) /*!< DCB DHCSR: Debug key Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Pos 26U /*!< DCB DHCSR: Restart sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Msk (0x1UL << DCB_DHCSR_S_RESTART_ST_Pos) /*!< DCB DHCSR: Restart sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Pos 25U /*!< DCB DHCSR: Reset sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Msk (0x1UL << DCB_DHCSR_S_RESET_ST_Pos) /*!< DCB DHCSR: Reset sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Pos 24U /*!< DCB DHCSR: Retire sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Msk (0x1UL << DCB_DHCSR_S_RETIRE_ST_Pos) /*!< DCB DHCSR: Retire sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SDE_Pos 20U /*!< DCB DHCSR: Secure debug enabled Position */
|
||||||
|
#define DCB_DHCSR_S_SDE_Msk (0x1UL << DCB_DHCSR_S_SDE_Pos) /*!< DCB DHCSR: Secure debug enabled Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Pos 19U /*!< DCB DHCSR: Lockup status Position */
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Msk (0x1UL << DCB_DHCSR_S_LOCKUP_Pos) /*!< DCB DHCSR: Lockup status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Pos 18U /*!< DCB DHCSR: Sleeping status Position */
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Msk (0x1UL << DCB_DHCSR_S_SLEEP_Pos) /*!< DCB DHCSR: Sleeping status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_HALT_Pos 17U /*!< DCB DHCSR: Halted status Position */
|
||||||
|
#define DCB_DHCSR_S_HALT_Msk (0x1UL << DCB_DHCSR_S_HALT_Pos) /*!< DCB DHCSR: Halted status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Pos 16U /*!< DCB DHCSR: Register ready status Position */
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Msk (0x1UL << DCB_DHCSR_S_REGRDY_Pos) /*!< DCB DHCSR: Register ready status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_SNAPSTALL_Pos 5U /*!< DCB DHCSR: Snap stall control Position */
|
||||||
|
#define DCB_DHCSR_C_SNAPSTALL_Msk (0x1UL << DCB_DHCSR_C_SNAPSTALL_Pos) /*!< DCB DHCSR: Snap stall control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Pos 3U /*!< DCB DHCSR: Mask interrupts control Position */
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Msk (0x1UL << DCB_DHCSR_C_MASKINTS_Pos) /*!< DCB DHCSR: Mask interrupts control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_STEP_Pos 2U /*!< DCB DHCSR: Step control Position */
|
||||||
|
#define DCB_DHCSR_C_STEP_Msk (0x1UL << DCB_DHCSR_C_STEP_Pos) /*!< DCB DHCSR: Step control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_HALT_Pos 1U /*!< DCB DHCSR: Halt control Position */
|
||||||
|
#define DCB_DHCSR_C_HALT_Msk (0x1UL << DCB_DHCSR_C_HALT_Pos) /*!< DCB DHCSR: Halt control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Pos 0U /*!< DCB DHCSR: Debug enable control Position */
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Msk (0x1UL /*<< DCB_DHCSR_C_DEBUGEN_Pos*/) /*!< DCB DHCSR: Debug enable control Mask */
|
||||||
|
|
||||||
|
/* DCRSR, Debug Core Register Select Register Definitions */
|
||||||
|
#define DCB_DCRSR_REGWnR_Pos 16U /*!< DCB DCRSR: Register write/not-read Position */
|
||||||
|
#define DCB_DCRSR_REGWnR_Msk (0x1UL << DCB_DCRSR_REGWnR_Pos) /*!< DCB DCRSR: Register write/not-read Mask */
|
||||||
|
|
||||||
|
#define DCB_DCRSR_REGSEL_Pos 0U /*!< DCB DCRSR: Register selector Position */
|
||||||
|
#define DCB_DCRSR_REGSEL_Msk (0x7FUL /*<< DCB_DCRSR_REGSEL_Pos*/) /*!< DCB DCRSR: Register selector Mask */
|
||||||
|
|
||||||
|
/* DCRDR, Debug Core Register Data Register Definitions */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Pos 0U /*!< DCB DCRDR: Data temporary buffer Position */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Msk (0xFFFFFFFFUL /*<< DCB_DCRDR_DBGTMP_Pos*/) /*!< DCB DCRDR: Data temporary buffer Mask */
|
||||||
|
|
||||||
|
/* DEMCR, Debug Exception and Monitor Control Register Definitions */
|
||||||
|
#define DCB_DEMCR_TRCENA_Pos 24U /*!< DCB DEMCR: Trace enable Position */
|
||||||
|
#define DCB_DEMCR_TRCENA_Msk (0x1UL << DCB_DEMCR_TRCENA_Pos) /*!< DCB DEMCR: Trace enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MONPRKEY_Pos 23U /*!< DCB DEMCR: Monitor pend req key Position */
|
||||||
|
#define DCB_DEMCR_MONPRKEY_Msk (0x1UL << DCB_DEMCR_MONPRKEY_Pos) /*!< DCB DEMCR: Monitor pend req key Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_UMON_EN_Pos 21U /*!< DCB DEMCR: Unprivileged monitor enable Position */
|
||||||
|
#define DCB_DEMCR_UMON_EN_Msk (0x1UL << DCB_DEMCR_UMON_EN_Pos) /*!< DCB DEMCR: Unprivileged monitor enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_SDME_Pos 20U /*!< DCB DEMCR: Secure DebugMonitor enable Position */
|
||||||
|
#define DCB_DEMCR_SDME_Msk (0x1UL << DCB_DEMCR_SDME_Pos) /*!< DCB DEMCR: Secure DebugMonitor enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_REQ_Pos 19U /*!< DCB DEMCR: Monitor request Position */
|
||||||
|
#define DCB_DEMCR_MON_REQ_Msk (0x1UL << DCB_DEMCR_MON_REQ_Pos) /*!< DCB DEMCR: Monitor request Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_STEP_Pos 18U /*!< DCB DEMCR: Monitor step Position */
|
||||||
|
#define DCB_DEMCR_MON_STEP_Msk (0x1UL << DCB_DEMCR_MON_STEP_Pos) /*!< DCB DEMCR: Monitor step Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_PEND_Pos 17U /*!< DCB DEMCR: Monitor pend Position */
|
||||||
|
#define DCB_DEMCR_MON_PEND_Msk (0x1UL << DCB_DEMCR_MON_PEND_Pos) /*!< DCB DEMCR: Monitor pend Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_EN_Pos 16U /*!< DCB DEMCR: Monitor enable Position */
|
||||||
|
#define DCB_DEMCR_MON_EN_Msk (0x1UL << DCB_DEMCR_MON_EN_Pos) /*!< DCB DEMCR: Monitor enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_SFERR_Pos 11U /*!< DCB DEMCR: Vector Catch SecureFault Position */
|
||||||
|
#define DCB_DEMCR_VC_SFERR_Msk (0x1UL << DCB_DEMCR_VC_SFERR_Pos) /*!< DCB DEMCR: Vector Catch SecureFault Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Pos 10U /*!< DCB DEMCR: Vector Catch HardFault errors Position */
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Msk (0x1UL << DCB_DEMCR_VC_HARDERR_Pos) /*!< DCB DEMCR: Vector Catch HardFault errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_INTERR_Pos 9U /*!< DCB DEMCR: Vector Catch interrupt errors Position */
|
||||||
|
#define DCB_DEMCR_VC_INTERR_Msk (0x1UL << DCB_DEMCR_VC_INTERR_Pos) /*!< DCB DEMCR: Vector Catch interrupt errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_BUSERR_Pos 8U /*!< DCB DEMCR: Vector Catch BusFault errors Position */
|
||||||
|
#define DCB_DEMCR_VC_BUSERR_Msk (0x1UL << DCB_DEMCR_VC_BUSERR_Pos) /*!< DCB DEMCR: Vector Catch BusFault errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_STATERR_Pos 7U /*!< DCB DEMCR: Vector Catch state errors Position */
|
||||||
|
#define DCB_DEMCR_VC_STATERR_Msk (0x1UL << DCB_DEMCR_VC_STATERR_Pos) /*!< DCB DEMCR: Vector Catch state errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_CHKERR_Pos 6U /*!< DCB DEMCR: Vector Catch check errors Position */
|
||||||
|
#define DCB_DEMCR_VC_CHKERR_Msk (0x1UL << DCB_DEMCR_VC_CHKERR_Pos) /*!< DCB DEMCR: Vector Catch check errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_NOCPERR_Pos 5U /*!< DCB DEMCR: Vector Catch NOCP errors Position */
|
||||||
|
#define DCB_DEMCR_VC_NOCPERR_Msk (0x1UL << DCB_DEMCR_VC_NOCPERR_Pos) /*!< DCB DEMCR: Vector Catch NOCP errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_MMERR_Pos 4U /*!< DCB DEMCR: Vector Catch MemManage errors Position */
|
||||||
|
#define DCB_DEMCR_VC_MMERR_Msk (0x1UL << DCB_DEMCR_VC_MMERR_Pos) /*!< DCB DEMCR: Vector Catch MemManage errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Pos 0U /*!< DCB DEMCR: Vector Catch Core reset Position */
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Msk (0x1UL /*<< DCB_DEMCR_VC_CORERESET_Pos*/) /*!< DCB DEMCR: Vector Catch Core reset Mask */
|
||||||
|
|
||||||
|
/* DAUTHCTRL, Debug Authentication Control Register Definitions */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPNIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Msk (0x1UL << DCB_DAUTHCTRL_SPNIDENSEL_Pos) /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< DCB DAUTHCTRL: Secure invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Msk (0x1UL /*<< DCB_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< DCB DAUTHCTRL: Secure invasive debug enable select Mask */
|
||||||
|
|
||||||
|
/* DSCSR, Debug Security Control and Status Register Definitions */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Pos 17U /*!< DCB DSCSR: CDS write-enable key Position */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Msk (0x1UL << DCB_DSCSR_CDSKEY_Pos) /*!< DCB DSCSR: CDS write-enable key Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_CDS_Pos 16U /*!< DCB DSCSR: Current domain Secure Position */
|
||||||
|
#define DCB_DSCSR_CDS_Msk (0x1UL << DCB_DSCSR_CDS_Pos) /*!< DCB DSCSR: Current domain Secure Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSEL_Pos 1U /*!< DCB DSCSR: Secure banked register select Position */
|
||||||
|
#define DCB_DSCSR_SBRSEL_Msk (0x1UL << DCB_DSCSR_SBRSEL_Pos) /*!< DCB DSCSR: Secure banked register select Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Pos 0U /*!< DCB DSCSR: Secure banked register select enable Position */
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Msk (0x1UL /*<< DCB_DSCSR_SBRSELEN_Pos*/) /*!< DCB DSCSR: Secure banked register select enable Mask */
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DCB */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DIB Debug Identification Block
|
||||||
|
\brief Type definitions for the Debug Identification Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Identification Block Registers (DIB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__OM uint32_t DLAR; /*!< Offset: 0x000 ( /W) SCS Software Lock Access Register */
|
||||||
|
__IM uint32_t DLSR; /*!< Offset: 0x004 (R/ ) SCS Software Lock Status Register */
|
||||||
|
__IM uint32_t DAUTHSTATUS; /*!< Offset: 0x008 (R/ ) Debug Authentication Status Register */
|
||||||
|
__IM uint32_t DDEVARCH; /*!< Offset: 0x00C (R/ ) SCS Device Architecture Register */
|
||||||
|
__IM uint32_t DDEVTYPE; /*!< Offset: 0x010 (R/ ) SCS Device Type Register */
|
||||||
|
} DIB_Type;
|
||||||
|
|
||||||
|
/* DLAR, SCS Software Lock Access Register Definitions */
|
||||||
|
#define DIB_DLAR_KEY_Pos 0U /*!< DIB DLAR: KEY Position */
|
||||||
|
#define DIB_DLAR_KEY_Msk (0xFFFFFFFFUL /*<< DIB_DLAR_KEY_Pos */) /*!< DIB DLAR: KEY Mask */
|
||||||
|
|
||||||
|
/* DLSR, SCS Software Lock Status Register Definitions */
|
||||||
|
#define DIB_DLSR_nTT_Pos 2U /*!< DIB DLSR: Not thirty-two bit Position */
|
||||||
|
#define DIB_DLSR_nTT_Msk (0x1UL << DIB_DLSR_nTT_Pos ) /*!< DIB DLSR: Not thirty-two bit Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLK_Pos 1U /*!< DIB DLSR: Software Lock status Position */
|
||||||
|
#define DIB_DLSR_SLK_Msk (0x1UL << DIB_DLSR_SLK_Pos ) /*!< DIB DLSR: Software Lock status Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLI_Pos 0U /*!< DIB DLSR: Software Lock implemented Position */
|
||||||
|
#define DIB_DLSR_SLI_Msk (0x1UL /*<< DIB_DLSR_SLI_Pos*/) /*!< DIB DLSR: Software Lock implemented Mask */
|
||||||
|
|
||||||
|
/* DAUTHSTATUS, Debug Authentication Status Register Definitions */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Pos 6U /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Msk (0x3UL << DIB_DAUTHSTATUS_SNID_Pos ) /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Pos 4U /*!< DIB DAUTHSTATUS: Secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Msk (0x3UL << DIB_DAUTHSTATUS_SID_Pos ) /*!< DIB DAUTHSTATUS: Secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Pos 2U /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Msk (0x3UL << DIB_DAUTHSTATUS_NSNID_Pos ) /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Pos 0U /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Msk (0x3UL /*<< DIB_DAUTHSTATUS_NSID_Pos*/) /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
/* DDEVARCH, SCS Device Architecture Register Definitions */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Pos 21U /*!< DIB DDEVARCH: Architect Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Msk (0x7FFUL << DIB_DDEVARCH_ARCHITECT_Pos ) /*!< DIB DDEVARCH: Architect Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Pos 20U /*!< DIB DDEVARCH: DEVARCH Present Position */
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Msk (0x1FUL << DIB_DDEVARCH_PRESENT_Pos ) /*!< DIB DDEVARCH: DEVARCH Present Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_REVISION_Pos 16U /*!< DIB DDEVARCH: Revision Position */
|
||||||
|
#define DIB_DDEVARCH_REVISION_Msk (0xFUL << DIB_DDEVARCH_REVISION_Pos ) /*!< DIB DDEVARCH: Revision Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Pos 12U /*!< DIB DDEVARCH: Architecture Version Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Msk (0xFUL << DIB_DDEVARCH_ARCHVER_Pos ) /*!< DIB DDEVARCH: Architecture Version Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Pos 0U /*!< DIB DDEVARCH: Architecture Part Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Msk (0xFFFUL /*<< DIB_DDEVARCH_ARCHPART_Pos*/) /*!< DIB DDEVARCH: Architecture Part Mask */
|
||||||
|
|
||||||
|
/* DDEVTYPE, SCS Device Type Register Definitions */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Pos 4U /*!< DIB DDEVTYPE: Sub-type Position */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Msk (0xFUL << DIB_DDEVTYPE_SUB_Pos ) /*!< DIB DDEVTYPE: Sub-type Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Pos 0U /*!< DIB DDEVTYPE: Major type Position */
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Msk (0xFUL /*<< DIB_DDEVTYPE_MAJOR_Pos*/) /*!< DIB DDEVTYPE: Major type Mask */
|
||||||
|
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DIB */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_core_bitfield Core register bit field macros
|
\defgroup CMSIS_core_bitfield Core register bit field macros
|
||||||
|
|
@ -2049,7 +2200,9 @@ typedef struct
|
||||||
#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */
|
#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */
|
||||||
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
||||||
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
||||||
#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */
|
#define CoreDebug_BASE (0xE000EDF0UL) /*!< \deprecated Core Debug Base Address */
|
||||||
|
#define DCB_BASE (0xE000EDF0UL) /*!< DCB Base Address */
|
||||||
|
#define DIB_BASE (0xE000EFB0UL) /*!< DIB Base Address */
|
||||||
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
||||||
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
||||||
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
||||||
|
|
@ -2061,7 +2214,9 @@ typedef struct
|
||||||
#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */
|
#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */
|
||||||
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
||||||
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
||||||
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */
|
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< \deprecated Core Debug configuration struct */
|
||||||
|
#define DCB ((DCB_Type *) DCB_BASE ) /*!< DCB configuration struct */
|
||||||
|
#define DIB ((DIB_Type *) DIB_BASE ) /*!< DIB configuration struct */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
||||||
|
|
@ -2078,7 +2233,9 @@ typedef struct
|
||||||
|
|
||||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
||||||
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */
|
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< \deprecated Core Debug Base Address (non-secure address space) */
|
||||||
|
#define DCB_BASE_NS (0xE002EDF0UL) /*!< DCB Base Address (non-secure address space) */
|
||||||
|
#define DIB_BASE_NS (0xE002EFB0UL) /*!< DIB Base Address (non-secure address space) */
|
||||||
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
||||||
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
||||||
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
||||||
|
|
@ -2087,7 +2244,9 @@ typedef struct
|
||||||
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
||||||
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
||||||
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
||||||
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */
|
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< \deprecated Core Debug configuration struct (non-secure address space) */
|
||||||
|
#define DCB_NS ((DCB_Type *) DCB_BASE_NS ) /*!< DCB configuration struct (non-secure address space) */
|
||||||
|
#define DIB_NS ((DIB_Type *) DIB_BASE_NS ) /*!< DIB configuration struct (non-secure address space) */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
||||||
|
|
@ -2101,6 +2260,15 @@ typedef struct
|
||||||
/*@} */
|
/*@} */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_register_aliases Backwards Compatibility Aliases
|
||||||
|
\brief Register alias definitions for backwards compatibility.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
#define ID_ADR (ID_AFR) /*!< SCB Auxiliary Feature Register */
|
||||||
|
/*@} */
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Hardware Abstraction Layer
|
* Hardware Abstraction Layer
|
||||||
|
|
@ -2168,7 +2336,7 @@ typedef struct
|
||||||
#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */
|
#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */
|
||||||
#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */
|
#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */
|
||||||
#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */
|
#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */
|
||||||
#define EXC_RETURN_SPSEL (0x00000002UL) /* bit [1] stack pointer used to restore context: 0=MSP 1=PSP */
|
#define EXC_RETURN_SPSEL (0x00000004UL) /* bit [2] stack pointer used to restore context: 0=MSP 1=PSP */
|
||||||
#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */
|
#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */
|
||||||
|
|
||||||
/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */
|
/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */
|
||||||
|
|
@ -2197,7 +2365,7 @@ __STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
|
||||||
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
|
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
|
||||||
reg_value = (reg_value |
|
reg_value = (reg_value |
|
||||||
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
|
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
|
||||||
(PriorityGroupTmp << 8U) ); /* Insert write key and priority group */
|
(PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
|
||||||
SCB->AIRCR = reg_value;
|
SCB->AIRCR = reg_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2223,7 +2391,9 @@ __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
if ((int32_t)(IRQn) >= 0)
|
if ((int32_t)(IRQn) >= 0)
|
||||||
{
|
{
|
||||||
|
__COMPILER_BARRIER();
|
||||||
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
||||||
|
__COMPILER_BARRIER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2515,6 +2685,7 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
|
__DSB();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2841,6 +3012,110 @@ __STATIC_INLINE void TZ_SAU_Disable(void)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Control function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DCBFunctions Debug Control Functions
|
||||||
|
\brief Functions that access the Debug Control Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register
|
||||||
|
\details writes to Debug Authentication Control register.
|
||||||
|
\param [in] value value to be writen.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void DCB_SetAuthCtrl(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register
|
||||||
|
\details Reads Debug Authentication Control register.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DCB_GetAuthCtrl(void)
|
||||||
|
{
|
||||||
|
return (DCB->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register (non-secure)
|
||||||
|
\details writes to non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\param [in] value value to be writen
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void TZ_DCB_SetAuthCtrl_NS(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB_NS->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DCB_GetAuthCtrl_NS(void)
|
||||||
|
{
|
||||||
|
return (DCB_NS->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Identification function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DIBFunctions Debug Identification Functions
|
||||||
|
\brief Functions that access the Debug Identification Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register
|
||||||
|
\details Reads Debug Authentication Status register.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DIB_GetAuthStatus(void)
|
||||||
|
{
|
||||||
|
return (DIB->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Status register when in secure state.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DIB_GetAuthStatus_NS(void)
|
||||||
|
{
|
||||||
|
return (DIB_NS->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ################################## SysTick function ############################################ */
|
/* ################################## SysTick function ############################################ */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_Core_FunctionInterface
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,11 +1,11 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm4.h
|
* @file core_cm4.h
|
||||||
* @brief CMSIS Cortex-M4 Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M4 Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.8
|
* @version V5.1.2
|
||||||
* @date 04. June 2018
|
* @date 04. June 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
#if defined __ARM_PCS_VFP
|
#if defined __ARM_FP
|
||||||
#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
|
#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
|
||||||
#define __FPU_USED 1U
|
#define __FPU_USED 1U
|
||||||
#else
|
#else
|
||||||
|
|
@ -194,6 +194,11 @@
|
||||||
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VTOR_PRESENT
|
||||||
|
#define __VTOR_PRESENT 1U
|
||||||
|
#warning "__VTOR_PRESENT not defined in device header file; using default!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NVIC_PRIO_BITS
|
#ifndef __NVIC_PRIO_BITS
|
||||||
#define __NVIC_PRIO_BITS 3U
|
#define __NVIC_PRIO_BITS 3U
|
||||||
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
||||||
|
|
@ -408,7 +413,7 @@ typedef struct
|
||||||
__IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */
|
__IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */
|
||||||
uint32_t RESERVED0[24U];
|
uint32_t RESERVED0[24U];
|
||||||
__IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */
|
__IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */
|
||||||
uint32_t RSERVED1[24U];
|
uint32_t RESERVED1[24U];
|
||||||
__IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */
|
__IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */
|
||||||
uint32_t RESERVED2[24U];
|
uint32_t RESERVED2[24U];
|
||||||
__IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */
|
__IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */
|
||||||
|
|
@ -618,22 +623,22 @@ typedef struct
|
||||||
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
||||||
|
|
||||||
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
#define SCB_CFSR_MMARVALID_Pos (SCB_CFSR_MEMFAULTSR_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
||||||
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
#define SCB_CFSR_MLSPERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
||||||
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
#define SCB_CFSR_MSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
||||||
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
#define SCB_CFSR_MUNSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
||||||
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
#define SCB_CFSR_DACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
||||||
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
#define SCB_CFSR_IACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
||||||
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
||||||
|
|
||||||
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
|
|
@ -822,10 +827,7 @@ typedef struct
|
||||||
__IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */
|
__IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */
|
||||||
uint32_t RESERVED2[15U];
|
uint32_t RESERVED2[15U];
|
||||||
__IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */
|
__IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */
|
||||||
uint32_t RESERVED3[29U];
|
uint32_t RESERVED3[32U];
|
||||||
__OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */
|
|
||||||
__IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */
|
|
||||||
__IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */
|
|
||||||
uint32_t RESERVED4[43U];
|
uint32_t RESERVED4[43U];
|
||||||
__OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */
|
__OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */
|
||||||
__IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */
|
__IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */
|
||||||
|
|
@ -876,18 +878,6 @@ typedef struct
|
||||||
#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */
|
#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */
|
||||||
#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */
|
#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */
|
||||||
|
|
||||||
/* ITM Integration Write Register Definitions */
|
|
||||||
#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */
|
|
||||||
#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */
|
|
||||||
|
|
||||||
/* ITM Integration Read Register Definitions */
|
|
||||||
#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */
|
|
||||||
#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */
|
|
||||||
|
|
||||||
/* ITM Integration Mode Control Register Definitions */
|
|
||||||
#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */
|
|
||||||
#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */
|
|
||||||
|
|
||||||
/* ITM Lock Status Register Definitions */
|
/* ITM Lock Status Register Definitions */
|
||||||
#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */
|
#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */
|
||||||
#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */
|
#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */
|
||||||
|
|
@ -1120,13 +1110,13 @@ typedef struct
|
||||||
|
|
||||||
/* TPI Integration ETM Data Register Definitions (FIFO0) */
|
/* TPI Integration ETM Data Register Definitions (FIFO0) */
|
||||||
#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */
|
#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */
|
||||||
#define TPI_FIFO0_ITM_ATVALID_Msk (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */
|
#define TPI_FIFO0_ITM_ATVALID_Msk (0x1UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */
|
#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */
|
||||||
#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */
|
#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */
|
||||||
|
|
||||||
#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */
|
#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */
|
||||||
#define TPI_FIFO0_ETM_ATVALID_Msk (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */
|
#define TPI_FIFO0_ETM_ATVALID_Msk (0x1UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */
|
#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */
|
||||||
#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */
|
#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */
|
||||||
|
|
@ -1149,13 +1139,13 @@ typedef struct
|
||||||
|
|
||||||
/* TPI Integration ITM Data Register Definitions (FIFO1) */
|
/* TPI Integration ITM Data Register Definitions (FIFO1) */
|
||||||
#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */
|
#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */
|
||||||
#define TPI_FIFO1_ITM_ATVALID_Msk (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */
|
#define TPI_FIFO1_ITM_ATVALID_Msk (0x1UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */
|
#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */
|
||||||
#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */
|
#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */
|
||||||
|
|
||||||
#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */
|
#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */
|
||||||
#define TPI_FIFO1_ETM_ATVALID_Msk (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */
|
#define TPI_FIFO1_ETM_ATVALID_Msk (0x1UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */
|
#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */
|
||||||
#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */
|
#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */
|
||||||
|
|
@ -1324,6 +1314,7 @@ typedef struct
|
||||||
__IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */
|
__IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */
|
||||||
__IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */
|
__IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */
|
||||||
__IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */
|
__IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */
|
||||||
|
__IM uint32_t MVFR2; /*!< Offset: 0x018 (R/ ) Media and FP Feature Register 2 */
|
||||||
} FPU_Type;
|
} FPU_Type;
|
||||||
|
|
||||||
/* Floating-Point Context Control Register Definitions */
|
/* Floating-Point Context Control Register Definitions */
|
||||||
|
|
@ -1409,6 +1400,11 @@ typedef struct
|
||||||
#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */
|
#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */
|
||||||
#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */
|
#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */
|
||||||
|
|
||||||
|
/* Media and FP Feature Register 2 Definitions */
|
||||||
|
|
||||||
|
#define FPU_MVFR2_VFP_Misc_Pos 4U /*!< MVFR2: VFP Misc bits Position */
|
||||||
|
#define FPU_MVFR2_VFP_Misc_Msk (0xFUL << FPU_MVFR2_VFP_Misc_Pos) /*!< MVFR2: VFP Misc bits Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_FPU */
|
/*@} end of group CMSIS_FPU */
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1689,7 +1685,9 @@ __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
if ((int32_t)(IRQn) >= 0)
|
if ((int32_t)(IRQn) >= 0)
|
||||||
{
|
{
|
||||||
|
__COMPILER_BARRIER();
|
||||||
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
||||||
|
__COMPILER_BARRIER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1914,6 +1912,7 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
|
/* ARM Application Note 321 states that the M4 does not require the architectural barrier */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1953,6 +1952,7 @@ __NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void)
|
||||||
|
|
||||||
/*@} end of CMSIS_Core_NVICFunctions */
|
/*@} end of CMSIS_Core_NVICFunctions */
|
||||||
|
|
||||||
|
|
||||||
/* ########################## MPU functions #################################### */
|
/* ########################## MPU functions #################################### */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,11 +1,11 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm7.h
|
* @file core_cm7.h
|
||||||
* @brief CMSIS Cortex-M7 Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M7 Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.8
|
* @version V5.1.6
|
||||||
* @date 04. June 2018
|
* @date 04. June 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
#if defined __ARM_PCS_VFP
|
#if defined __ARM_FP
|
||||||
#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
|
#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
|
||||||
#define __FPU_USED 1U
|
#define __FPU_USED 1U
|
||||||
#else
|
#else
|
||||||
|
|
@ -209,6 +209,11 @@
|
||||||
#warning "__DTCM_PRESENT not defined in device header file; using default!"
|
#warning "__DTCM_PRESENT not defined in device header file; using default!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VTOR_PRESENT
|
||||||
|
#define __VTOR_PRESENT 1U
|
||||||
|
#warning "__VTOR_PRESENT not defined in device header file; using default!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NVIC_PRIO_BITS
|
#ifndef __NVIC_PRIO_BITS
|
||||||
#define __NVIC_PRIO_BITS 3U
|
#define __NVIC_PRIO_BITS 3U
|
||||||
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
||||||
|
|
@ -423,7 +428,7 @@ typedef struct
|
||||||
__IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */
|
__IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */
|
||||||
uint32_t RESERVED0[24U];
|
uint32_t RESERVED0[24U];
|
||||||
__IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */
|
__IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */
|
||||||
uint32_t RSERVED1[24U];
|
uint32_t RESERVED1[24U];
|
||||||
__IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */
|
__IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */
|
||||||
uint32_t RESERVED2[24U];
|
uint32_t RESERVED2[24U];
|
||||||
__IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */
|
__IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */
|
||||||
|
|
@ -496,7 +501,8 @@ typedef struct
|
||||||
__OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */
|
__OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */
|
||||||
__OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */
|
__OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */
|
||||||
__OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */
|
__OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */
|
||||||
uint32_t RESERVED7[6U];
|
__OM uint32_t BPIALL; /*!< Offset: 0x278 ( /W) Branch Predictor Invalidate All */
|
||||||
|
uint32_t RESERVED7[5U];
|
||||||
__IOM uint32_t ITCMCR; /*!< Offset: 0x290 (R/W) Instruction Tightly-Coupled Memory Control Register */
|
__IOM uint32_t ITCMCR; /*!< Offset: 0x290 (R/W) Instruction Tightly-Coupled Memory Control Register */
|
||||||
__IOM uint32_t DTCMCR; /*!< Offset: 0x294 (R/W) Data Tightly-Coupled Memory Control Registers */
|
__IOM uint32_t DTCMCR; /*!< Offset: 0x294 (R/W) Data Tightly-Coupled Memory Control Registers */
|
||||||
__IOM uint32_t AHBPCR; /*!< Offset: 0x298 (R/W) AHBP Control Register */
|
__IOM uint32_t AHBPCR; /*!< Offset: 0x298 (R/W) AHBP Control Register */
|
||||||
|
|
@ -671,22 +677,22 @@ typedef struct
|
||||||
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
||||||
|
|
||||||
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
#define SCB_CFSR_MMARVALID_Pos (SCB_CFSR_MEMFAULTSR_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
||||||
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
#define SCB_CFSR_MLSPERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
||||||
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
#define SCB_CFSR_MSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
||||||
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
#define SCB_CFSR_MUNSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
||||||
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
#define SCB_CFSR_DACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
||||||
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
#define SCB_CFSR_IACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
||||||
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
||||||
|
|
||||||
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
|
|
@ -870,21 +876,24 @@ typedef struct
|
||||||
#define SCB_CACR_FORCEWT_Pos 2U /*!< SCB CACR: FORCEWT Position */
|
#define SCB_CACR_FORCEWT_Pos 2U /*!< SCB CACR: FORCEWT Position */
|
||||||
#define SCB_CACR_FORCEWT_Msk (1UL << SCB_CACR_FORCEWT_Pos) /*!< SCB CACR: FORCEWT Mask */
|
#define SCB_CACR_FORCEWT_Msk (1UL << SCB_CACR_FORCEWT_Pos) /*!< SCB CACR: FORCEWT Mask */
|
||||||
|
|
||||||
#define SCB_CACR_ECCEN_Pos 1U /*!< SCB CACR: ECCEN Position */
|
#define SCB_CACR_ECCEN_Pos 1U /*!< \deprecated SCB CACR: ECCEN Position */
|
||||||
#define SCB_CACR_ECCEN_Msk (1UL << SCB_CACR_ECCEN_Pos) /*!< SCB CACR: ECCEN Mask */
|
#define SCB_CACR_ECCEN_Msk (1UL << SCB_CACR_ECCEN_Pos) /*!< \deprecated SCB CACR: ECCEN Mask */
|
||||||
|
|
||||||
|
#define SCB_CACR_ECCDIS_Pos 1U /*!< SCB CACR: ECCDIS Position */
|
||||||
|
#define SCB_CACR_ECCDIS_Msk (1UL << SCB_CACR_ECCDIS_Pos) /*!< SCB CACR: ECCDIS Mask */
|
||||||
|
|
||||||
#define SCB_CACR_SIWT_Pos 0U /*!< SCB CACR: SIWT Position */
|
#define SCB_CACR_SIWT_Pos 0U /*!< SCB CACR: SIWT Position */
|
||||||
#define SCB_CACR_SIWT_Msk (1UL /*<< SCB_CACR_SIWT_Pos*/) /*!< SCB CACR: SIWT Mask */
|
#define SCB_CACR_SIWT_Msk (1UL /*<< SCB_CACR_SIWT_Pos*/) /*!< SCB CACR: SIWT Mask */
|
||||||
|
|
||||||
/* AHBS Control Register Definitions */
|
/* AHBS Control Register Definitions */
|
||||||
#define SCB_AHBSCR_INITCOUNT_Pos 11U /*!< SCB AHBSCR: INITCOUNT Position */
|
#define SCB_AHBSCR_INITCOUNT_Pos 11U /*!< SCB AHBSCR: INITCOUNT Position */
|
||||||
#define SCB_AHBSCR_INITCOUNT_Msk (0x1FUL << SCB_AHBPCR_INITCOUNT_Pos) /*!< SCB AHBSCR: INITCOUNT Mask */
|
#define SCB_AHBSCR_INITCOUNT_Msk (0x1FUL << SCB_AHBSCR_INITCOUNT_Pos) /*!< SCB AHBSCR: INITCOUNT Mask */
|
||||||
|
|
||||||
#define SCB_AHBSCR_TPRI_Pos 2U /*!< SCB AHBSCR: TPRI Position */
|
#define SCB_AHBSCR_TPRI_Pos 2U /*!< SCB AHBSCR: TPRI Position */
|
||||||
#define SCB_AHBSCR_TPRI_Msk (0x1FFUL << SCB_AHBPCR_TPRI_Pos) /*!< SCB AHBSCR: TPRI Mask */
|
#define SCB_AHBSCR_TPRI_Msk (0x1FFUL << SCB_AHBSCR_TPRI_Pos) /*!< SCB AHBSCR: TPRI Mask */
|
||||||
|
|
||||||
#define SCB_AHBSCR_CTL_Pos 0U /*!< SCB AHBSCR: CTL Position*/
|
#define SCB_AHBSCR_CTL_Pos 0U /*!< SCB AHBSCR: CTL Position*/
|
||||||
#define SCB_AHBSCR_CTL_Msk (3UL /*<< SCB_AHBPCR_CTL_Pos*/) /*!< SCB AHBSCR: CTL Mask */
|
#define SCB_AHBSCR_CTL_Msk (3UL /*<< SCB_AHBSCR_CTL_Pos*/) /*!< SCB AHBSCR: CTL Mask */
|
||||||
|
|
||||||
/* Auxiliary Bus Fault Status Register Definitions */
|
/* Auxiliary Bus Fault Status Register Definitions */
|
||||||
#define SCB_ABFSR_AXIMTYPE_Pos 8U /*!< SCB ABFSR: AXIMTYPE Position*/
|
#define SCB_ABFSR_AXIMTYPE_Pos 8U /*!< SCB ABFSR: AXIMTYPE Position*/
|
||||||
|
|
@ -930,6 +939,24 @@ typedef struct
|
||||||
#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */
|
#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */
|
||||||
|
|
||||||
/* Auxiliary Control Register Definitions */
|
/* Auxiliary Control Register Definitions */
|
||||||
|
#define SCnSCB_ACTLR_DISDYNADD_Pos 26U /*!< ACTLR: DISDYNADD Position */
|
||||||
|
#define SCnSCB_ACTLR_DISDYNADD_Msk (1UL << SCnSCB_ACTLR_DISDYNADD_Pos) /*!< ACTLR: DISDYNADD Mask */
|
||||||
|
|
||||||
|
#define SCnSCB_ACTLR_DISISSCH1_Pos 21U /*!< ACTLR: DISISSCH1 Position */
|
||||||
|
#define SCnSCB_ACTLR_DISISSCH1_Msk (0x1FUL << SCnSCB_ACTLR_DISISSCH1_Pos) /*!< ACTLR: DISISSCH1 Mask */
|
||||||
|
|
||||||
|
#define SCnSCB_ACTLR_DISDI_Pos 16U /*!< ACTLR: DISDI Position */
|
||||||
|
#define SCnSCB_ACTLR_DISDI_Msk (0x1FUL << SCnSCB_ACTLR_DISDI_Pos) /*!< ACTLR: DISDI Mask */
|
||||||
|
|
||||||
|
#define SCnSCB_ACTLR_DISCRITAXIRUR_Pos 15U /*!< ACTLR: DISCRITAXIRUR Position */
|
||||||
|
#define SCnSCB_ACTLR_DISCRITAXIRUR_Msk (1UL << SCnSCB_ACTLR_DISCRITAXIRUR_Pos) /*!< ACTLR: DISCRITAXIRUR Mask */
|
||||||
|
|
||||||
|
#define SCnSCB_ACTLR_DISBTACALLOC_Pos 14U /*!< ACTLR: DISBTACALLOC Position */
|
||||||
|
#define SCnSCB_ACTLR_DISBTACALLOC_Msk (1UL << SCnSCB_ACTLR_DISBTACALLOC_Pos) /*!< ACTLR: DISBTACALLOC Mask */
|
||||||
|
|
||||||
|
#define SCnSCB_ACTLR_DISBTACREAD_Pos 13U /*!< ACTLR: DISBTACREAD Position */
|
||||||
|
#define SCnSCB_ACTLR_DISBTACREAD_Msk (1UL << SCnSCB_ACTLR_DISBTACREAD_Pos) /*!< ACTLR: DISBTACREAD Mask */
|
||||||
|
|
||||||
#define SCnSCB_ACTLR_DISITMATBFLUSH_Pos 12U /*!< ACTLR: DISITMATBFLUSH Position */
|
#define SCnSCB_ACTLR_DISITMATBFLUSH_Pos 12U /*!< ACTLR: DISITMATBFLUSH Position */
|
||||||
#define SCnSCB_ACTLR_DISITMATBFLUSH_Msk (1UL << SCnSCB_ACTLR_DISITMATBFLUSH_Pos) /*!< ACTLR: DISITMATBFLUSH Mask */
|
#define SCnSCB_ACTLR_DISITMATBFLUSH_Msk (1UL << SCnSCB_ACTLR_DISITMATBFLUSH_Pos) /*!< ACTLR: DISITMATBFLUSH Mask */
|
||||||
|
|
||||||
|
|
@ -1024,10 +1051,7 @@ typedef struct
|
||||||
__IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */
|
__IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */
|
||||||
uint32_t RESERVED2[15U];
|
uint32_t RESERVED2[15U];
|
||||||
__IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */
|
__IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */
|
||||||
uint32_t RESERVED3[29U];
|
uint32_t RESERVED3[32U];
|
||||||
__OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */
|
|
||||||
__IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */
|
|
||||||
__IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */
|
|
||||||
uint32_t RESERVED4[43U];
|
uint32_t RESERVED4[43U];
|
||||||
__OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */
|
__OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */
|
||||||
__IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */
|
__IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */
|
||||||
|
|
@ -1078,18 +1102,6 @@ typedef struct
|
||||||
#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */
|
#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */
|
||||||
#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */
|
#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */
|
||||||
|
|
||||||
/* ITM Integration Write Register Definitions */
|
|
||||||
#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */
|
|
||||||
#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */
|
|
||||||
|
|
||||||
/* ITM Integration Read Register Definitions */
|
|
||||||
#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */
|
|
||||||
#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */
|
|
||||||
|
|
||||||
/* ITM Integration Mode Control Register Definitions */
|
|
||||||
#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */
|
|
||||||
#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */
|
|
||||||
|
|
||||||
/* ITM Lock Status Register Definitions */
|
/* ITM Lock Status Register Definitions */
|
||||||
#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */
|
#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */
|
||||||
#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */
|
#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */
|
||||||
|
|
@ -1325,13 +1337,13 @@ typedef struct
|
||||||
|
|
||||||
/* TPI Integration ETM Data Register Definitions (FIFO0) */
|
/* TPI Integration ETM Data Register Definitions (FIFO0) */
|
||||||
#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */
|
#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */
|
||||||
#define TPI_FIFO0_ITM_ATVALID_Msk (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */
|
#define TPI_FIFO0_ITM_ATVALID_Msk (0x1UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */
|
#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */
|
||||||
#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */
|
#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */
|
||||||
|
|
||||||
#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */
|
#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */
|
||||||
#define TPI_FIFO0_ETM_ATVALID_Msk (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */
|
#define TPI_FIFO0_ETM_ATVALID_Msk (0x1UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */
|
#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */
|
||||||
#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */
|
#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */
|
||||||
|
|
@ -1354,13 +1366,13 @@ typedef struct
|
||||||
|
|
||||||
/* TPI Integration ITM Data Register Definitions (FIFO1) */
|
/* TPI Integration ITM Data Register Definitions (FIFO1) */
|
||||||
#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */
|
#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */
|
||||||
#define TPI_FIFO1_ITM_ATVALID_Msk (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */
|
#define TPI_FIFO1_ITM_ATVALID_Msk (0x1UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */
|
#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */
|
||||||
#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */
|
#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */
|
||||||
|
|
||||||
#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */
|
#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */
|
||||||
#define TPI_FIFO1_ETM_ATVALID_Msk (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */
|
#define TPI_FIFO1_ETM_ATVALID_Msk (0x1UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */
|
#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */
|
||||||
#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */
|
#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */
|
||||||
|
|
@ -1617,6 +1629,9 @@ typedef struct
|
||||||
|
|
||||||
/* Media and FP Feature Register 2 Definitions */
|
/* Media and FP Feature Register 2 Definitions */
|
||||||
|
|
||||||
|
#define FPU_MVFR2_VFP_Misc_Pos 4U /*!< MVFR2: VFP Misc bits Position */
|
||||||
|
#define FPU_MVFR2_VFP_Misc_Msk (0xFUL << FPU_MVFR2_VFP_Misc_Pos) /*!< MVFR2: VFP Misc bits Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_FPU */
|
/*@} end of group CMSIS_FPU */
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1897,7 +1912,9 @@ __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
if ((int32_t)(IRQn) >= 0)
|
if ((int32_t)(IRQn) >= 0)
|
||||||
{
|
{
|
||||||
|
__COMPILER_BARRIER();
|
||||||
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
||||||
|
__COMPILER_BARRIER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2122,6 +2139,7 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
|
__DSB();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2161,6 +2179,7 @@ __NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void)
|
||||||
|
|
||||||
/*@} end of CMSIS_Core_NVICFunctions */
|
/*@} end of CMSIS_Core_NVICFunctions */
|
||||||
|
|
||||||
|
|
||||||
/* ########################## MPU functions #################################### */
|
/* ########################## MPU functions #################################### */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
|
|
@ -2169,6 +2188,7 @@ __NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* ########################## FPU functions #################################### */
|
/* ########################## FPU functions #################################### */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_Core_FunctionInterface
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
|
@ -2204,340 +2224,15 @@ __STATIC_INLINE uint32_t SCB_GetFPUType(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*@} end of CMSIS_Core_FpuFunctions */
|
/*@} end of CMSIS_Core_FpuFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ########################## Cache functions #################################### */
|
/* ########################## Cache functions #################################### */
|
||||||
/**
|
|
||||||
\ingroup CMSIS_Core_FunctionInterface
|
|
||||||
\defgroup CMSIS_Core_CacheFunctions Cache Functions
|
|
||||||
\brief Functions that configure Instruction and Data cache.
|
|
||||||
@{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Cache Size ID Register Macros */
|
#if ((defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)) || \
|
||||||
#define CCSIDR_WAYS(x) (((x) & SCB_CCSIDR_ASSOCIATIVITY_Msk) >> SCB_CCSIDR_ASSOCIATIVITY_Pos)
|
(defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)))
|
||||||
#define CCSIDR_SETS(x) (((x) & SCB_CCSIDR_NUMSETS_Msk ) >> SCB_CCSIDR_NUMSETS_Pos )
|
#include "cachel1_armv7.h"
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Enable I-Cache
|
|
||||||
\details Turns on I-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void SCB_EnableICache (void)
|
|
||||||
{
|
|
||||||
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
SCB->ICIALLU = 0UL; /* invalidate I-Cache */
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Disable I-Cache
|
|
||||||
\details Turns off I-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void SCB_DisableICache (void)
|
|
||||||
{
|
|
||||||
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
SCB->CCR &= ~(uint32_t)SCB_CCR_IC_Msk; /* disable I-Cache */
|
|
||||||
SCB->ICIALLU = 0UL; /* invalidate I-Cache */
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Invalidate I-Cache
|
|
||||||
\details Invalidates I-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void SCB_InvalidateICache (void)
|
|
||||||
{
|
|
||||||
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
SCB->ICIALLU = 0UL;
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Enable D-Cache
|
|
||||||
\details Turns on D-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void SCB_EnableDCache (void)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
uint32_t ccsidr;
|
|
||||||
uint32_t sets;
|
|
||||||
uint32_t ways;
|
|
||||||
|
|
||||||
SCB->CSSELR = 0U; /*(0U << 1U) | 0U;*/ /* Level 1 data cache */
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
ccsidr = SCB->CCSIDR;
|
|
||||||
|
|
||||||
/* invalidate D-Cache */
|
|
||||||
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
|
||||||
do {
|
|
||||||
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
|
||||||
do {
|
|
||||||
SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) |
|
|
||||||
((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) );
|
|
||||||
#if defined ( __CC_ARM )
|
|
||||||
__schedule_barrier();
|
|
||||||
#endif
|
|
||||||
} while (ways-- != 0U);
|
|
||||||
} while(sets-- != 0U);
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Disable D-Cache
|
|
||||||
\details Turns off D-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void SCB_DisableDCache (void)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
uint32_t ccsidr;
|
|
||||||
uint32_t sets;
|
|
||||||
uint32_t ways;
|
|
||||||
|
|
||||||
SCB->CSSELR = 0U; /*(0U << 1U) | 0U;*/ /* Level 1 data cache */
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
SCB->CCR &= ~(uint32_t)SCB_CCR_DC_Msk; /* disable D-Cache */
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
ccsidr = SCB->CCSIDR;
|
|
||||||
|
|
||||||
/* clean & invalidate D-Cache */
|
|
||||||
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
|
||||||
do {
|
|
||||||
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
|
||||||
do {
|
|
||||||
SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) |
|
|
||||||
((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) );
|
|
||||||
#if defined ( __CC_ARM )
|
|
||||||
__schedule_barrier();
|
|
||||||
#endif
|
|
||||||
} while (ways-- != 0U);
|
|
||||||
} while(sets-- != 0U);
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Invalidate D-Cache
|
|
||||||
\details Invalidates D-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void SCB_InvalidateDCache (void)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
uint32_t ccsidr;
|
|
||||||
uint32_t sets;
|
|
||||||
uint32_t ways;
|
|
||||||
|
|
||||||
SCB->CSSELR = 0U; /*(0U << 1U) | 0U;*/ /* Level 1 data cache */
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
ccsidr = SCB->CCSIDR;
|
|
||||||
|
|
||||||
/* invalidate D-Cache */
|
|
||||||
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
|
||||||
do {
|
|
||||||
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
|
||||||
do {
|
|
||||||
SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) |
|
|
||||||
((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) );
|
|
||||||
#if defined ( __CC_ARM )
|
|
||||||
__schedule_barrier();
|
|
||||||
#endif
|
|
||||||
} while (ways-- != 0U);
|
|
||||||
} while(sets-- != 0U);
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Clean D-Cache
|
|
||||||
\details Cleans D-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void SCB_CleanDCache (void)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
uint32_t ccsidr;
|
|
||||||
uint32_t sets;
|
|
||||||
uint32_t ways;
|
|
||||||
|
|
||||||
SCB->CSSELR = 0U; /*(0U << 1U) | 0U;*/ /* Level 1 data cache */
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
ccsidr = SCB->CCSIDR;
|
|
||||||
|
|
||||||
/* clean D-Cache */
|
|
||||||
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
|
||||||
do {
|
|
||||||
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
|
||||||
do {
|
|
||||||
SCB->DCCSW = (((sets << SCB_DCCSW_SET_Pos) & SCB_DCCSW_SET_Msk) |
|
|
||||||
((ways << SCB_DCCSW_WAY_Pos) & SCB_DCCSW_WAY_Msk) );
|
|
||||||
#if defined ( __CC_ARM )
|
|
||||||
__schedule_barrier();
|
|
||||||
#endif
|
|
||||||
} while (ways-- != 0U);
|
|
||||||
} while(sets-- != 0U);
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Clean & Invalidate D-Cache
|
|
||||||
\details Cleans and Invalidates D-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void SCB_CleanInvalidateDCache (void)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
uint32_t ccsidr;
|
|
||||||
uint32_t sets;
|
|
||||||
uint32_t ways;
|
|
||||||
|
|
||||||
SCB->CSSELR = 0U; /*(0U << 1U) | 0U;*/ /* Level 1 data cache */
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
ccsidr = SCB->CCSIDR;
|
|
||||||
|
|
||||||
/* clean & invalidate D-Cache */
|
|
||||||
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
|
||||||
do {
|
|
||||||
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
|
||||||
do {
|
|
||||||
SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) |
|
|
||||||
((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) );
|
|
||||||
#if defined ( __CC_ARM )
|
|
||||||
__schedule_barrier();
|
|
||||||
#endif
|
|
||||||
} while (ways-- != 0U);
|
|
||||||
} while(sets-- != 0U);
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief D-Cache Invalidate by address
|
|
||||||
\details Invalidates D-Cache for the given address
|
|
||||||
\param[in] addr address (aligned to 32-byte boundary)
|
|
||||||
\param[in] dsize size of memory block (in number of bytes)
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void SCB_InvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
int32_t op_size = dsize;
|
|
||||||
uint32_t op_addr = (uint32_t)addr;
|
|
||||||
int32_t linesize = 32; /* in Cortex-M7 size of cache line is fixed to 8 words (32 bytes) */
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
while (op_size > 0) {
|
|
||||||
SCB->DCIMVAC = op_addr;
|
|
||||||
op_addr += (uint32_t)linesize;
|
|
||||||
op_size -= linesize;
|
|
||||||
}
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief D-Cache Clean by address
|
|
||||||
\details Cleans D-Cache for the given address
|
|
||||||
\param[in] addr address (aligned to 32-byte boundary)
|
|
||||||
\param[in] dsize size of memory block (in number of bytes)
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void SCB_CleanDCache_by_Addr (uint32_t *addr, int32_t dsize)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
int32_t op_size = dsize;
|
|
||||||
uint32_t op_addr = (uint32_t) addr;
|
|
||||||
int32_t linesize = 32; /* in Cortex-M7 size of cache line is fixed to 8 words (32 bytes) */
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
while (op_size > 0) {
|
|
||||||
SCB->DCCMVAC = op_addr;
|
|
||||||
op_addr += (uint32_t)linesize;
|
|
||||||
op_size -= linesize;
|
|
||||||
}
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief D-Cache Clean and Invalidate by address
|
|
||||||
\details Cleans and invalidates D_Cache for the given address
|
|
||||||
\param[in] addr address (aligned to 32-byte boundary)
|
|
||||||
\param[in] dsize size of memory block (in number of bytes)
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void SCB_CleanInvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
int32_t op_size = dsize;
|
|
||||||
uint32_t op_addr = (uint32_t) addr;
|
|
||||||
int32_t linesize = 32; /* in Cortex-M7 size of cache line is fixed to 8 words (32 bytes) */
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
while (op_size > 0) {
|
|
||||||
SCB->DCCIMVAC = op_addr;
|
|
||||||
op_addr += (uint32_t)linesize;
|
|
||||||
op_size -= linesize;
|
|
||||||
}
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*@} end of CMSIS_Core_CacheFunctions */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ################################## SysTick function ############################################ */
|
/* ################################## SysTick function ############################################ */
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,11 +1,11 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_sc000.h
|
* @file core_sc000.h
|
||||||
* @brief CMSIS SC000 Core Peripheral Access Layer Header File
|
* @brief CMSIS SC000 Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.5
|
* @version V5.0.7
|
||||||
* @date 28. May 2018
|
* @date 27. March 2020
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
#if defined __ARM_PCS_VFP
|
#if defined __ARM_FP
|
||||||
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -142,6 +142,11 @@
|
||||||
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VTOR_PRESENT
|
||||||
|
#define __VTOR_PRESENT 0U
|
||||||
|
#warning "__VTOR_PRESENT not defined in device header file; using default!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NVIC_PRIO_BITS
|
#ifndef __NVIC_PRIO_BITS
|
||||||
#define __NVIC_PRIO_BITS 2U
|
#define __NVIC_PRIO_BITS 2U
|
||||||
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
||||||
|
|
@ -750,7 +755,9 @@ __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
if ((int32_t)(IRQn) >= 0)
|
if ((int32_t)(IRQn) >= 0)
|
||||||
{
|
{
|
||||||
|
__COMPILER_BARRIER();
|
||||||
NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
||||||
|
__COMPILER_BARRIER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -904,6 +911,7 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
|
/* ARM Application Note 321 states that the M0 and M0+ do not require the architectural barrier - assume SC000 is the same */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_sc300.h
|
* @file core_sc300.h
|
||||||
* @brief CMSIS SC300 Core Peripheral Access Layer Header File
|
* @brief CMSIS SC300 Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.6
|
* @version V5.0.10
|
||||||
* @date 04. June 2018
|
* @date 04. June 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
#if defined __ARM_PCS_VFP
|
#if defined __ARM_FP
|
||||||
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -142,6 +142,11 @@
|
||||||
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VTOR_PRESENT
|
||||||
|
#define __VTOR_PRESENT 1U
|
||||||
|
#warning "__VTOR_PRESENT not defined in device header file; using default!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NVIC_PRIO_BITS
|
#ifndef __NVIC_PRIO_BITS
|
||||||
#define __NVIC_PRIO_BITS 3U
|
#define __NVIC_PRIO_BITS 3U
|
||||||
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
||||||
|
|
@ -342,7 +347,7 @@ typedef struct
|
||||||
__IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */
|
__IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */
|
||||||
uint32_t RESERVED0[24U];
|
uint32_t RESERVED0[24U];
|
||||||
__IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */
|
__IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */
|
||||||
uint32_t RSERVED1[24U];
|
uint32_t RESERVED1[24U];
|
||||||
__IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */
|
__IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */
|
||||||
uint32_t RESERVED2[24U];
|
uint32_t RESERVED2[24U];
|
||||||
__IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */
|
__IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */
|
||||||
|
|
@ -557,19 +562,19 @@ typedef struct
|
||||||
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
||||||
|
|
||||||
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
#define SCB_CFSR_MMARVALID_Pos (SCB_CFSR_MEMFAULTSR_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
||||||
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
#define SCB_CFSR_MSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
||||||
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
#define SCB_CFSR_MUNSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
||||||
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
#define SCB_CFSR_DACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
||||||
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
#define SCB_CFSR_IACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
||||||
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
||||||
|
|
||||||
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
|
|
@ -653,13 +658,23 @@ typedef struct
|
||||||
{
|
{
|
||||||
uint32_t RESERVED0[1U];
|
uint32_t RESERVED0[1U];
|
||||||
__IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */
|
__IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */
|
||||||
uint32_t RESERVED1[1U];
|
__IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */
|
||||||
} SCnSCB_Type;
|
} SCnSCB_Type;
|
||||||
|
|
||||||
/* Interrupt Controller Type Register Definitions */
|
/* Interrupt Controller Type Register Definitions */
|
||||||
#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */
|
#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */
|
||||||
#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */
|
#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */
|
||||||
|
|
||||||
|
/* Auxiliary Control Register Definitions */
|
||||||
|
#define SCnSCB_ACTLR_DISFOLD_Pos 2U /*!< ACTLR: DISFOLD Position */
|
||||||
|
#define SCnSCB_ACTLR_DISFOLD_Msk (1UL << SCnSCB_ACTLR_DISFOLD_Pos) /*!< ACTLR: DISFOLD Mask */
|
||||||
|
|
||||||
|
#define SCnSCB_ACTLR_DISDEFWBUF_Pos 1U /*!< ACTLR: DISDEFWBUF Position */
|
||||||
|
#define SCnSCB_ACTLR_DISDEFWBUF_Msk (1UL << SCnSCB_ACTLR_DISDEFWBUF_Pos) /*!< ACTLR: DISDEFWBUF Mask */
|
||||||
|
|
||||||
|
#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */
|
||||||
|
#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_SCnotSCB */
|
/*@} end of group CMSIS_SCnotSCB */
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -739,10 +754,7 @@ typedef struct
|
||||||
__IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */
|
__IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */
|
||||||
uint32_t RESERVED2[15U];
|
uint32_t RESERVED2[15U];
|
||||||
__IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */
|
__IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */
|
||||||
uint32_t RESERVED3[29U];
|
uint32_t RESERVED3[32U];
|
||||||
__OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */
|
|
||||||
__IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */
|
|
||||||
__IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */
|
|
||||||
uint32_t RESERVED4[43U];
|
uint32_t RESERVED4[43U];
|
||||||
__OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */
|
__OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */
|
||||||
__IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */
|
__IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */
|
||||||
|
|
@ -793,18 +805,6 @@ typedef struct
|
||||||
#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */
|
#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */
|
||||||
#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */
|
#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */
|
||||||
|
|
||||||
/* ITM Integration Write Register Definitions */
|
|
||||||
#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */
|
|
||||||
#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */
|
|
||||||
|
|
||||||
/* ITM Integration Read Register Definitions */
|
|
||||||
#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */
|
|
||||||
#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */
|
|
||||||
|
|
||||||
/* ITM Integration Mode Control Register Definitions */
|
|
||||||
#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */
|
|
||||||
#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */
|
|
||||||
|
|
||||||
/* ITM Lock Status Register Definitions */
|
/* ITM Lock Status Register Definitions */
|
||||||
#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */
|
#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */
|
||||||
#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */
|
#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */
|
||||||
|
|
@ -1037,13 +1037,13 @@ typedef struct
|
||||||
|
|
||||||
/* TPI Integration ETM Data Register Definitions (FIFO0) */
|
/* TPI Integration ETM Data Register Definitions (FIFO0) */
|
||||||
#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */
|
#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */
|
||||||
#define TPI_FIFO0_ITM_ATVALID_Msk (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */
|
#define TPI_FIFO0_ITM_ATVALID_Msk (0x1UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */
|
#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */
|
||||||
#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */
|
#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */
|
||||||
|
|
||||||
#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */
|
#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */
|
||||||
#define TPI_FIFO0_ETM_ATVALID_Msk (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */
|
#define TPI_FIFO0_ETM_ATVALID_Msk (0x1UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */
|
#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */
|
||||||
#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */
|
#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */
|
||||||
|
|
@ -1066,13 +1066,13 @@ typedef struct
|
||||||
|
|
||||||
/* TPI Integration ITM Data Register Definitions (FIFO1) */
|
/* TPI Integration ITM Data Register Definitions (FIFO1) */
|
||||||
#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */
|
#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */
|
||||||
#define TPI_FIFO1_ITM_ATVALID_Msk (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */
|
#define TPI_FIFO1_ITM_ATVALID_Msk (0x1UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */
|
#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */
|
||||||
#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */
|
#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */
|
||||||
|
|
||||||
#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */
|
#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */
|
||||||
#define TPI_FIFO1_ETM_ATVALID_Msk (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */
|
#define TPI_FIFO1_ETM_ATVALID_Msk (0x1UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */
|
||||||
|
|
||||||
#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */
|
#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */
|
||||||
#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */
|
#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */
|
||||||
|
|
@ -1448,7 +1448,6 @@ typedef struct
|
||||||
#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */
|
#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Set Priority Grouping
|
\brief Set Priority Grouping
|
||||||
\details Sets the priority grouping field using the required unlock sequence.
|
\details Sets the priority grouping field using the required unlock sequence.
|
||||||
|
|
@ -1467,7 +1466,7 @@ __STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
|
||||||
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
|
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
|
||||||
reg_value = (reg_value |
|
reg_value = (reg_value |
|
||||||
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
|
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
|
||||||
(PriorityGroupTmp << 8U) ); /* Insert write key and priorty group */
|
(PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
|
||||||
SCB->AIRCR = reg_value;
|
SCB->AIRCR = reg_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1493,7 +1492,9 @@ __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
if ((int32_t)(IRQn) >= 0)
|
if ((int32_t)(IRQn) >= 0)
|
||||||
{
|
{
|
||||||
|
__COMPILER_BARRIER();
|
||||||
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
|
||||||
|
__COMPILER_BARRIER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1718,6 +1719,7 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
|
/* ARM Application Note 321 states that the M3 does not require the architectural barrier */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,11 +1,11 @@
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* @file mpu_armv7.h
|
* @file mpu_armv7.h
|
||||||
* @brief CMSIS MPU API for Armv7-M MPU
|
* @brief CMSIS MPU API for Armv7-M MPU
|
||||||
* @version V5.0.4
|
* @version V5.1.2
|
||||||
* @date 10. January 2018
|
* @date 25. May 2020
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2017-2020 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -103,7 +103,10 @@
|
||||||
#define ARM_MPU_RASR_EX(DisableExec, AccessPermission, AccessAttributes, SubRegionDisable, Size) \
|
#define ARM_MPU_RASR_EX(DisableExec, AccessPermission, AccessAttributes, SubRegionDisable, Size) \
|
||||||
((((DisableExec) << MPU_RASR_XN_Pos) & MPU_RASR_XN_Msk) | \
|
((((DisableExec) << MPU_RASR_XN_Pos) & MPU_RASR_XN_Msk) | \
|
||||||
(((AccessPermission) << MPU_RASR_AP_Pos) & MPU_RASR_AP_Msk) | \
|
(((AccessPermission) << MPU_RASR_AP_Pos) & MPU_RASR_AP_Msk) | \
|
||||||
(((AccessAttributes) ) & (MPU_RASR_TEX_Msk | MPU_RASR_S_Msk | MPU_RASR_C_Msk | MPU_RASR_B_Msk)))
|
(((AccessAttributes) & (MPU_RASR_TEX_Msk | MPU_RASR_S_Msk | MPU_RASR_C_Msk | MPU_RASR_B_Msk))) | \
|
||||||
|
(((SubRegionDisable) << MPU_RASR_SRD_Pos) & MPU_RASR_SRD_Msk) | \
|
||||||
|
(((Size) << MPU_RASR_SIZE_Pos) & MPU_RASR_SIZE_Msk) | \
|
||||||
|
(((MPU_RASR_ENABLE_Msk))))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MPU Region Attribute and Size Register Value
|
* MPU Region Attribute and Size Register Value
|
||||||
|
|
@ -131,7 +134,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MPU Memory Access Attribute for device memory.
|
* MPU Memory Access Attribute for device memory.
|
||||||
* - TEX: 000b (if non-shareable) or 010b (if shareable)
|
* - TEX: 000b (if shareable) or 010b (if non-shareable)
|
||||||
* - Shareable or non-shareable
|
* - Shareable or non-shareable
|
||||||
* - Non-cacheable
|
* - Non-cacheable
|
||||||
* - Bufferable (if shareable) or non-bufferable (if non-shareable)
|
* - Bufferable (if shareable) or non-bufferable (if non-shareable)
|
||||||
|
|
@ -151,7 +154,7 @@
|
||||||
* \param InnerCp Configures the inner cache policy.
|
* \param InnerCp Configures the inner cache policy.
|
||||||
* \param IsShareable Configures the memory as shareable or non-shareable.
|
* \param IsShareable Configures the memory as shareable or non-shareable.
|
||||||
*/
|
*/
|
||||||
#define ARM_MPU_ACCESS_NORMAL(OuterCp, InnerCp, IsShareable) ARM_MPU_ACCESS_((4U | (OuterCp)), IsShareable, ((InnerCp) & 2U), ((InnerCp) & 1U))
|
#define ARM_MPU_ACCESS_NORMAL(OuterCp, InnerCp, IsShareable) ARM_MPU_ACCESS_((4U | (OuterCp)), IsShareable, ((InnerCp) >> 1U), ((InnerCp) & 1U))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MPU Memory Access Attribute non-cacheable policy.
|
* MPU Memory Access Attribute non-cacheable policy.
|
||||||
|
|
@ -187,24 +190,26 @@ typedef struct {
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control)
|
__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control)
|
||||||
{
|
{
|
||||||
__DSB();
|
__DMB();
|
||||||
__ISB();
|
|
||||||
MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
|
MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
|
||||||
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
||||||
SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
|
SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
|
||||||
#endif
|
#endif
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Disable the MPU.
|
/** Disable the MPU.
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void ARM_MPU_Disable(void)
|
__STATIC_INLINE void ARM_MPU_Disable(void)
|
||||||
{
|
{
|
||||||
__DSB();
|
__DMB();
|
||||||
__ISB();
|
|
||||||
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
||||||
SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
|
SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
|
||||||
#endif
|
#endif
|
||||||
MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk;
|
MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Clear and disable the given MPU region.
|
/** Clear and disable the given MPU region.
|
||||||
|
|
@ -218,7 +223,7 @@ __STATIC_INLINE void ARM_MPU_ClrRegion(uint32_t rnr)
|
||||||
|
|
||||||
/** Configure an MPU region.
|
/** Configure an MPU region.
|
||||||
* \param rbar Value for RBAR register.
|
* \param rbar Value for RBAR register.
|
||||||
* \param rsar Value for RSAR register.
|
* \param rasr Value for RASR register.
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void ARM_MPU_SetRegion(uint32_t rbar, uint32_t rasr)
|
__STATIC_INLINE void ARM_MPU_SetRegion(uint32_t rbar, uint32_t rasr)
|
||||||
{
|
{
|
||||||
|
|
@ -229,7 +234,7 @@ __STATIC_INLINE void ARM_MPU_SetRegion(uint32_t rbar, uint32_t rasr)
|
||||||
/** Configure the given MPU region.
|
/** Configure the given MPU region.
|
||||||
* \param rnr Region number to be configured.
|
* \param rnr Region number to be configured.
|
||||||
* \param rbar Value for RBAR register.
|
* \param rbar Value for RBAR register.
|
||||||
* \param rsar Value for RSAR register.
|
* \param rasr Value for RASR register.
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void ARM_MPU_SetRegionEx(uint32_t rnr, uint32_t rbar, uint32_t rasr)
|
__STATIC_INLINE void ARM_MPU_SetRegionEx(uint32_t rnr, uint32_t rbar, uint32_t rasr)
|
||||||
{
|
{
|
||||||
|
|
@ -238,12 +243,12 @@ __STATIC_INLINE void ARM_MPU_SetRegionEx(uint32_t rnr, uint32_t rbar, uint32_t r
|
||||||
MPU->RASR = rasr;
|
MPU->RASR = rasr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Memcopy with strictly ordered memory access, e.g. for register targets.
|
/** Memcpy with strictly ordered memory access, e.g. used by code in ARM_MPU_Load().
|
||||||
* \param dst Destination data is copied to.
|
* \param dst Destination data is copied to.
|
||||||
* \param src Source data is copied from.
|
* \param src Source data is copied from.
|
||||||
* \param len Amount of data words to be copied.
|
* \param len Amount of data words to be copied.
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void orderedCpy(volatile uint32_t* dst, const uint32_t* __RESTRICT src, uint32_t len)
|
__STATIC_INLINE void ARM_MPU_OrderedMemcpy(volatile uint32_t* dst, const uint32_t* __RESTRICT src, uint32_t len)
|
||||||
{
|
{
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
for (i = 0U; i < len; ++i)
|
for (i = 0U; i < len; ++i)
|
||||||
|
|
@ -260,11 +265,11 @@ __STATIC_INLINE void ARM_MPU_Load(ARM_MPU_Region_t const* table, uint32_t cnt)
|
||||||
{
|
{
|
||||||
const uint32_t rowWordSize = sizeof(ARM_MPU_Region_t)/4U;
|
const uint32_t rowWordSize = sizeof(ARM_MPU_Region_t)/4U;
|
||||||
while (cnt > MPU_TYPE_RALIASES) {
|
while (cnt > MPU_TYPE_RALIASES) {
|
||||||
orderedCpy(&(MPU->RBAR), &(table->RBAR), MPU_TYPE_RALIASES*rowWordSize);
|
ARM_MPU_OrderedMemcpy(&(MPU->RBAR), &(table->RBAR), MPU_TYPE_RALIASES*rowWordSize);
|
||||||
table += MPU_TYPE_RALIASES;
|
table += MPU_TYPE_RALIASES;
|
||||||
cnt -= MPU_TYPE_RALIASES;
|
cnt -= MPU_TYPE_RALIASES;
|
||||||
}
|
}
|
||||||
orderedCpy(&(MPU->RBAR), &(table->RBAR), cnt*rowWordSize);
|
ARM_MPU_OrderedMemcpy(&(MPU->RBAR), &(table->RBAR), cnt*rowWordSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* @file mpu_armv8.h
|
* @file mpu_armv8.h
|
||||||
* @brief CMSIS MPU API for Armv8-M MPU
|
* @brief CMSIS MPU API for Armv8-M and Armv8.1-M MPU
|
||||||
* @version V5.0.4
|
* @version V5.1.3
|
||||||
* @date 10. January 2018
|
* @date 03. February 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2017-2021 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
* \param WA Write Allocation: Set to 1 to use cache allocation on write miss.
|
* \param WA Write Allocation: Set to 1 to use cache allocation on write miss.
|
||||||
*/
|
*/
|
||||||
#define ARM_MPU_ATTR_MEMORY_(NT, WB, RA, WA) \
|
#define ARM_MPU_ATTR_MEMORY_(NT, WB, RA, WA) \
|
||||||
(((NT & 1U) << 3U) | ((WB & 1U) << 2U) | ((RA & 1U) << 1U) | (WA & 1U))
|
((((NT) & 1U) << 3U) | (((WB) & 1U) << 2U) | (((RA) & 1U) << 1U) | ((WA) & 1U))
|
||||||
|
|
||||||
/** \brief Device memory type non Gathering, non Re-ordering, non Early Write Acknowledgement */
|
/** \brief Device memory type non Gathering, non Re-ordering, non Early Write Acknowledgement */
|
||||||
#define ARM_MPU_ATTR_DEVICE_nGnRnE (0U)
|
#define ARM_MPU_ATTR_DEVICE_nGnRnE (0U)
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
* \param O Outer memory attributes
|
* \param O Outer memory attributes
|
||||||
* \param I O == ARM_MPU_ATTR_DEVICE: Device memory attributes, else: Inner memory attributes
|
* \param I O == ARM_MPU_ATTR_DEVICE: Device memory attributes, else: Inner memory attributes
|
||||||
*/
|
*/
|
||||||
#define ARM_MPU_ATTR(O, I) (((O & 0xFU) << 4U) | (((O & 0xFU) != 0U) ? (I & 0xFU) : ((I & 0x3U) << 2U)))
|
#define ARM_MPU_ATTR(O, I) ((((O) & 0xFU) << 4U) | ((((O) & 0xFU) != 0U) ? ((I) & 0xFU) : (((I) & 0x3U) << 2U)))
|
||||||
|
|
||||||
/** \brief Normal memory non-shareable */
|
/** \brief Normal memory non-shareable */
|
||||||
#define ARM_MPU_SH_NON (0U)
|
#define ARM_MPU_SH_NON (0U)
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
* \param RO Read-Only: Set to 1 for read-only memory.
|
* \param RO Read-Only: Set to 1 for read-only memory.
|
||||||
* \param NP Non-Privileged: Set to 1 for non-privileged memory.
|
* \param NP Non-Privileged: Set to 1 for non-privileged memory.
|
||||||
*/
|
*/
|
||||||
#define ARM_MPU_AP_(RO, NP) (((RO & 1U) << 1U) | (NP & 1U))
|
#define ARM_MPU_AP_(RO, NP) ((((RO) & 1U) << 1U) | ((NP) & 1U))
|
||||||
|
|
||||||
/** \brief Region Base Address Register value
|
/** \brief Region Base Address Register value
|
||||||
* \param BASE The base address bits [31:5] of a memory region. The value is zero extended. Effective address gets 32 byte aligned.
|
* \param BASE The base address bits [31:5] of a memory region. The value is zero extended. Effective address gets 32 byte aligned.
|
||||||
|
|
@ -87,20 +87,35 @@
|
||||||
* \oaram XN eXecute Never: Set to 1 for a non-executable memory region.
|
* \oaram XN eXecute Never: Set to 1 for a non-executable memory region.
|
||||||
*/
|
*/
|
||||||
#define ARM_MPU_RBAR(BASE, SH, RO, NP, XN) \
|
#define ARM_MPU_RBAR(BASE, SH, RO, NP, XN) \
|
||||||
((BASE & MPU_RBAR_BASE_Msk) | \
|
(((BASE) & MPU_RBAR_BASE_Msk) | \
|
||||||
((SH << MPU_RBAR_SH_Pos) & MPU_RBAR_SH_Msk) | \
|
(((SH) << MPU_RBAR_SH_Pos) & MPU_RBAR_SH_Msk) | \
|
||||||
((ARM_MPU_AP_(RO, NP) << MPU_RBAR_AP_Pos) & MPU_RBAR_AP_Msk) | \
|
((ARM_MPU_AP_(RO, NP) << MPU_RBAR_AP_Pos) & MPU_RBAR_AP_Msk) | \
|
||||||
((XN << MPU_RBAR_XN_Pos) & MPU_RBAR_XN_Msk))
|
(((XN) << MPU_RBAR_XN_Pos) & MPU_RBAR_XN_Msk))
|
||||||
|
|
||||||
/** \brief Region Limit Address Register value
|
/** \brief Region Limit Address Register value
|
||||||
* \param LIMIT The limit address bits [31:5] for this memory region. The value is one extended.
|
* \param LIMIT The limit address bits [31:5] for this memory region. The value is one extended.
|
||||||
* \param IDX The attribute index to be associated with this memory region.
|
* \param IDX The attribute index to be associated with this memory region.
|
||||||
*/
|
*/
|
||||||
#define ARM_MPU_RLAR(LIMIT, IDX) \
|
#define ARM_MPU_RLAR(LIMIT, IDX) \
|
||||||
((LIMIT & MPU_RLAR_LIMIT_Msk) | \
|
(((LIMIT) & MPU_RLAR_LIMIT_Msk) | \
|
||||||
((IDX << MPU_RLAR_AttrIndx_Pos) & MPU_RLAR_AttrIndx_Msk) | \
|
(((IDX) << MPU_RLAR_AttrIndx_Pos) & MPU_RLAR_AttrIndx_Msk) | \
|
||||||
(MPU_RLAR_EN_Msk))
|
(MPU_RLAR_EN_Msk))
|
||||||
|
|
||||||
|
#if defined(MPU_RLAR_PXN_Pos)
|
||||||
|
|
||||||
|
/** \brief Region Limit Address Register with PXN value
|
||||||
|
* \param LIMIT The limit address bits [31:5] for this memory region. The value is one extended.
|
||||||
|
* \param PXN Privileged execute never. Defines whether code can be executed from this privileged region.
|
||||||
|
* \param IDX The attribute index to be associated with this memory region.
|
||||||
|
*/
|
||||||
|
#define ARM_MPU_RLAR_PXN(LIMIT, PXN, IDX) \
|
||||||
|
(((LIMIT) & MPU_RLAR_LIMIT_Msk) | \
|
||||||
|
(((PXN) << MPU_RLAR_PXN_Pos) & MPU_RLAR_PXN_Msk) | \
|
||||||
|
(((IDX) << MPU_RLAR_AttrIndx_Pos) & MPU_RLAR_AttrIndx_Msk) | \
|
||||||
|
(MPU_RLAR_EN_Msk))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Struct for a single MPU Region
|
* Struct for a single MPU Region
|
||||||
*/
|
*/
|
||||||
|
|
@ -114,24 +129,26 @@ typedef struct {
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control)
|
__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control)
|
||||||
{
|
{
|
||||||
__DSB();
|
__DMB();
|
||||||
__ISB();
|
|
||||||
MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
|
MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
|
||||||
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
||||||
SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
|
SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
|
||||||
#endif
|
#endif
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Disable the MPU.
|
/** Disable the MPU.
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void ARM_MPU_Disable(void)
|
__STATIC_INLINE void ARM_MPU_Disable(void)
|
||||||
{
|
{
|
||||||
__DSB();
|
__DMB();
|
||||||
__ISB();
|
|
||||||
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
||||||
SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
|
SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
|
||||||
#endif
|
#endif
|
||||||
MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk;
|
MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MPU_NS
|
#ifdef MPU_NS
|
||||||
|
|
@ -140,24 +157,26 @@ __STATIC_INLINE void ARM_MPU_Disable(void)
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void ARM_MPU_Enable_NS(uint32_t MPU_Control)
|
__STATIC_INLINE void ARM_MPU_Enable_NS(uint32_t MPU_Control)
|
||||||
{
|
{
|
||||||
__DSB();
|
__DMB();
|
||||||
__ISB();
|
|
||||||
MPU_NS->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
|
MPU_NS->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
|
||||||
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
||||||
SCB_NS->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
|
SCB_NS->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
|
||||||
#endif
|
#endif
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Disable the Non-secure MPU.
|
/** Disable the Non-secure MPU.
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void ARM_MPU_Disable_NS(void)
|
__STATIC_INLINE void ARM_MPU_Disable_NS(void)
|
||||||
{
|
{
|
||||||
__DSB();
|
__DMB();
|
||||||
__ISB();
|
|
||||||
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
||||||
SCB_NS->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
|
SCB_NS->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
|
||||||
#endif
|
#endif
|
||||||
MPU_NS->CTRL &= ~MPU_CTRL_ENABLE_Msk;
|
MPU_NS->CTRL &= ~MPU_CTRL_ENABLE_Msk;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -262,12 +281,12 @@ __STATIC_INLINE void ARM_MPU_SetRegion_NS(uint32_t rnr, uint32_t rbar, uint32_t
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Memcopy with strictly ordered memory access, e.g. for register targets.
|
/** Memcpy with strictly ordered memory access, e.g. used by code in ARM_MPU_LoadEx()
|
||||||
* \param dst Destination data is copied to.
|
* \param dst Destination data is copied to.
|
||||||
* \param src Source data is copied from.
|
* \param src Source data is copied from.
|
||||||
* \param len Amount of data words to be copied.
|
* \param len Amount of data words to be copied.
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void orderedCpy(volatile uint32_t* dst, const uint32_t* __RESTRICT src, uint32_t len)
|
__STATIC_INLINE void ARM_MPU_OrderedMemcpy(volatile uint32_t* dst, const uint32_t* __RESTRICT src, uint32_t len)
|
||||||
{
|
{
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
for (i = 0U; i < len; ++i)
|
for (i = 0U; i < len; ++i)
|
||||||
|
|
@ -287,7 +306,7 @@ __STATIC_INLINE void ARM_MPU_LoadEx(MPU_Type* mpu, uint32_t rnr, ARM_MPU_Region_
|
||||||
const uint32_t rowWordSize = sizeof(ARM_MPU_Region_t)/4U;
|
const uint32_t rowWordSize = sizeof(ARM_MPU_Region_t)/4U;
|
||||||
if (cnt == 1U) {
|
if (cnt == 1U) {
|
||||||
mpu->RNR = rnr;
|
mpu->RNR = rnr;
|
||||||
orderedCpy(&(mpu->RBAR), &(table->RBAR), rowWordSize);
|
ARM_MPU_OrderedMemcpy(&(mpu->RBAR), &(table->RBAR), rowWordSize);
|
||||||
} else {
|
} else {
|
||||||
uint32_t rnrBase = rnr & ~(MPU_TYPE_RALIASES-1U);
|
uint32_t rnrBase = rnr & ~(MPU_TYPE_RALIASES-1U);
|
||||||
uint32_t rnrOffset = rnr % MPU_TYPE_RALIASES;
|
uint32_t rnrOffset = rnr % MPU_TYPE_RALIASES;
|
||||||
|
|
@ -295,7 +314,7 @@ __STATIC_INLINE void ARM_MPU_LoadEx(MPU_Type* mpu, uint32_t rnr, ARM_MPU_Region_
|
||||||
mpu->RNR = rnrBase;
|
mpu->RNR = rnrBase;
|
||||||
while ((rnrOffset + cnt) > MPU_TYPE_RALIASES) {
|
while ((rnrOffset + cnt) > MPU_TYPE_RALIASES) {
|
||||||
uint32_t c = MPU_TYPE_RALIASES - rnrOffset;
|
uint32_t c = MPU_TYPE_RALIASES - rnrOffset;
|
||||||
orderedCpy(&(mpu->RBAR)+(rnrOffset*2U), &(table->RBAR), c*rowWordSize);
|
ARM_MPU_OrderedMemcpy(&(mpu->RBAR)+(rnrOffset*2U), &(table->RBAR), c*rowWordSize);
|
||||||
table += c;
|
table += c;
|
||||||
cnt -= c;
|
cnt -= c;
|
||||||
rnrOffset = 0U;
|
rnrOffset = 0U;
|
||||||
|
|
@ -303,7 +322,7 @@ __STATIC_INLINE void ARM_MPU_LoadEx(MPU_Type* mpu, uint32_t rnr, ARM_MPU_Region_
|
||||||
mpu->RNR = rnrBase;
|
mpu->RNR = rnrBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
orderedCpy(&(mpu->RBAR)+(rnrOffset*2U), &(table->RBAR), cnt*rowWordSize);
|
ARM_MPU_OrderedMemcpy(&(mpu->RBAR)+(rnrOffset*2U), &(table->RBAR), cnt*rowWordSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,206 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* @file pac_armv81.h
|
||||||
|
* @brief CMSIS PAC key functions for Armv8.1-M PAC extension
|
||||||
|
* @version V1.0.0
|
||||||
|
* @date 23. March 2022
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined ( __ICCARM__ )
|
||||||
|
#pragma system_include /* treat file as system include file for MISRA check */
|
||||||
|
#elif defined (__clang__)
|
||||||
|
#pragma clang system_header /* treat file as system include file */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PAC_ARMV81_H
|
||||||
|
#define PAC_ARMV81_H
|
||||||
|
|
||||||
|
|
||||||
|
/* ################### PAC Key functions ########################### */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_PacKeyFunctions PAC Key functions
|
||||||
|
\brief Functions that access the PAC keys.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if (defined (__ARM_FEATURE_PAUTH) && (__ARM_FEATURE_PAUTH == 1))
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief read the PAC key used for privileged mode
|
||||||
|
\details Reads the PAC key stored in the PAC_KEY_P registers.
|
||||||
|
\param [out] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __get_PAC_KEY_P (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"mrs r1, pac_key_p_0\n"
|
||||||
|
"str r1,[%0,#0]\n"
|
||||||
|
"mrs r1, pac_key_p_1\n"
|
||||||
|
"str r1,[%0,#4]\n"
|
||||||
|
"mrs r1, pac_key_p_2\n"
|
||||||
|
"str r1,[%0,#8]\n"
|
||||||
|
"mrs r1, pac_key_p_3\n"
|
||||||
|
"str r1,[%0,#12]\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief write the PAC key used for privileged mode
|
||||||
|
\details writes the given PAC key to the PAC_KEY_P registers.
|
||||||
|
\param [in] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __set_PAC_KEY_P (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"ldr r1,[%0,#0]\n"
|
||||||
|
"msr pac_key_p_0, r1\n"
|
||||||
|
"ldr r1,[%0,#4]\n"
|
||||||
|
"msr pac_key_p_1, r1\n"
|
||||||
|
"ldr r1,[%0,#8]\n"
|
||||||
|
"msr pac_key_p_2, r1\n"
|
||||||
|
"ldr r1,[%0,#12]\n"
|
||||||
|
"msr pac_key_p_3, r1\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief read the PAC key used for unprivileged mode
|
||||||
|
\details Reads the PAC key stored in the PAC_KEY_U registers.
|
||||||
|
\param [out] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __get_PAC_KEY_U (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"mrs r1, pac_key_u_0\n"
|
||||||
|
"str r1,[%0,#0]\n"
|
||||||
|
"mrs r1, pac_key_u_1\n"
|
||||||
|
"str r1,[%0,#4]\n"
|
||||||
|
"mrs r1, pac_key_u_2\n"
|
||||||
|
"str r1,[%0,#8]\n"
|
||||||
|
"mrs r1, pac_key_u_3\n"
|
||||||
|
"str r1,[%0,#12]\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief write the PAC key used for unprivileged mode
|
||||||
|
\details writes the given PAC key to the PAC_KEY_U registers.
|
||||||
|
\param [in] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __set_PAC_KEY_U (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"ldr r1,[%0,#0]\n"
|
||||||
|
"msr pac_key_u_0, r1\n"
|
||||||
|
"ldr r1,[%0,#4]\n"
|
||||||
|
"msr pac_key_u_1, r1\n"
|
||||||
|
"ldr r1,[%0,#8]\n"
|
||||||
|
"msr pac_key_u_2, r1\n"
|
||||||
|
"ldr r1,[%0,#12]\n"
|
||||||
|
"msr pac_key_u_3, r1\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief read the PAC key used for privileged mode (non-secure)
|
||||||
|
\details Reads the PAC key stored in the non-secure PAC_KEY_P registers when in secure mode.
|
||||||
|
\param [out] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __TZ_get_PAC_KEY_P_NS (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"mrs r1, pac_key_p_0_ns\n"
|
||||||
|
"str r1,[%0,#0]\n"
|
||||||
|
"mrs r1, pac_key_p_1_ns\n"
|
||||||
|
"str r1,[%0,#4]\n"
|
||||||
|
"mrs r1, pac_key_p_2_ns\n"
|
||||||
|
"str r1,[%0,#8]\n"
|
||||||
|
"mrs r1, pac_key_p_3_ns\n"
|
||||||
|
"str r1,[%0,#12]\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief write the PAC key used for privileged mode (non-secure)
|
||||||
|
\details writes the given PAC key to the non-secure PAC_KEY_P registers when in secure mode.
|
||||||
|
\param [in] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __TZ_set_PAC_KEY_P_NS (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"ldr r1,[%0,#0]\n"
|
||||||
|
"msr pac_key_p_0_ns, r1\n"
|
||||||
|
"ldr r1,[%0,#4]\n"
|
||||||
|
"msr pac_key_p_1_ns, r1\n"
|
||||||
|
"ldr r1,[%0,#8]\n"
|
||||||
|
"msr pac_key_p_2_ns, r1\n"
|
||||||
|
"ldr r1,[%0,#12]\n"
|
||||||
|
"msr pac_key_p_3_ns, r1\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief read the PAC key used for unprivileged mode (non-secure)
|
||||||
|
\details Reads the PAC key stored in the non-secure PAC_KEY_U registers when in secure mode.
|
||||||
|
\param [out] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __TZ_get_PAC_KEY_U_NS (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"mrs r1, pac_key_u_0_ns\n"
|
||||||
|
"str r1,[%0,#0]\n"
|
||||||
|
"mrs r1, pac_key_u_1_ns\n"
|
||||||
|
"str r1,[%0,#4]\n"
|
||||||
|
"mrs r1, pac_key_u_2_ns\n"
|
||||||
|
"str r1,[%0,#8]\n"
|
||||||
|
"mrs r1, pac_key_u_3_ns\n"
|
||||||
|
"str r1,[%0,#12]\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief write the PAC key used for unprivileged mode (non-secure)
|
||||||
|
\details writes the given PAC key to the non-secure PAC_KEY_U registers when in secure mode.
|
||||||
|
\param [in] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __TZ_set_PAC_KEY_U_NS (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"ldr r1,[%0,#0]\n"
|
||||||
|
"msr pac_key_u_0_ns, r1\n"
|
||||||
|
"ldr r1,[%0,#4]\n"
|
||||||
|
"msr pac_key_u_1_ns, r1\n"
|
||||||
|
"ldr r1,[%0,#8]\n"
|
||||||
|
"msr pac_key_u_2_ns, r1\n"
|
||||||
|
"ldr r1,[%0,#12]\n"
|
||||||
|
"msr pac_key_u_3_ns, r1\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) */
|
||||||
|
|
||||||
|
#endif /* (defined (__ARM_FEATURE_PAUTH) && (__ARM_FEATURE_PAUTH == 1)) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_PacKeyFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* PAC_ARMV81_H */
|
||||||
|
|
@ -0,0 +1,337 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* @file pmu_armv8.h
|
||||||
|
* @brief CMSIS PMU API for Armv8.1-M PMU
|
||||||
|
* @version V1.0.1
|
||||||
|
* @date 15. April 2020
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined ( __ICCARM__ )
|
||||||
|
#pragma system_include /* treat file as system include file for MISRA check */
|
||||||
|
#elif defined (__clang__)
|
||||||
|
#pragma clang system_header /* treat file as system include file */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ARM_PMU_ARMV8_H
|
||||||
|
#define ARM_PMU_ARMV8_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief PMU Events
|
||||||
|
* \note See the Armv8.1-M Architecture Reference Manual for full details on these PMU events.
|
||||||
|
* */
|
||||||
|
|
||||||
|
#define ARM_PMU_SW_INCR 0x0000 /*!< Software update to the PMU_SWINC register, architecturally executed and condition code check pass */
|
||||||
|
#define ARM_PMU_L1I_CACHE_REFILL 0x0001 /*!< L1 I-Cache refill */
|
||||||
|
#define ARM_PMU_L1D_CACHE_REFILL 0x0003 /*!< L1 D-Cache refill */
|
||||||
|
#define ARM_PMU_L1D_CACHE 0x0004 /*!< L1 D-Cache access */
|
||||||
|
#define ARM_PMU_LD_RETIRED 0x0006 /*!< Memory-reading instruction architecturally executed and condition code check pass */
|
||||||
|
#define ARM_PMU_ST_RETIRED 0x0007 /*!< Memory-writing instruction architecturally executed and condition code check pass */
|
||||||
|
#define ARM_PMU_INST_RETIRED 0x0008 /*!< Instruction architecturally executed */
|
||||||
|
#define ARM_PMU_EXC_TAKEN 0x0009 /*!< Exception entry */
|
||||||
|
#define ARM_PMU_EXC_RETURN 0x000A /*!< Exception return instruction architecturally executed and the condition code check pass */
|
||||||
|
#define ARM_PMU_PC_WRITE_RETIRED 0x000C /*!< Software change to the Program Counter (PC). Instruction is architecturally executed and condition code check pass */
|
||||||
|
#define ARM_PMU_BR_IMMED_RETIRED 0x000D /*!< Immediate branch architecturally executed */
|
||||||
|
#define ARM_PMU_BR_RETURN_RETIRED 0x000E /*!< Function return instruction architecturally executed and the condition code check pass */
|
||||||
|
#define ARM_PMU_UNALIGNED_LDST_RETIRED 0x000F /*!< Unaligned memory memory-reading or memory-writing instruction architecturally executed and condition code check pass */
|
||||||
|
#define ARM_PMU_BR_MIS_PRED 0x0010 /*!< Mispredicted or not predicted branch speculatively executed */
|
||||||
|
#define ARM_PMU_CPU_CYCLES 0x0011 /*!< Cycle */
|
||||||
|
#define ARM_PMU_BR_PRED 0x0012 /*!< Predictable branch speculatively executed */
|
||||||
|
#define ARM_PMU_MEM_ACCESS 0x0013 /*!< Data memory access */
|
||||||
|
#define ARM_PMU_L1I_CACHE 0x0014 /*!< Level 1 instruction cache access */
|
||||||
|
#define ARM_PMU_L1D_CACHE_WB 0x0015 /*!< Level 1 data cache write-back */
|
||||||
|
#define ARM_PMU_L2D_CACHE 0x0016 /*!< Level 2 data cache access */
|
||||||
|
#define ARM_PMU_L2D_CACHE_REFILL 0x0017 /*!< Level 2 data cache refill */
|
||||||
|
#define ARM_PMU_L2D_CACHE_WB 0x0018 /*!< Level 2 data cache write-back */
|
||||||
|
#define ARM_PMU_BUS_ACCESS 0x0019 /*!< Bus access */
|
||||||
|
#define ARM_PMU_MEMORY_ERROR 0x001A /*!< Local memory error */
|
||||||
|
#define ARM_PMU_INST_SPEC 0x001B /*!< Instruction speculatively executed */
|
||||||
|
#define ARM_PMU_BUS_CYCLES 0x001D /*!< Bus cycles */
|
||||||
|
#define ARM_PMU_CHAIN 0x001E /*!< For an odd numbered counter, increment when an overflow occurs on the preceding even-numbered counter on the same PE */
|
||||||
|
#define ARM_PMU_L1D_CACHE_ALLOCATE 0x001F /*!< Level 1 data cache allocation without refill */
|
||||||
|
#define ARM_PMU_L2D_CACHE_ALLOCATE 0x0020 /*!< Level 2 data cache allocation without refill */
|
||||||
|
#define ARM_PMU_BR_RETIRED 0x0021 /*!< Branch instruction architecturally executed */
|
||||||
|
#define ARM_PMU_BR_MIS_PRED_RETIRED 0x0022 /*!< Mispredicted branch instruction architecturally executed */
|
||||||
|
#define ARM_PMU_STALL_FRONTEND 0x0023 /*!< No operation issued because of the frontend */
|
||||||
|
#define ARM_PMU_STALL_BACKEND 0x0024 /*!< No operation issued because of the backend */
|
||||||
|
#define ARM_PMU_L2I_CACHE 0x0027 /*!< Level 2 instruction cache access */
|
||||||
|
#define ARM_PMU_L2I_CACHE_REFILL 0x0028 /*!< Level 2 instruction cache refill */
|
||||||
|
#define ARM_PMU_L3D_CACHE_ALLOCATE 0x0029 /*!< Level 3 data cache allocation without refill */
|
||||||
|
#define ARM_PMU_L3D_CACHE_REFILL 0x002A /*!< Level 3 data cache refill */
|
||||||
|
#define ARM_PMU_L3D_CACHE 0x002B /*!< Level 3 data cache access */
|
||||||
|
#define ARM_PMU_L3D_CACHE_WB 0x002C /*!< Level 3 data cache write-back */
|
||||||
|
#define ARM_PMU_LL_CACHE_RD 0x0036 /*!< Last level data cache read */
|
||||||
|
#define ARM_PMU_LL_CACHE_MISS_RD 0x0037 /*!< Last level data cache read miss */
|
||||||
|
#define ARM_PMU_L1D_CACHE_MISS_RD 0x0039 /*!< Level 1 data cache read miss */
|
||||||
|
#define ARM_PMU_OP_COMPLETE 0x003A /*!< Operation retired */
|
||||||
|
#define ARM_PMU_OP_SPEC 0x003B /*!< Operation speculatively executed */
|
||||||
|
#define ARM_PMU_STALL 0x003C /*!< Stall cycle for instruction or operation not sent for execution */
|
||||||
|
#define ARM_PMU_STALL_OP_BACKEND 0x003D /*!< Stall cycle for instruction or operation not sent for execution due to pipeline backend */
|
||||||
|
#define ARM_PMU_STALL_OP_FRONTEND 0x003E /*!< Stall cycle for instruction or operation not sent for execution due to pipeline frontend */
|
||||||
|
#define ARM_PMU_STALL_OP 0x003F /*!< Instruction or operation slots not occupied each cycle */
|
||||||
|
#define ARM_PMU_L1D_CACHE_RD 0x0040 /*!< Level 1 data cache read */
|
||||||
|
#define ARM_PMU_LE_RETIRED 0x0100 /*!< Loop end instruction executed */
|
||||||
|
#define ARM_PMU_LE_SPEC 0x0101 /*!< Loop end instruction speculatively executed */
|
||||||
|
#define ARM_PMU_BF_RETIRED 0x0104 /*!< Branch future instruction architecturally executed and condition code check pass */
|
||||||
|
#define ARM_PMU_BF_SPEC 0x0105 /*!< Branch future instruction speculatively executed and condition code check pass */
|
||||||
|
#define ARM_PMU_LE_CANCEL 0x0108 /*!< Loop end instruction not taken */
|
||||||
|
#define ARM_PMU_BF_CANCEL 0x0109 /*!< Branch future instruction not taken */
|
||||||
|
#define ARM_PMU_SE_CALL_S 0x0114 /*!< Call to secure function, resulting in Security state change */
|
||||||
|
#define ARM_PMU_SE_CALL_NS 0x0115 /*!< Call to non-secure function, resulting in Security state change */
|
||||||
|
#define ARM_PMU_DWT_CMPMATCH0 0x0118 /*!< DWT comparator 0 match */
|
||||||
|
#define ARM_PMU_DWT_CMPMATCH1 0x0119 /*!< DWT comparator 1 match */
|
||||||
|
#define ARM_PMU_DWT_CMPMATCH2 0x011A /*!< DWT comparator 2 match */
|
||||||
|
#define ARM_PMU_DWT_CMPMATCH3 0x011B /*!< DWT comparator 3 match */
|
||||||
|
#define ARM_PMU_MVE_INST_RETIRED 0x0200 /*!< MVE instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_INST_SPEC 0x0201 /*!< MVE instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_FP_RETIRED 0x0204 /*!< MVE floating-point instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_FP_SPEC 0x0205 /*!< MVE floating-point instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_FP_HP_RETIRED 0x0208 /*!< MVE half-precision floating-point instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_FP_HP_SPEC 0x0209 /*!< MVE half-precision floating-point instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_FP_SP_RETIRED 0x020C /*!< MVE single-precision floating-point instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_FP_SP_SPEC 0x020D /*!< MVE single-precision floating-point instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_FP_MAC_RETIRED 0x0214 /*!< MVE floating-point multiply or multiply-accumulate instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_FP_MAC_SPEC 0x0215 /*!< MVE floating-point multiply or multiply-accumulate instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_INT_RETIRED 0x0224 /*!< MVE integer instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_INT_SPEC 0x0225 /*!< MVE integer instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_INT_MAC_RETIRED 0x0228 /*!< MVE multiply or multiply-accumulate instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_INT_MAC_SPEC 0x0229 /*!< MVE multiply or multiply-accumulate instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_RETIRED 0x0238 /*!< MVE load or store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_SPEC 0x0239 /*!< MVE load or store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LD_RETIRED 0x023C /*!< MVE load instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LD_SPEC 0x023D /*!< MVE load instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_ST_RETIRED 0x0240 /*!< MVE store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_ST_SPEC 0x0241 /*!< MVE store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_CONTIG_RETIRED 0x0244 /*!< MVE contiguous load or store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_CONTIG_SPEC 0x0245 /*!< MVE contiguous load or store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LD_CONTIG_RETIRED 0x0248 /*!< MVE contiguous load instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LD_CONTIG_SPEC 0x0249 /*!< MVE contiguous load instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_ST_CONTIG_RETIRED 0x024C /*!< MVE contiguous store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_ST_CONTIG_SPEC 0x024D /*!< MVE contiguous store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_NONCONTIG_RETIRED 0x0250 /*!< MVE non-contiguous load or store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_NONCONTIG_SPEC 0x0251 /*!< MVE non-contiguous load or store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LD_NONCONTIG_RETIRED 0x0254 /*!< MVE non-contiguous load instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LD_NONCONTIG_SPEC 0x0255 /*!< MVE non-contiguous load instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_ST_NONCONTIG_RETIRED 0x0258 /*!< MVE non-contiguous store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_ST_NONCONTIG_SPEC 0x0259 /*!< MVE non-contiguous store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_MULTI_RETIRED 0x025C /*!< MVE memory instruction targeting multiple registers architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_MULTI_SPEC 0x025D /*!< MVE memory instruction targeting multiple registers speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LD_MULTI_RETIRED 0x0260 /*!< MVE memory load instruction targeting multiple registers architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LD_MULTI_SPEC 0x0261 /*!< MVE memory load instruction targeting multiple registers speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_ST_MULTI_RETIRED 0x0261 /*!< MVE memory store instruction targeting multiple registers architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_ST_MULTI_SPEC 0x0265 /*!< MVE memory store instruction targeting multiple registers speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_UNALIGNED_RETIRED 0x028C /*!< MVE unaligned memory load or store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_UNALIGNED_SPEC 0x028D /*!< MVE unaligned memory load or store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LD_UNALIGNED_RETIRED 0x0290 /*!< MVE unaligned load instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LD_UNALIGNED_SPEC 0x0291 /*!< MVE unaligned load instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_ST_UNALIGNED_RETIRED 0x0294 /*!< MVE unaligned store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_ST_UNALIGNED_SPEC 0x0295 /*!< MVE unaligned store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_UNALIGNED_NONCONTIG_RETIRED 0x0298 /*!< MVE unaligned noncontiguous load or store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_UNALIGNED_NONCONTIG_SPEC 0x0299 /*!< MVE unaligned noncontiguous load or store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_VREDUCE_RETIRED 0x02A0 /*!< MVE vector reduction instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_VREDUCE_SPEC 0x02A1 /*!< MVE vector reduction instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_VREDUCE_FP_RETIRED 0x02A4 /*!< MVE floating-point vector reduction instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_VREDUCE_FP_SPEC 0x02A5 /*!< MVE floating-point vector reduction instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_VREDUCE_INT_RETIRED 0x02A8 /*!< MVE integer vector reduction instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_VREDUCE_INT_SPEC 0x02A9 /*!< MVE integer vector reduction instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_PRED 0x02B8 /*!< Cycles where one or more predicated beats architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_STALL 0x02CC /*!< Stall cycles caused by an MVE instruction */
|
||||||
|
#define ARM_PMU_MVE_STALL_RESOURCE 0x02CD /*!< Stall cycles caused by an MVE instruction because of resource conflicts */
|
||||||
|
#define ARM_PMU_MVE_STALL_RESOURCE_MEM 0x02CE /*!< Stall cycles caused by an MVE instruction because of memory resource conflicts */
|
||||||
|
#define ARM_PMU_MVE_STALL_RESOURCE_FP 0x02CF /*!< Stall cycles caused by an MVE instruction because of floating-point resource conflicts */
|
||||||
|
#define ARM_PMU_MVE_STALL_RESOURCE_INT 0x02D0 /*!< Stall cycles caused by an MVE instruction because of integer resource conflicts */
|
||||||
|
#define ARM_PMU_MVE_STALL_BREAK 0x02D3 /*!< Stall cycles caused by an MVE chain break */
|
||||||
|
#define ARM_PMU_MVE_STALL_DEPENDENCY 0x02D4 /*!< Stall cycles caused by MVE register dependency */
|
||||||
|
#define ARM_PMU_ITCM_ACCESS 0x4007 /*!< Instruction TCM access */
|
||||||
|
#define ARM_PMU_DTCM_ACCESS 0x4008 /*!< Data TCM access */
|
||||||
|
#define ARM_PMU_TRCEXTOUT0 0x4010 /*!< ETM external output 0 */
|
||||||
|
#define ARM_PMU_TRCEXTOUT1 0x4011 /*!< ETM external output 1 */
|
||||||
|
#define ARM_PMU_TRCEXTOUT2 0x4012 /*!< ETM external output 2 */
|
||||||
|
#define ARM_PMU_TRCEXTOUT3 0x4013 /*!< ETM external output 3 */
|
||||||
|
#define ARM_PMU_CTI_TRIGOUT4 0x4018 /*!< Cross-trigger Interface output trigger 4 */
|
||||||
|
#define ARM_PMU_CTI_TRIGOUT5 0x4019 /*!< Cross-trigger Interface output trigger 5 */
|
||||||
|
#define ARM_PMU_CTI_TRIGOUT6 0x401A /*!< Cross-trigger Interface output trigger 6 */
|
||||||
|
#define ARM_PMU_CTI_TRIGOUT7 0x401B /*!< Cross-trigger Interface output trigger 7 */
|
||||||
|
|
||||||
|
/** \brief PMU Functions */
|
||||||
|
|
||||||
|
__STATIC_INLINE void ARM_PMU_Enable(void);
|
||||||
|
__STATIC_INLINE void ARM_PMU_Disable(void);
|
||||||
|
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_EVTYPER(uint32_t num, uint32_t type);
|
||||||
|
|
||||||
|
__STATIC_INLINE void ARM_PMU_CYCCNT_Reset(void);
|
||||||
|
__STATIC_INLINE void ARM_PMU_EVCNTR_ALL_Reset(void);
|
||||||
|
|
||||||
|
__STATIC_INLINE void ARM_PMU_CNTR_Enable(uint32_t mask);
|
||||||
|
__STATIC_INLINE void ARM_PMU_CNTR_Disable(uint32_t mask);
|
||||||
|
|
||||||
|
__STATIC_INLINE uint32_t ARM_PMU_Get_CCNTR(void);
|
||||||
|
__STATIC_INLINE uint32_t ARM_PMU_Get_EVCNTR(uint32_t num);
|
||||||
|
|
||||||
|
__STATIC_INLINE uint32_t ARM_PMU_Get_CNTR_OVS(void);
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_CNTR_OVS(uint32_t mask);
|
||||||
|
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_CNTR_IRQ_Enable(uint32_t mask);
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_CNTR_IRQ_Disable(uint32_t mask);
|
||||||
|
|
||||||
|
__STATIC_INLINE void ARM_PMU_CNTR_Increment(uint32_t mask);
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Enable the PMU
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_Enable(void)
|
||||||
|
{
|
||||||
|
PMU->CTRL |= PMU_CTRL_ENABLE_Msk;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Disable the PMU
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_Disable(void)
|
||||||
|
{
|
||||||
|
PMU->CTRL &= ~PMU_CTRL_ENABLE_Msk;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set event to count for PMU eventer counter
|
||||||
|
\param [in] num Event counter (0-30) to configure
|
||||||
|
\param [in] type Event to count
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_EVTYPER(uint32_t num, uint32_t type)
|
||||||
|
{
|
||||||
|
PMU->EVTYPER[num] = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Reset cycle counter
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_CYCCNT_Reset(void)
|
||||||
|
{
|
||||||
|
PMU->CTRL |= PMU_CTRL_CYCCNT_RESET_Msk;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Reset all event counters
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_EVCNTR_ALL_Reset(void)
|
||||||
|
{
|
||||||
|
PMU->CTRL |= PMU_CTRL_EVENTCNT_RESET_Msk;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Enable counters
|
||||||
|
\param [in] mask Counters to enable
|
||||||
|
\note Enables one or more of the following:
|
||||||
|
- event counters (0-30)
|
||||||
|
- cycle counter
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_CNTR_Enable(uint32_t mask)
|
||||||
|
{
|
||||||
|
PMU->CNTENSET = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Disable counters
|
||||||
|
\param [in] mask Counters to enable
|
||||||
|
\note Disables one or more of the following:
|
||||||
|
- event counters (0-30)
|
||||||
|
- cycle counter
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_CNTR_Disable(uint32_t mask)
|
||||||
|
{
|
||||||
|
PMU->CNTENCLR = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Read cycle counter
|
||||||
|
\return Cycle count
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t ARM_PMU_Get_CCNTR(void)
|
||||||
|
{
|
||||||
|
return PMU->CCNTR;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Read event counter
|
||||||
|
\param [in] num Event counter (0-30) to read
|
||||||
|
\return Event count
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t ARM_PMU_Get_EVCNTR(uint32_t num)
|
||||||
|
{
|
||||||
|
return PMU_EVCNTR_CNT_Msk & PMU->EVCNTR[num];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Read counter overflow status
|
||||||
|
\return Counter overflow status bits for the following:
|
||||||
|
- event counters (0-30)
|
||||||
|
- cycle counter
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t ARM_PMU_Get_CNTR_OVS(void)
|
||||||
|
{
|
||||||
|
return PMU->OVSSET;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Clear counter overflow status
|
||||||
|
\param [in] mask Counter overflow status bits to clear
|
||||||
|
\note Clears overflow status bits for one or more of the following:
|
||||||
|
- event counters (0-30)
|
||||||
|
- cycle counter
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_CNTR_OVS(uint32_t mask)
|
||||||
|
{
|
||||||
|
PMU->OVSCLR = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Enable counter overflow interrupt request
|
||||||
|
\param [in] mask Counter overflow interrupt request bits to set
|
||||||
|
\note Sets overflow interrupt request bits for one or more of the following:
|
||||||
|
- event counters (0-30)
|
||||||
|
- cycle counter
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_CNTR_IRQ_Enable(uint32_t mask)
|
||||||
|
{
|
||||||
|
PMU->INTENSET = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Disable counter overflow interrupt request
|
||||||
|
\param [in] mask Counter overflow interrupt request bits to clear
|
||||||
|
\note Clears overflow interrupt request bits for one or more of the following:
|
||||||
|
- event counters (0-30)
|
||||||
|
- cycle counter
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_CNTR_IRQ_Disable(uint32_t mask)
|
||||||
|
{
|
||||||
|
PMU->INTENCLR = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Software increment event counter
|
||||||
|
\param [in] mask Counters to increment
|
||||||
|
\note Software increment bits for one or more event counters (0-30)
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_CNTR_Increment(uint32_t mask)
|
||||||
|
{
|
||||||
|
PMU->SWINC = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -37,16 +37,12 @@ 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) || defined(STM32H7) || defined(STM32MP1)
|
#if 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)
|
#endif /* STM32H7 || STM32MP1 */
|
||||||
#define CRYP_CCF_CLEAR CRYP_CLEAR_CCF
|
|
||||||
#define CRYP_ERR_CLEAR CRYP_CLEAR_RWEIF
|
|
||||||
#endif /* STM32U5 */
|
|
||||||
#endif /* STM32U5 || STM32H7 || STM32MP1 */
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -113,6 +109,9 @@ extern "C" {
|
||||||
#define ADC4_SAMPLETIME_160CYCLES_5 ADC4_SAMPLETIME_814CYCLES_5
|
#define ADC4_SAMPLETIME_160CYCLES_5 ADC4_SAMPLETIME_814CYCLES_5
|
||||||
#endif /* STM32U5 */
|
#endif /* STM32U5 */
|
||||||
|
|
||||||
|
#if defined(STM32H5)
|
||||||
|
#define ADC_CHANNEL_VCORE ADC_CHANNEL_VDDCORE
|
||||||
|
#endif /* STM32H5 */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -140,7 +139,8 @@ extern "C" {
|
||||||
#define COMP_EXTI_LINE_COMP6_EVENT COMP_EXTI_LINE_COMP6
|
#define COMP_EXTI_LINE_COMP6_EVENT COMP_EXTI_LINE_COMP6
|
||||||
#define COMP_EXTI_LINE_COMP7_EVENT COMP_EXTI_LINE_COMP7
|
#define COMP_EXTI_LINE_COMP7_EVENT COMP_EXTI_LINE_COMP7
|
||||||
#if defined(STM32L0)
|
#if defined(STM32L0)
|
||||||
#define COMP_LPTIMCONNECTION_ENABLED ((uint32_t)0x00000003U) /*!< COMPX output generic naming: connected to LPTIM input 1 for COMP1, LPTIM input 2 for COMP2 */
|
#define COMP_LPTIMCONNECTION_ENABLED ((uint32_t)0x00000003U) /*!< COMPX output generic naming: connected to LPTIM
|
||||||
|
input 1 for COMP1, LPTIM input 2 for COMP2 */
|
||||||
#endif
|
#endif
|
||||||
#define COMP_OUTPUT_COMP6TIM2OCREFCLR COMP_OUTPUT_COMP6_TIM2OCREFCLR
|
#define COMP_OUTPUT_COMP6TIM2OCREFCLR COMP_OUTPUT_COMP6_TIM2OCREFCLR
|
||||||
#if defined(STM32F373xC) || defined(STM32F378xx)
|
#if defined(STM32F373xC) || defined(STM32F378xx)
|
||||||
|
|
@ -214,6 +214,11 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(STM32U5)
|
||||||
|
#define __HAL_COMP_COMP1_EXTI_CLEAR_RASING_FLAG __HAL_COMP_COMP1_EXTI_CLEAR_RISING_FLAG
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -234,10 +239,12 @@ extern "C" {
|
||||||
/** @defgroup CRC_Aliases CRC API aliases
|
/** @defgroup CRC_Aliases CRC API aliases
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#if defined(STM32C0)
|
#if defined(STM32H5) || defined(STM32C0)
|
||||||
#else
|
#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_Input_Data_Reverse HAL_CRCEx_Input_Data_Reverse /*!< Aliased to HAL_CRCEx_Input_Data_Reverse for
|
||||||
#define HAL_CRC_Output_Data_Reverse HAL_CRCEx_Output_Data_Reverse /*!< Aliased to HAL_CRCEx_Output_Data_Reverse for inter STM32 series compatibility */
|
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
|
#endif
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
@ -280,7 +287,13 @@ extern "C" {
|
||||||
#define DAC_TRIGGER_LPTIM3_OUT DAC_TRIGGER_LPTIM3_CH1
|
#define DAC_TRIGGER_LPTIM3_OUT DAC_TRIGGER_LPTIM3_CH1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(STM32L1) || defined(STM32L4) || defined(STM32G0) || defined(STM32L5) || defined(STM32H7) || defined(STM32F4) || defined(STM32G4)
|
#if defined(STM32H5)
|
||||||
|
#define DAC_TRIGGER_LPTIM1_OUT DAC_TRIGGER_LPTIM1_CH1
|
||||||
|
#define DAC_TRIGGER_LPTIM2_OUT DAC_TRIGGER_LPTIM2_CH1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#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
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -345,7 +358,8 @@ extern "C" {
|
||||||
#define HAL_DMAMUX_REQUEST_GEN_FALLING HAL_DMAMUX_REQ_GEN_FALLING
|
#define HAL_DMAMUX_REQUEST_GEN_FALLING HAL_DMAMUX_REQ_GEN_FALLING
|
||||||
#define HAL_DMAMUX_REQUEST_GEN_RISING_FALLING HAL_DMAMUX_REQ_GEN_RISING_FALLING
|
#define HAL_DMAMUX_REQUEST_GEN_RISING_FALLING HAL_DMAMUX_REQ_GEN_RISING_FALLING
|
||||||
|
|
||||||
#if defined(STM32L4R5xx) || defined(STM32L4R9xx) || defined(STM32L4R9xx) || defined(STM32L4S5xx) || defined(STM32L4S7xx) || defined(STM32L4S9xx)
|
#if defined(STM32L4R5xx) || defined(STM32L4R9xx) || defined(STM32L4R9xx) || defined(STM32L4S5xx) || \
|
||||||
|
defined(STM32L4S7xx) || defined(STM32L4S9xx)
|
||||||
#define DMA_REQUEST_DCMI_PSSI DMA_REQUEST_DCMI
|
#define DMA_REQUEST_DCMI_PSSI DMA_REQUEST_DCMI
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -530,7 +544,20 @@ extern "C" {
|
||||||
#define OB_USER_nBOOT0 OB_USER_NBOOT0
|
#define OB_USER_nBOOT0 OB_USER_NBOOT0
|
||||||
#define OB_nBOOT0_RESET OB_NBOOT0_RESET
|
#define OB_nBOOT0_RESET OB_NBOOT0_RESET
|
||||||
#define OB_nBOOT0_SET OB_NBOOT0_SET
|
#define OB_nBOOT0_SET OB_NBOOT0_SET
|
||||||
|
#define OB_USER_SRAM134_RST OB_USER_SRAM_RST
|
||||||
|
#define OB_SRAM134_RST_ERASE OB_SRAM_RST_ERASE
|
||||||
|
#define OB_SRAM134_RST_NOT_ERASE OB_SRAM_RST_NOT_ERASE
|
||||||
#endif /* STM32U5 */
|
#endif /* STM32U5 */
|
||||||
|
#if defined(STM32U0)
|
||||||
|
#define OB_USER_nRST_STOP OB_USER_NRST_STOP
|
||||||
|
#define OB_USER_nRST_STDBY OB_USER_NRST_STDBY
|
||||||
|
#define OB_USER_nRST_SHDW OB_USER_NRST_SHDW
|
||||||
|
#define OB_USER_nBOOT_SEL OB_USER_NBOOT_SEL
|
||||||
|
#define OB_USER_nBOOT0 OB_USER_NBOOT0
|
||||||
|
#define OB_USER_nBOOT1 OB_USER_NBOOT1
|
||||||
|
#define OB_nBOOT0_RESET OB_NBOOT0_RESET
|
||||||
|
#define OB_nBOOT0_SET OB_NBOOT0_SET
|
||||||
|
#endif /* STM32U0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
@ -574,6 +601,106 @@ extern "C" {
|
||||||
#define HAL_SYSCFG_DisableIOAnalogSwitchVDD HAL_SYSCFG_DisableIOSwitchVDD
|
#define HAL_SYSCFG_DisableIOAnalogSwitchVDD HAL_SYSCFG_DisableIOSwitchVDD
|
||||||
#endif /* STM32G4 */
|
#endif /* STM32G4 */
|
||||||
|
|
||||||
|
#if defined(STM32H5)
|
||||||
|
#define SYSCFG_IT_FPU_IOC SBS_IT_FPU_IOC
|
||||||
|
#define SYSCFG_IT_FPU_DZC SBS_IT_FPU_DZC
|
||||||
|
#define SYSCFG_IT_FPU_UFC SBS_IT_FPU_UFC
|
||||||
|
#define SYSCFG_IT_FPU_OFC SBS_IT_FPU_OFC
|
||||||
|
#define SYSCFG_IT_FPU_IDC SBS_IT_FPU_IDC
|
||||||
|
#define SYSCFG_IT_FPU_IXC SBS_IT_FPU_IXC
|
||||||
|
|
||||||
|
#define SYSCFG_BREAK_FLASH_ECC SBS_BREAK_FLASH_ECC
|
||||||
|
#define SYSCFG_BREAK_PVD SBS_BREAK_PVD
|
||||||
|
#define SYSCFG_BREAK_SRAM_ECC SBS_BREAK_SRAM_ECC
|
||||||
|
#define SYSCFG_BREAK_LOCKUP SBS_BREAK_LOCKUP
|
||||||
|
|
||||||
|
#define SYSCFG_VREFBUF_VOLTAGE_SCALE0 VREFBUF_VOLTAGE_SCALE0
|
||||||
|
#define SYSCFG_VREFBUF_VOLTAGE_SCALE1 VREFBUF_VOLTAGE_SCALE1
|
||||||
|
#define SYSCFG_VREFBUF_VOLTAGE_SCALE2 VREFBUF_VOLTAGE_SCALE2
|
||||||
|
#define SYSCFG_VREFBUF_VOLTAGE_SCALE3 VREFBUF_VOLTAGE_SCALE3
|
||||||
|
|
||||||
|
#define SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE VREFBUF_HIGH_IMPEDANCE_DISABLE
|
||||||
|
#define SYSCFG_VREFBUF_HIGH_IMPEDANCE_ENABLE VREFBUF_HIGH_IMPEDANCE_ENABLE
|
||||||
|
|
||||||
|
#define SYSCFG_FASTMODEPLUS_PB6 SBS_FASTMODEPLUS_PB6
|
||||||
|
#define SYSCFG_FASTMODEPLUS_PB7 SBS_FASTMODEPLUS_PB7
|
||||||
|
#define SYSCFG_FASTMODEPLUS_PB8 SBS_FASTMODEPLUS_PB8
|
||||||
|
#define SYSCFG_FASTMODEPLUS_PB9 SBS_FASTMODEPLUS_PB9
|
||||||
|
|
||||||
|
#define SYSCFG_ETH_MII SBS_ETH_MII
|
||||||
|
#define SYSCFG_ETH_RMII SBS_ETH_RMII
|
||||||
|
#define IS_SYSCFG_ETHERNET_CONFIG IS_SBS_ETHERNET_CONFIG
|
||||||
|
|
||||||
|
#define SYSCFG_MEMORIES_ERASE_FLAG_IPMEE SBS_MEMORIES_ERASE_FLAG_IPMEE
|
||||||
|
#define SYSCFG_MEMORIES_ERASE_FLAG_MCLR SBS_MEMORIES_ERASE_FLAG_MCLR
|
||||||
|
#define IS_SYSCFG_MEMORIES_ERASE_FLAG IS_SBS_MEMORIES_ERASE_FLAG
|
||||||
|
|
||||||
|
#define IS_SYSCFG_CODE_CONFIG IS_SBS_CODE_CONFIG
|
||||||
|
|
||||||
|
#define SYSCFG_MPU_NSEC SBS_MPU_NSEC
|
||||||
|
#define SYSCFG_VTOR_NSEC SBS_VTOR_NSEC
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
#define SYSCFG_SAU SBS_SAU
|
||||||
|
#define SYSCFG_MPU_SEC SBS_MPU_SEC
|
||||||
|
#define SYSCFG_VTOR_AIRCR_SEC SBS_VTOR_AIRCR_SEC
|
||||||
|
#define SYSCFG_LOCK_ALL SBS_LOCK_ALL
|
||||||
|
#else
|
||||||
|
#define SYSCFG_LOCK_ALL SBS_LOCK_ALL
|
||||||
|
#endif /* __ARM_FEATURE_CMSE */
|
||||||
|
|
||||||
|
#define SYSCFG_CLK SBS_CLK
|
||||||
|
#define SYSCFG_CLASSB SBS_CLASSB
|
||||||
|
#define SYSCFG_FPU SBS_FPU
|
||||||
|
#define SYSCFG_ALL SBS_ALL
|
||||||
|
|
||||||
|
#define SYSCFG_SEC SBS_SEC
|
||||||
|
#define SYSCFG_NSEC SBS_NSEC
|
||||||
|
|
||||||
|
#define __HAL_SYSCFG_FPU_INTERRUPT_ENABLE __HAL_SBS_FPU_INTERRUPT_ENABLE
|
||||||
|
#define __HAL_SYSCFG_FPU_INTERRUPT_DISABLE __HAL_SBS_FPU_INTERRUPT_DISABLE
|
||||||
|
|
||||||
|
#define __HAL_SYSCFG_BREAK_ECC_LOCK __HAL_SBS_BREAK_ECC_LOCK
|
||||||
|
#define __HAL_SYSCFG_BREAK_LOCKUP_LOCK __HAL_SBS_BREAK_LOCKUP_LOCK
|
||||||
|
#define __HAL_SYSCFG_BREAK_PVD_LOCK __HAL_SBS_BREAK_PVD_LOCK
|
||||||
|
#define __HAL_SYSCFG_BREAK_SRAM_ECC_LOCK __HAL_SBS_BREAK_SRAM_ECC_LOCK
|
||||||
|
|
||||||
|
#define __HAL_SYSCFG_FASTMODEPLUS_ENABLE __HAL_SBS_FASTMODEPLUS_ENABLE
|
||||||
|
#define __HAL_SYSCFG_FASTMODEPLUS_DISABLE __HAL_SBS_FASTMODEPLUS_DISABLE
|
||||||
|
|
||||||
|
#define __HAL_SYSCFG_GET_MEMORIES_ERASE_STATUS __HAL_SBS_GET_MEMORIES_ERASE_STATUS
|
||||||
|
#define __HAL_SYSCFG_CLEAR_MEMORIES_ERASE_STATUS __HAL_SBS_CLEAR_MEMORIES_ERASE_STATUS
|
||||||
|
|
||||||
|
#define IS_SYSCFG_FPU_INTERRUPT IS_SBS_FPU_INTERRUPT
|
||||||
|
#define IS_SYSCFG_BREAK_CONFIG IS_SBS_BREAK_CONFIG
|
||||||
|
#define IS_SYSCFG_VREFBUF_VOLTAGE_SCALE IS_VREFBUF_VOLTAGE_SCALE
|
||||||
|
#define IS_SYSCFG_VREFBUF_HIGH_IMPEDANCE IS_VREFBUF_HIGH_IMPEDANCE
|
||||||
|
#define IS_SYSCFG_VREFBUF_TRIMMING IS_VREFBUF_TRIMMING
|
||||||
|
#define IS_SYSCFG_FASTMODEPLUS IS_SBS_FASTMODEPLUS
|
||||||
|
#define IS_SYSCFG_ITEMS_ATTRIBUTES IS_SBS_ITEMS_ATTRIBUTES
|
||||||
|
#define IS_SYSCFG_ATTRIBUTES IS_SBS_ATTRIBUTES
|
||||||
|
#define IS_SYSCFG_LOCK_ITEMS IS_SBS_LOCK_ITEMS
|
||||||
|
|
||||||
|
#define HAL_SYSCFG_VREFBUF_VoltageScalingConfig HAL_VREFBUF_VoltageScalingConfig
|
||||||
|
#define HAL_SYSCFG_VREFBUF_HighImpedanceConfig HAL_VREFBUF_HighImpedanceConfig
|
||||||
|
#define HAL_SYSCFG_VREFBUF_TrimmingConfig HAL_VREFBUF_TrimmingConfig
|
||||||
|
#define HAL_SYSCFG_EnableVREFBUF HAL_EnableVREFBUF
|
||||||
|
#define HAL_SYSCFG_DisableVREFBUF HAL_DisableVREFBUF
|
||||||
|
|
||||||
|
#define HAL_SYSCFG_EnableIOAnalogSwitchBooster HAL_SBS_EnableIOAnalogSwitchBooster
|
||||||
|
#define HAL_SYSCFG_DisableIOAnalogSwitchBooster HAL_SBS_DisableIOAnalogSwitchBooster
|
||||||
|
#define HAL_SYSCFG_ETHInterfaceSelect HAL_SBS_ETHInterfaceSelect
|
||||||
|
|
||||||
|
#define HAL_SYSCFG_Lock HAL_SBS_Lock
|
||||||
|
#define HAL_SYSCFG_GetLock HAL_SBS_GetLock
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
#define HAL_SYSCFG_ConfigAttributes HAL_SBS_ConfigAttributes
|
||||||
|
#define HAL_SYSCFG_GetConfigAttributes HAL_SBS_GetConfigAttributes
|
||||||
|
#endif /* __ARM_FEATURE_CMSE */
|
||||||
|
|
||||||
|
#endif /* STM32H5 */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -641,14 +768,16 @@ extern "C" {
|
||||||
#define GPIO_AF10_OTG2_HS GPIO_AF10_OTG2_FS
|
#define GPIO_AF10_OTG2_HS GPIO_AF10_OTG2_FS
|
||||||
#define GPIO_AF10_OTG1_FS GPIO_AF10_OTG1_HS
|
#define GPIO_AF10_OTG1_FS GPIO_AF10_OTG1_HS
|
||||||
#define GPIO_AF12_OTG2_FS GPIO_AF12_OTG1_FS
|
#define GPIO_AF12_OTG2_FS GPIO_AF12_OTG1_FS
|
||||||
#endif /*STM32H743xx || STM32H753xx || STM32H750xx || STM32H742xx || STM32H745xx || STM32H755xx || STM32H747xx || STM32H757xx */
|
#endif /*STM32H743xx || STM32H753xx || STM32H750xx || STM32H742xx || STM32H745xx || STM32H755xx || STM32H747xx || \
|
||||||
|
STM32H757xx */
|
||||||
#endif /* STM32H7 */
|
#endif /* STM32H7 */
|
||||||
|
|
||||||
#define GPIO_AF0_LPTIM GPIO_AF0_LPTIM1
|
#define GPIO_AF0_LPTIM GPIO_AF0_LPTIM1
|
||||||
#define GPIO_AF1_LPTIM GPIO_AF1_LPTIM1
|
#define GPIO_AF1_LPTIM GPIO_AF1_LPTIM1
|
||||||
#define GPIO_AF2_LPTIM GPIO_AF2_LPTIM1
|
#define GPIO_AF2_LPTIM GPIO_AF2_LPTIM1
|
||||||
|
|
||||||
#if defined(STM32L0) || defined(STM32L4) || defined(STM32F4) || defined(STM32F2) || defined(STM32F7) || defined(STM32G4) || defined(STM32H7) || defined(STM32WB) || defined(STM32U5)
|
#if defined(STM32L0) || defined(STM32L4) || defined(STM32F4) || defined(STM32F2) || defined(STM32F7) || \
|
||||||
|
defined(STM32G4) || defined(STM32H7) || defined(STM32WB) || defined(STM32U5)
|
||||||
#define GPIO_SPEED_LOW GPIO_SPEED_FREQ_LOW
|
#define GPIO_SPEED_LOW GPIO_SPEED_FREQ_LOW
|
||||||
#define GPIO_SPEED_MEDIUM GPIO_SPEED_FREQ_MEDIUM
|
#define GPIO_SPEED_MEDIUM GPIO_SPEED_FREQ_MEDIUM
|
||||||
#define GPIO_SPEED_FAST GPIO_SPEED_FREQ_HIGH
|
#define GPIO_SPEED_FAST GPIO_SPEED_FREQ_HIGH
|
||||||
|
|
@ -670,9 +799,9 @@ extern "C" {
|
||||||
|
|
||||||
#define GPIO_AF6_DFSDM GPIO_AF6_DFSDM1
|
#define GPIO_AF6_DFSDM GPIO_AF6_DFSDM1
|
||||||
|
|
||||||
#if defined(STM32U5)
|
#if defined(STM32U5) || defined(STM32H5)
|
||||||
#define GPIO_AF0_RTC_50Hz GPIO_AF0_RTC_50HZ
|
#define GPIO_AF0_RTC_50Hz GPIO_AF0_RTC_50HZ
|
||||||
#endif /* STM32U5 */
|
#endif /* STM32U5 || STM32H5 */
|
||||||
#if defined(STM32U5)
|
#if defined(STM32U5)
|
||||||
#define GPIO_AF0_S2DSTOP GPIO_AF0_SRDSTOP
|
#define GPIO_AF0_S2DSTOP GPIO_AF0_SRDSTOP
|
||||||
#define GPIO_AF11_LPGPIO GPIO_AF11_LPGPIO1
|
#define GPIO_AF11_LPGPIO GPIO_AF11_LPGPIO1
|
||||||
|
|
@ -686,7 +815,25 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#if defined(STM32U5)
|
#if defined(STM32U5)
|
||||||
#define GTZC_PERIPH_DCMI GTZC_PERIPH_DCMI_PSSI
|
#define GTZC_PERIPH_DCMI GTZC_PERIPH_DCMI_PSSI
|
||||||
|
#define GTZC_PERIPH_LTDC GTZC_PERIPH_LTDCUSB
|
||||||
#endif /* STM32U5 */
|
#endif /* STM32U5 */
|
||||||
|
#if defined(STM32H5)
|
||||||
|
#define GTZC_PERIPH_DAC12 GTZC_PERIPH_DAC1
|
||||||
|
#define GTZC_PERIPH_ADC12 GTZC_PERIPH_ADC
|
||||||
|
#define GTZC_PERIPH_USBFS GTZC_PERIPH_USB
|
||||||
|
#endif /* STM32H5 */
|
||||||
|
#if defined(STM32H5) || defined(STM32U5)
|
||||||
|
#define GTZC_MCPBB_NB_VCTR_REG_MAX GTZC_MPCBB_NB_VCTR_REG_MAX
|
||||||
|
#define GTZC_MCPBB_NB_LCK_VCTR_REG_MAX GTZC_MPCBB_NB_LCK_VCTR_REG_MAX
|
||||||
|
#define GTZC_MCPBB_SUPERBLOCK_UNLOCKED GTZC_MPCBB_SUPERBLOCK_UNLOCKED
|
||||||
|
#define GTZC_MCPBB_SUPERBLOCK_LOCKED GTZC_MPCBB_SUPERBLOCK_LOCKED
|
||||||
|
#define GTZC_MCPBB_BLOCK_NSEC GTZC_MPCBB_BLOCK_NSEC
|
||||||
|
#define GTZC_MCPBB_BLOCK_SEC GTZC_MPCBB_BLOCK_SEC
|
||||||
|
#define GTZC_MCPBB_BLOCK_NPRIV GTZC_MPCBB_BLOCK_NPRIV
|
||||||
|
#define GTZC_MCPBB_BLOCK_PRIV GTZC_MPCBB_BLOCK_PRIV
|
||||||
|
#define GTZC_MCPBB_LOCK_OFF GTZC_MPCBB_LOCK_OFF
|
||||||
|
#define GTZC_MCPBB_LOCK_ON GTZC_MPCBB_LOCK_ON
|
||||||
|
#endif /* STM32H5 || STM32U5 */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -867,7 +1014,8 @@ extern "C" {
|
||||||
#define I2C_NOSTRETCH_ENABLED I2C_NOSTRETCH_ENABLE
|
#define I2C_NOSTRETCH_ENABLED I2C_NOSTRETCH_ENABLE
|
||||||
#define I2C_ANALOGFILTER_ENABLED I2C_ANALOGFILTER_ENABLE
|
#define I2C_ANALOGFILTER_ENABLED I2C_ANALOGFILTER_ENABLE
|
||||||
#define I2C_ANALOGFILTER_DISABLED I2C_ANALOGFILTER_DISABLE
|
#define I2C_ANALOGFILTER_DISABLED I2C_ANALOGFILTER_DISABLE
|
||||||
#if defined(STM32F0) || defined(STM32F1) || defined(STM32F3) || defined(STM32G0) || defined(STM32L4) || defined(STM32L1) || defined(STM32F7)
|
#if defined(STM32F0) || defined(STM32F1) || defined(STM32F3) || defined(STM32G0) || defined(STM32L4) || \
|
||||||
|
defined(STM32L1) || defined(STM32F7)
|
||||||
#define HAL_I2C_STATE_MEM_BUSY_TX HAL_I2C_STATE_BUSY_TX
|
#define HAL_I2C_STATE_MEM_BUSY_TX HAL_I2C_STATE_BUSY_TX
|
||||||
#define HAL_I2C_STATE_MEM_BUSY_RX HAL_I2C_STATE_BUSY_RX
|
#define HAL_I2C_STATE_MEM_BUSY_RX HAL_I2C_STATE_BUSY_RX
|
||||||
#define HAL_I2C_STATE_MASTER_BUSY_TX HAL_I2C_STATE_BUSY_TX
|
#define HAL_I2C_STATE_MASTER_BUSY_TX HAL_I2C_STATE_BUSY_TX
|
||||||
|
|
@ -1005,7 +1153,7 @@ extern "C" {
|
||||||
#define OPAMP_PGACONNECT_VM0 OPAMP_PGA_CONNECT_INVERTINGINPUT_IO0
|
#define OPAMP_PGACONNECT_VM0 OPAMP_PGA_CONNECT_INVERTINGINPUT_IO0
|
||||||
#define OPAMP_PGACONNECT_VM1 OPAMP_PGA_CONNECT_INVERTINGINPUT_IO1
|
#define OPAMP_PGACONNECT_VM1 OPAMP_PGA_CONNECT_INVERTINGINPUT_IO1
|
||||||
|
|
||||||
#if defined(STM32L1) || defined(STM32L4) || defined(STM32L5) || defined(STM32H7) || defined(STM32G4)
|
#if defined(STM32L1) || defined(STM32L4) || defined(STM32L5) || defined(STM32H7) || defined(STM32G4) || defined(STM32U5)
|
||||||
#define HAL_OPAMP_MSP_INIT_CB_ID HAL_OPAMP_MSPINIT_CB_ID
|
#define HAL_OPAMP_MSP_INIT_CB_ID HAL_OPAMP_MSPINIT_CB_ID
|
||||||
#define HAL_OPAMP_MSP_DEINIT_CB_ID HAL_OPAMP_MSPDEINIT_CB_ID
|
#define HAL_OPAMP_MSP_DEINIT_CB_ID HAL_OPAMP_MSPDEINIT_CB_ID
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1101,6 +1249,26 @@ 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(STM32H5) || defined(STM32H7RS)
|
||||||
|
#define TAMP_SECRETDEVICE_ERASE_NONE TAMP_DEVICESECRETS_ERASE_NONE
|
||||||
|
#define TAMP_SECRETDEVICE_ERASE_BKP_SRAM TAMP_DEVICESECRETS_ERASE_BKPSRAM
|
||||||
|
#endif /* STM32H5 || STM32H7RS */
|
||||||
|
|
||||||
|
#if defined(STM32WBA)
|
||||||
|
#define TAMP_SECRETDEVICE_ERASE_NONE TAMP_DEVICESECRETS_ERASE_NONE
|
||||||
|
#define TAMP_SECRETDEVICE_ERASE_SRAM2 TAMP_DEVICESECRETS_ERASE_SRAM2
|
||||||
|
#define TAMP_SECRETDEVICE_ERASE_RHUK TAMP_DEVICESECRETS_ERASE_RHUK
|
||||||
|
#define TAMP_SECRETDEVICE_ERASE_ICACHE TAMP_DEVICESECRETS_ERASE_ICACHE
|
||||||
|
#define TAMP_SECRETDEVICE_ERASE_SAES_AES_HASH TAMP_DEVICESECRETS_ERASE_SAES_AES_HASH
|
||||||
|
#define TAMP_SECRETDEVICE_ERASE_PKA_SRAM TAMP_DEVICESECRETS_ERASE_PKA_SRAM
|
||||||
|
#define TAMP_SECRETDEVICE_ERASE_ALL TAMP_DEVICESECRETS_ERASE_ALL
|
||||||
|
#endif /* STM32WBA */
|
||||||
|
|
||||||
|
#if defined(STM32H5) || defined(STM32WBA) || defined(STM32H7RS)
|
||||||
|
#define TAMP_SECRETDEVICE_ERASE_DISABLE TAMP_DEVICESECRETS_ERASE_NONE
|
||||||
|
#define TAMP_SECRETDEVICE_ERASE_ENABLE TAMP_SECRETDEVICE_ERASE_ALL
|
||||||
|
#endif /* STM32H5 || STM32WBA || STM32H7RS */
|
||||||
|
|
||||||
#if defined(STM32F7)
|
#if defined(STM32F7)
|
||||||
#define RTC_TAMPCR_TAMPXE RTC_TAMPER_ENABLE_BITS_MASK
|
#define RTC_TAMPCR_TAMPXE RTC_TAMPER_ENABLE_BITS_MASK
|
||||||
#define RTC_TAMPCR_TAMPXIE RTC_TAMPER_IT_ENABLE_BITS_MASK
|
#define RTC_TAMPCR_TAMPXIE RTC_TAMPER_IT_ENABLE_BITS_MASK
|
||||||
|
|
@ -1111,12 +1279,12 @@ extern "C" {
|
||||||
#define RTC_TAMPCR_TAMPXIE RTC_TAMPER_X_INTERRUPT
|
#define RTC_TAMPCR_TAMPXIE RTC_TAMPER_X_INTERRUPT
|
||||||
#endif /* STM32H7 */
|
#endif /* STM32H7 */
|
||||||
|
|
||||||
#if defined(STM32F7) || defined(STM32H7)
|
#if defined(STM32F7) || defined(STM32H7) || defined(STM32L0)
|
||||||
#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_TAMP
|
#define RTC_ALL_TAMPER_INTERRUPT RTC_IT_TAMP
|
||||||
#endif /* STM32F7 || STM32H7 */
|
#endif /* STM32F7 || STM32H7 || STM32L0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
@ -1283,7 +1451,7 @@ 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)
|
#if defined(STM32U5)
|
||||||
#define OCREF_CLEAR_SELECT_Pos OCREF_CLEAR_SELECT_POS
|
#define OCREF_CLEAR_SELECT_Pos OCREF_CLEAR_SELECT_POS
|
||||||
#define OCREF_CLEAR_SELECT_Msk OCREF_CLEAR_SELECT_MSK
|
#define OCREF_CLEAR_SELECT_Msk OCREF_CLEAR_SELECT_MSK
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1400,26 +1568,36 @@ extern "C" {
|
||||||
#define ETH_MAC_TXFIFONOT_EMPTY 0x01000000U /* Tx FIFO not empty */
|
#define ETH_MAC_TXFIFONOT_EMPTY 0x01000000U /* Tx FIFO not empty */
|
||||||
#define ETH_MAC_TXFIFO_WRITE_ACTIVE 0x00400000U /* Tx FIFO write active */
|
#define ETH_MAC_TXFIFO_WRITE_ACTIVE 0x00400000U /* Tx FIFO write active */
|
||||||
#define ETH_MAC_TXFIFO_IDLE 0x00000000U /* Tx FIFO read status: Idle */
|
#define ETH_MAC_TXFIFO_IDLE 0x00000000U /* Tx FIFO read status: Idle */
|
||||||
#define ETH_MAC_TXFIFO_READ 0x00100000U /* Tx FIFO read status: Read (transferring data to the MAC transmitter) */
|
#define ETH_MAC_TXFIFO_READ 0x00100000U /* Tx FIFO read status: Read (transferring data to
|
||||||
#define ETH_MAC_TXFIFO_WAITING 0x00200000U /* Tx FIFO read status: Waiting for TxStatus from MAC transmitter */
|
the MAC transmitter) */
|
||||||
#define ETH_MAC_TXFIFO_WRITING 0x00300000U /* Tx FIFO read status: Writing the received TxStatus or flushing the TxFIFO */
|
#define ETH_MAC_TXFIFO_WAITING 0x00200000U /* Tx FIFO read status: Waiting for TxStatus from
|
||||||
|
MAC transmitter */
|
||||||
|
#define ETH_MAC_TXFIFO_WRITING 0x00300000U /* Tx FIFO read status: Writing the received TxStatus
|
||||||
|
or flushing the TxFIFO */
|
||||||
#define ETH_MAC_TRANSMISSION_PAUSE 0x00080000U /* MAC transmitter in pause */
|
#define ETH_MAC_TRANSMISSION_PAUSE 0x00080000U /* MAC transmitter in pause */
|
||||||
#define ETH_MAC_TRANSMITFRAMECONTROLLER_IDLE 0x00000000U /* MAC transmit frame controller: Idle */
|
#define ETH_MAC_TRANSMITFRAMECONTROLLER_IDLE 0x00000000U /* MAC transmit frame controller: Idle */
|
||||||
#define ETH_MAC_TRANSMITFRAMECONTROLLER_WAITING 0x00020000U /* MAC transmit frame controller: Waiting for Status of previous frame or IFG/backoff period to be over */
|
#define ETH_MAC_TRANSMITFRAMECONTROLLER_WAITING 0x00020000U /* MAC transmit frame controller: Waiting for Status
|
||||||
#define ETH_MAC_TRANSMITFRAMECONTROLLER_GENRATING_PCF 0x00040000U /* MAC transmit frame controller: Generating and transmitting a Pause control frame (in full duplex mode) */
|
of previous frame or IFG/backoff period to be over */
|
||||||
#define ETH_MAC_TRANSMITFRAMECONTROLLER_TRANSFERRING 0x00060000U /* MAC transmit frame controller: Transferring input frame for transmission */
|
#define ETH_MAC_TRANSMITFRAMECONTROLLER_GENRATING_PCF 0x00040000U /* MAC transmit frame controller: Generating and
|
||||||
|
transmitting a Pause control frame (in full duplex mode) */
|
||||||
|
#define ETH_MAC_TRANSMITFRAMECONTROLLER_TRANSFERRING 0x00060000U /* MAC transmit frame controller: Transferring input
|
||||||
|
frame for transmission */
|
||||||
#define ETH_MAC_MII_TRANSMIT_ACTIVE 0x00010000U /* MAC MII transmit engine active */
|
#define ETH_MAC_MII_TRANSMIT_ACTIVE 0x00010000U /* MAC MII transmit engine active */
|
||||||
#define ETH_MAC_RXFIFO_EMPTY 0x00000000U /* Rx FIFO fill level: empty */
|
#define ETH_MAC_RXFIFO_EMPTY 0x00000000U /* Rx FIFO fill level: empty */
|
||||||
#define ETH_MAC_RXFIFO_BELOW_THRESHOLD 0x00000100U /* Rx FIFO fill level: fill-level below flow-control de-activate threshold */
|
#define ETH_MAC_RXFIFO_BELOW_THRESHOLD 0x00000100U /* Rx FIFO fill level: fill-level below flow-control
|
||||||
#define ETH_MAC_RXFIFO_ABOVE_THRESHOLD 0x00000200U /* Rx FIFO fill level: fill-level above flow-control activate threshold */
|
de-activate threshold */
|
||||||
|
#define ETH_MAC_RXFIFO_ABOVE_THRESHOLD 0x00000200U /* Rx FIFO fill level: fill-level above flow-control
|
||||||
|
activate threshold */
|
||||||
#define ETH_MAC_RXFIFO_FULL 0x00000300U /* Rx FIFO fill level: full */
|
#define ETH_MAC_RXFIFO_FULL 0x00000300U /* Rx FIFO fill level: full */
|
||||||
#if defined(STM32F1)
|
#if defined(STM32F1)
|
||||||
#else
|
#else
|
||||||
#define ETH_MAC_READCONTROLLER_IDLE 0x00000000U /* Rx FIFO read controller IDLE state */
|
#define ETH_MAC_READCONTROLLER_IDLE 0x00000000U /* Rx FIFO read controller IDLE state */
|
||||||
#define ETH_MAC_READCONTROLLER_READING_DATA 0x00000020U /* Rx FIFO read controller Reading frame data */
|
#define ETH_MAC_READCONTROLLER_READING_DATA 0x00000020U /* Rx FIFO read controller Reading frame data */
|
||||||
#define ETH_MAC_READCONTROLLER_READING_STATUS 0x00000040U /* Rx FIFO read controller Reading frame status (or time-stamp) */
|
#define ETH_MAC_READCONTROLLER_READING_STATUS 0x00000040U /* Rx FIFO read controller Reading frame status
|
||||||
|
(or time-stamp) */
|
||||||
#endif
|
#endif
|
||||||
#define ETH_MAC_READCONTROLLER_FLUSHING 0x00000060U /* Rx FIFO read controller Flushing the frame data and status */
|
#define ETH_MAC_READCONTROLLER_FLUSHING 0x00000060U /* Rx FIFO read controller Flushing the frame data and
|
||||||
|
status */
|
||||||
#define ETH_MAC_RXFIFO_WRITE_ACTIVE 0x00000010U /* Rx FIFO write controller active */
|
#define ETH_MAC_RXFIFO_WRITE_ACTIVE 0x00000010U /* Rx FIFO write controller active */
|
||||||
#define ETH_MAC_SMALL_FIFO_NOTACTIVE 0x00000000U /* MAC small FIFO read / write controllers not active */
|
#define ETH_MAC_SMALL_FIFO_NOTACTIVE 0x00000000U /* MAC small FIFO read / write controllers not active */
|
||||||
#define ETH_MAC_SMALL_FIFO_READ_ACTIVE 0x00000002U /* MAC small FIFO read controller active */
|
#define ETH_MAC_SMALL_FIFO_READ_ACTIVE 0x00000002U /* MAC small FIFO read controller active */
|
||||||
|
|
@ -1427,6 +1605,8 @@ extern "C" {
|
||||||
#define ETH_MAC_SMALL_FIFO_RW_ACTIVE 0x00000006U /* MAC small FIFO read / write controllers active */
|
#define ETH_MAC_SMALL_FIFO_RW_ACTIVE 0x00000006U /* MAC small FIFO read / write controllers active */
|
||||||
#define ETH_MAC_MII_RECEIVE_PROTOCOL_ACTIVE 0x00000001U /* MAC MII receive protocol engine active */
|
#define ETH_MAC_MII_RECEIVE_PROTOCOL_ACTIVE 0x00000001U /* MAC MII receive protocol engine active */
|
||||||
|
|
||||||
|
#define ETH_TxPacketConfig ETH_TxPacketConfigTypeDef /* Transmit Packet Configuration structure definition */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -1590,7 +1770,8 @@ extern "C" {
|
||||||
#define HAL_EnableDBGStandbyMode HAL_DBGMCU_EnableDBGStandbyMode
|
#define HAL_EnableDBGStandbyMode HAL_DBGMCU_EnableDBGStandbyMode
|
||||||
#define HAL_DisableDBGStandbyMode HAL_DBGMCU_DisableDBGStandbyMode
|
#define HAL_DisableDBGStandbyMode HAL_DBGMCU_DisableDBGStandbyMode
|
||||||
#define HAL_DBG_LowPowerConfig(Periph, cmd) (((cmd\
|
#define HAL_DBG_LowPowerConfig(Periph, cmd) (((cmd\
|
||||||
)==ENABLE)? HAL_DBGMCU_DBG_EnableLowPowerConfig(Periph) : HAL_DBGMCU_DBG_DisableLowPowerConfig(Periph))
|
)==ENABLE)? HAL_DBGMCU_DBG_EnableLowPowerConfig(Periph) : \
|
||||||
|
HAL_DBGMCU_DBG_DisableLowPowerConfig(Periph))
|
||||||
#define HAL_VREFINT_OutputSelect HAL_SYSCFG_VREFINT_OutputSelect
|
#define HAL_VREFINT_OutputSelect HAL_SYSCFG_VREFINT_OutputSelect
|
||||||
#define HAL_Lock_Cmd(cmd) (((cmd)==ENABLE) ? HAL_SYSCFG_Enable_Lock_VREFINT() : HAL_SYSCFG_Disable_Lock_VREFINT())
|
#define HAL_Lock_Cmd(cmd) (((cmd)==ENABLE) ? HAL_SYSCFG_Enable_Lock_VREFINT() : HAL_SYSCFG_Disable_Lock_VREFINT())
|
||||||
#if defined(STM32L0)
|
#if defined(STM32L0)
|
||||||
|
|
@ -1599,8 +1780,10 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#define HAL_ADC_EnableBuffer_Cmd(cmd) (((cmd)==ENABLE) ? HAL_ADCEx_EnableVREFINT() : HAL_ADCEx_DisableVREFINT())
|
#define HAL_ADC_EnableBuffer_Cmd(cmd) (((cmd)==ENABLE) ? HAL_ADCEx_EnableVREFINT() : HAL_ADCEx_DisableVREFINT())
|
||||||
#define HAL_ADC_EnableBufferSensor_Cmd(cmd) (((cmd\
|
#define HAL_ADC_EnableBufferSensor_Cmd(cmd) (((cmd\
|
||||||
)==ENABLE) ? HAL_ADCEx_EnableVREFINTTempSensor() : HAL_ADCEx_DisableVREFINTTempSensor())
|
)==ENABLE) ? HAL_ADCEx_EnableVREFINTTempSensor() : \
|
||||||
#if defined(STM32H7A3xx) || defined(STM32H7B3xx) || defined(STM32H7B0xx) || defined(STM32H7A3xxQ) || defined(STM32H7B3xxQ) || defined(STM32H7B0xxQ)
|
HAL_ADCEx_DisableVREFINTTempSensor())
|
||||||
|
#if defined(STM32H7A3xx) || defined(STM32H7B3xx) || defined(STM32H7B0xx) || defined(STM32H7A3xxQ) || \
|
||||||
|
defined(STM32H7B3xxQ) || defined(STM32H7B0xxQ)
|
||||||
#define HAL_EnableSRDomainDBGStopMode HAL_EnableDomain3DBGStopMode
|
#define HAL_EnableSRDomainDBGStopMode HAL_EnableDomain3DBGStopMode
|
||||||
#define HAL_DisableSRDomainDBGStopMode HAL_DisableDomain3DBGStopMode
|
#define HAL_DisableSRDomainDBGStopMode HAL_DisableDomain3DBGStopMode
|
||||||
#define HAL_EnableSRDomainDBGStandbyMode HAL_EnableDomain3DBGStandbyMode
|
#define HAL_EnableSRDomainDBGStandbyMode HAL_EnableDomain3DBGStandbyMode
|
||||||
|
|
@ -1634,16 +1817,21 @@ extern "C" {
|
||||||
#define HAL_FMPI2CEx_AnalogFilter_Config HAL_FMPI2CEx_ConfigAnalogFilter
|
#define HAL_FMPI2CEx_AnalogFilter_Config HAL_FMPI2CEx_ConfigAnalogFilter
|
||||||
#define HAL_FMPI2CEx_DigitalFilter_Config HAL_FMPI2CEx_ConfigDigitalFilter
|
#define HAL_FMPI2CEx_DigitalFilter_Config HAL_FMPI2CEx_ConfigDigitalFilter
|
||||||
|
|
||||||
#define HAL_I2CFastModePlusConfig(SYSCFG_I2CFastModePlus, cmd) (((cmd\
|
#define HAL_I2CFastModePlusConfig(SYSCFG_I2CFastModePlus, cmd) (((cmd) == ENABLE)? \
|
||||||
)==ENABLE)? HAL_I2CEx_EnableFastModePlus(SYSCFG_I2CFastModePlus): HAL_I2CEx_DisableFastModePlus(SYSCFG_I2CFastModePlus))
|
HAL_I2CEx_EnableFastModePlus(SYSCFG_I2CFastModePlus): \
|
||||||
|
HAL_I2CEx_DisableFastModePlus(SYSCFG_I2CFastModePlus))
|
||||||
|
|
||||||
#if defined(STM32H7) || defined(STM32WB) || defined(STM32G0) || defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || defined(STM32L4) || defined(STM32L5) || defined(STM32G4) || defined(STM32L1)
|
#if defined(STM32H7) || defined(STM32WB) || defined(STM32G0) || defined(STM32F0) || defined(STM32F1) || \
|
||||||
|
defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || \
|
||||||
|
defined(STM32L4) || defined(STM32L5) || defined(STM32G4) || defined(STM32L1)
|
||||||
#define HAL_I2C_Master_Sequential_Transmit_IT HAL_I2C_Master_Seq_Transmit_IT
|
#define HAL_I2C_Master_Sequential_Transmit_IT HAL_I2C_Master_Seq_Transmit_IT
|
||||||
#define HAL_I2C_Master_Sequential_Receive_IT HAL_I2C_Master_Seq_Receive_IT
|
#define HAL_I2C_Master_Sequential_Receive_IT HAL_I2C_Master_Seq_Receive_IT
|
||||||
#define HAL_I2C_Slave_Sequential_Transmit_IT HAL_I2C_Slave_Seq_Transmit_IT
|
#define HAL_I2C_Slave_Sequential_Transmit_IT HAL_I2C_Slave_Seq_Transmit_IT
|
||||||
#define HAL_I2C_Slave_Sequential_Receive_IT HAL_I2C_Slave_Seq_Receive_IT
|
#define HAL_I2C_Slave_Sequential_Receive_IT HAL_I2C_Slave_Seq_Receive_IT
|
||||||
#endif /* STM32H7 || STM32WB || STM32G0 || STM32F0 || STM32F1 || STM32F2 || STM32F3 || STM32F4 || STM32F7 || STM32L0 || STM32L4 || STM32L5 || STM32G4 || STM32L1 */
|
#endif /* STM32H7 || STM32WB || STM32G0 || STM32F0 || STM32F1 || STM32F2 || STM32F3 || STM32F4 || STM32F7 || STM32L0 ||
|
||||||
#if defined(STM32H7) || defined(STM32WB) || defined(STM32G0) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || defined(STM32L4) || defined(STM32L5) || defined(STM32G4)|| defined(STM32L1)
|
STM32L4 || STM32L5 || STM32G4 || STM32L1 */
|
||||||
|
#if defined(STM32H7) || defined(STM32WB) || defined(STM32G0) || defined(STM32F4) || defined(STM32F7) || \
|
||||||
|
defined(STM32L0) || defined(STM32L4) || defined(STM32L5) || defined(STM32G4)|| defined(STM32L1)
|
||||||
#define HAL_I2C_Master_Sequential_Transmit_DMA HAL_I2C_Master_Seq_Transmit_DMA
|
#define HAL_I2C_Master_Sequential_Transmit_DMA HAL_I2C_Master_Seq_Transmit_DMA
|
||||||
#define HAL_I2C_Master_Sequential_Receive_DMA HAL_I2C_Master_Seq_Receive_DMA
|
#define HAL_I2C_Master_Sequential_Receive_DMA HAL_I2C_Master_Seq_Receive_DMA
|
||||||
#define HAL_I2C_Slave_Sequential_Transmit_DMA HAL_I2C_Slave_Seq_Transmit_DMA
|
#define HAL_I2C_Slave_Sequential_Transmit_DMA HAL_I2C_Slave_Seq_Transmit_DMA
|
||||||
|
|
@ -1768,6 +1956,17 @@ extern "C" {
|
||||||
#define PWR_SRAM5_PAGE13_STOP_RETENTION PWR_SRAM5_PAGE13_STOP
|
#define PWR_SRAM5_PAGE13_STOP_RETENTION PWR_SRAM5_PAGE13_STOP
|
||||||
#define PWR_SRAM5_FULL_STOP_RETENTION PWR_SRAM5_FULL_STOP
|
#define PWR_SRAM5_FULL_STOP_RETENTION PWR_SRAM5_FULL_STOP
|
||||||
|
|
||||||
|
#define PWR_SRAM6_PAGE1_STOP_RETENTION PWR_SRAM6_PAGE1_STOP
|
||||||
|
#define PWR_SRAM6_PAGE2_STOP_RETENTION PWR_SRAM6_PAGE2_STOP
|
||||||
|
#define PWR_SRAM6_PAGE3_STOP_RETENTION PWR_SRAM6_PAGE3_STOP
|
||||||
|
#define PWR_SRAM6_PAGE4_STOP_RETENTION PWR_SRAM6_PAGE4_STOP
|
||||||
|
#define PWR_SRAM6_PAGE5_STOP_RETENTION PWR_SRAM6_PAGE5_STOP
|
||||||
|
#define PWR_SRAM6_PAGE6_STOP_RETENTION PWR_SRAM6_PAGE6_STOP
|
||||||
|
#define PWR_SRAM6_PAGE7_STOP_RETENTION PWR_SRAM6_PAGE7_STOP
|
||||||
|
#define PWR_SRAM6_PAGE8_STOP_RETENTION PWR_SRAM6_PAGE8_STOP
|
||||||
|
#define PWR_SRAM6_FULL_STOP_RETENTION PWR_SRAM6_FULL_STOP
|
||||||
|
|
||||||
|
|
||||||
#define PWR_ICACHE_FULL_STOP_RETENTION PWR_ICACHE_FULL_STOP
|
#define PWR_ICACHE_FULL_STOP_RETENTION PWR_ICACHE_FULL_STOP
|
||||||
#define PWR_DCACHE1_FULL_STOP_RETENTION PWR_DCACHE1_FULL_STOP
|
#define PWR_DCACHE1_FULL_STOP_RETENTION PWR_DCACHE1_FULL_STOP
|
||||||
#define PWR_DCACHE2_FULL_STOP_RETENTION PWR_DCACHE2_FULL_STOP
|
#define PWR_DCACHE2_FULL_STOP_RETENTION PWR_DCACHE2_FULL_STOP
|
||||||
|
|
@ -1776,6 +1975,8 @@ extern "C" {
|
||||||
#define PWR_PKA32RAM_FULL_STOP_RETENTION PWR_PKA32RAM_FULL_STOP
|
#define PWR_PKA32RAM_FULL_STOP_RETENTION PWR_PKA32RAM_FULL_STOP
|
||||||
#define PWR_GRAPHICPRAM_FULL_STOP_RETENTION PWR_GRAPHICPRAM_FULL_STOP
|
#define PWR_GRAPHICPRAM_FULL_STOP_RETENTION PWR_GRAPHICPRAM_FULL_STOP
|
||||||
#define PWR_DSIRAM_FULL_STOP_RETENTION PWR_DSIRAM_FULL_STOP
|
#define PWR_DSIRAM_FULL_STOP_RETENTION PWR_DSIRAM_FULL_STOP
|
||||||
|
#define PWR_JPEGRAM_FULL_STOP_RETENTION PWR_JPEGRAM_FULL_STOP
|
||||||
|
|
||||||
|
|
||||||
#define PWR_SRAM2_PAGE1_STANDBY_RETENTION PWR_SRAM2_PAGE1_STANDBY
|
#define PWR_SRAM2_PAGE1_STANDBY_RETENTION PWR_SRAM2_PAGE1_STANDBY
|
||||||
#define PWR_SRAM2_PAGE2_STANDBY_RETENTION PWR_SRAM2_PAGE2_STANDBY
|
#define PWR_SRAM2_PAGE2_STANDBY_RETENTION PWR_SRAM2_PAGE2_STANDBY
|
||||||
|
|
@ -1786,10 +1987,25 @@ extern "C" {
|
||||||
#define PWR_SRAM3_FULL_RUN_RETENTION PWR_SRAM3_FULL_RUN
|
#define PWR_SRAM3_FULL_RUN_RETENTION PWR_SRAM3_FULL_RUN
|
||||||
#define PWR_SRAM4_FULL_RUN_RETENTION PWR_SRAM4_FULL_RUN
|
#define PWR_SRAM4_FULL_RUN_RETENTION PWR_SRAM4_FULL_RUN
|
||||||
#define PWR_SRAM5_FULL_RUN_RETENTION PWR_SRAM5_FULL_RUN
|
#define PWR_SRAM5_FULL_RUN_RETENTION PWR_SRAM5_FULL_RUN
|
||||||
|
#define PWR_SRAM6_FULL_RUN_RETENTION PWR_SRAM6_FULL_RUN
|
||||||
|
|
||||||
#define PWR_ALL_RAM_RUN_RETENTION_MASK PWR_ALL_RAM_RUN_MASK
|
#define PWR_ALL_RAM_RUN_RETENTION_MASK PWR_ALL_RAM_RUN_MASK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup HAL_RTC_Aliased_Functions HAL RTC Aliased Functions maintained for legacy purpose
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#if defined(STM32H5) || defined(STM32WBA) || defined(STM32H7RS)
|
||||||
|
#define HAL_RTCEx_SetBoothardwareKey HAL_RTCEx_LockBootHardwareKey
|
||||||
|
#define HAL_RTCEx_BKUPBlock_Enable HAL_RTCEx_BKUPBlock
|
||||||
|
#define HAL_RTCEx_BKUPBlock_Disable HAL_RTCEx_BKUPUnblock
|
||||||
|
#define HAL_RTCEx_Erase_SecretDev_Conf HAL_RTCEx_ConfigEraseDeviceSecrets
|
||||||
|
#endif /* STM32H5 || STM32WBA || STM32H7RS */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -1819,7 +2035,8 @@ extern "C" {
|
||||||
#define HAL_TIM_DMAError TIM_DMAError
|
#define HAL_TIM_DMAError TIM_DMAError
|
||||||
#define HAL_TIM_DMACaptureCplt TIM_DMACaptureCplt
|
#define HAL_TIM_DMACaptureCplt TIM_DMACaptureCplt
|
||||||
#define HAL_TIMEx_DMACommutationCplt TIMEx_DMACommutationCplt
|
#define HAL_TIMEx_DMACommutationCplt TIMEx_DMACommutationCplt
|
||||||
#if defined(STM32H7) || defined(STM32G0) || defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || defined(STM32L4)
|
#if defined(STM32H7) || defined(STM32G0) || defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || \
|
||||||
|
defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || defined(STM32L4)
|
||||||
#define HAL_TIM_SlaveConfigSynchronization HAL_TIM_SlaveConfigSynchro
|
#define HAL_TIM_SlaveConfigSynchronization HAL_TIM_SlaveConfigSynchro
|
||||||
#define HAL_TIM_SlaveConfigSynchronization_IT HAL_TIM_SlaveConfigSynchro_IT
|
#define HAL_TIM_SlaveConfigSynchronization_IT HAL_TIM_SlaveConfigSynchro_IT
|
||||||
#define HAL_TIMEx_CommutationCallback HAL_TIMEx_CommutCallback
|
#define HAL_TIMEx_CommutationCallback HAL_TIMEx_CommutCallback
|
||||||
|
|
@ -2076,7 +2293,8 @@ extern "C" {
|
||||||
#define COMP_STOP __HAL_COMP_DISABLE
|
#define COMP_STOP __HAL_COMP_DISABLE
|
||||||
#define COMP_LOCK __HAL_COMP_LOCK
|
#define COMP_LOCK __HAL_COMP_LOCK
|
||||||
|
|
||||||
#if defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx) || defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx)
|
#if defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx) || defined(STM32F303x8) || \
|
||||||
|
defined(STM32F334x8) || defined(STM32F328xx)
|
||||||
#define __HAL_COMP_EXTI_RISING_IT_ENABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_ENABLE_RISING_EDGE() : \
|
#define __HAL_COMP_EXTI_RISING_IT_ENABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_ENABLE_RISING_EDGE() : \
|
||||||
((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_ENABLE_RISING_EDGE() : \
|
((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_ENABLE_RISING_EDGE() : \
|
||||||
__HAL_COMP_COMP6_EXTI_ENABLE_RISING_EDGE())
|
__HAL_COMP_COMP6_EXTI_ENABLE_RISING_EDGE())
|
||||||
|
|
@ -2248,8 +2466,10 @@ extern "C" {
|
||||||
/** @defgroup HAL_COMP_Aliased_Functions HAL COMP Aliased Functions maintained for legacy purpose
|
/** @defgroup HAL_COMP_Aliased_Functions HAL COMP Aliased Functions maintained for legacy purpose
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define HAL_COMP_Start_IT HAL_COMP_Start /* Function considered as legacy as EXTI event or IT configuration is done into HAL_COMP_Init() */
|
#define HAL_COMP_Start_IT HAL_COMP_Start /* Function considered as legacy as EXTI event or IT configuration is
|
||||||
#define HAL_COMP_Stop_IT HAL_COMP_Stop /* Function considered as legacy as EXTI event or IT configuration is done into HAL_COMP_Init() */
|
done into HAL_COMP_Init() */
|
||||||
|
#define HAL_COMP_Stop_IT HAL_COMP_Stop /* Function considered as legacy as EXTI event or IT configuration is
|
||||||
|
done into HAL_COMP_Init() */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -2408,7 +2628,9 @@ extern "C" {
|
||||||
#define __HAL_PWR_INTERNALWAKEUP_ENABLE HAL_PWREx_EnableInternalWakeUpLine
|
#define __HAL_PWR_INTERNALWAKEUP_ENABLE HAL_PWREx_EnableInternalWakeUpLine
|
||||||
#define __HAL_PWR_PULL_UP_DOWN_CONFIG_DISABLE HAL_PWREx_DisablePullUpPullDownConfig
|
#define __HAL_PWR_PULL_UP_DOWN_CONFIG_DISABLE HAL_PWREx_DisablePullUpPullDownConfig
|
||||||
#define __HAL_PWR_PULL_UP_DOWN_CONFIG_ENABLE HAL_PWREx_EnablePullUpPullDownConfig
|
#define __HAL_PWR_PULL_UP_DOWN_CONFIG_ENABLE HAL_PWREx_EnablePullUpPullDownConfig
|
||||||
#define __HAL_PWR_PVD_EXTI_CLEAR_EGDE_TRIGGER() do { __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE();__HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE(); } while(0)
|
#define __HAL_PWR_PVD_EXTI_CLEAR_EGDE_TRIGGER() do { __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE(); \
|
||||||
|
__HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE(); \
|
||||||
|
} while(0)
|
||||||
#define __HAL_PWR_PVD_EXTI_EVENT_DISABLE __HAL_PWR_PVD_EXTI_DISABLE_EVENT
|
#define __HAL_PWR_PVD_EXTI_EVENT_DISABLE __HAL_PWR_PVD_EXTI_DISABLE_EVENT
|
||||||
#define __HAL_PWR_PVD_EXTI_EVENT_ENABLE __HAL_PWR_PVD_EXTI_ENABLE_EVENT
|
#define __HAL_PWR_PVD_EXTI_EVENT_ENABLE __HAL_PWR_PVD_EXTI_ENABLE_EVENT
|
||||||
#define __HAL_PWR_PVD_EXTI_FALLINGTRIGGER_DISABLE __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE
|
#define __HAL_PWR_PVD_EXTI_FALLINGTRIGGER_DISABLE __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE
|
||||||
|
|
@ -2417,8 +2639,12 @@ extern "C" {
|
||||||
#define __HAL_PWR_PVD_EXTI_RISINGTRIGGER_ENABLE __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE
|
#define __HAL_PWR_PVD_EXTI_RISINGTRIGGER_ENABLE __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE
|
||||||
#define __HAL_PWR_PVD_EXTI_SET_FALLING_EGDE_TRIGGER __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE
|
#define __HAL_PWR_PVD_EXTI_SET_FALLING_EGDE_TRIGGER __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE
|
||||||
#define __HAL_PWR_PVD_EXTI_SET_RISING_EDGE_TRIGGER __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE
|
#define __HAL_PWR_PVD_EXTI_SET_RISING_EDGE_TRIGGER __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE
|
||||||
#define __HAL_PWR_PVM_DISABLE() do { HAL_PWREx_DisablePVM1();HAL_PWREx_DisablePVM2();HAL_PWREx_DisablePVM3();HAL_PWREx_DisablePVM4(); } while(0)
|
#define __HAL_PWR_PVM_DISABLE() do { HAL_PWREx_DisablePVM1();HAL_PWREx_DisablePVM2(); \
|
||||||
#define __HAL_PWR_PVM_ENABLE() do { HAL_PWREx_EnablePVM1();HAL_PWREx_EnablePVM2();HAL_PWREx_EnablePVM3();HAL_PWREx_EnablePVM4(); } while(0)
|
HAL_PWREx_DisablePVM3();HAL_PWREx_DisablePVM4(); \
|
||||||
|
} while(0)
|
||||||
|
#define __HAL_PWR_PVM_ENABLE() do { HAL_PWREx_EnablePVM1();HAL_PWREx_EnablePVM2(); \
|
||||||
|
HAL_PWREx_EnablePVM3();HAL_PWREx_EnablePVM4(); \
|
||||||
|
} while(0)
|
||||||
#define __HAL_PWR_SRAM2CONTENT_PRESERVE_DISABLE HAL_PWREx_DisableSRAM2ContentRetention
|
#define __HAL_PWR_SRAM2CONTENT_PRESERVE_DISABLE HAL_PWREx_DisableSRAM2ContentRetention
|
||||||
#define __HAL_PWR_SRAM2CONTENT_PRESERVE_ENABLE HAL_PWREx_EnableSRAM2ContentRetention
|
#define __HAL_PWR_SRAM2CONTENT_PRESERVE_ENABLE HAL_PWREx_EnableSRAM2ContentRetention
|
||||||
#define __HAL_PWR_VDDIO2_DISABLE HAL_PWREx_DisableVddIO2
|
#define __HAL_PWR_VDDIO2_DISABLE HAL_PWREx_DisableVddIO2
|
||||||
|
|
@ -2454,8 +2680,8 @@ extern "C" {
|
||||||
#define RCC_StopWakeUpClock_HSI RCC_STOP_WAKEUPCLOCK_HSI
|
#define RCC_StopWakeUpClock_HSI RCC_STOP_WAKEUPCLOCK_HSI
|
||||||
|
|
||||||
#define HAL_RCC_CCSCallback HAL_RCC_CSSCallback
|
#define HAL_RCC_CCSCallback HAL_RCC_CSSCallback
|
||||||
#define HAL_RC48_EnableBuffer_Cmd(cmd) (((cmd\
|
#define HAL_RC48_EnableBuffer_Cmd(cmd) (((cmd)==ENABLE) ? \
|
||||||
)==ENABLE) ? HAL_RCCEx_EnableHSI48_VREFINT() : HAL_RCCEx_DisableHSI48_VREFINT())
|
HAL_RCCEx_EnableHSI48_VREFINT() : HAL_RCCEx_DisableHSI48_VREFINT())
|
||||||
|
|
||||||
#define __ADC_CLK_DISABLE __HAL_RCC_ADC_CLK_DISABLE
|
#define __ADC_CLK_DISABLE __HAL_RCC_ADC_CLK_DISABLE
|
||||||
#define __ADC_CLK_ENABLE __HAL_RCC_ADC_CLK_ENABLE
|
#define __ADC_CLK_ENABLE __HAL_RCC_ADC_CLK_ENABLE
|
||||||
|
|
@ -2505,6 +2731,12 @@ extern "C" {
|
||||||
#define __APB1_RELEASE_RESET __HAL_RCC_APB1_RELEASE_RESET
|
#define __APB1_RELEASE_RESET __HAL_RCC_APB1_RELEASE_RESET
|
||||||
#define __APB2_FORCE_RESET __HAL_RCC_APB2_FORCE_RESET
|
#define __APB2_FORCE_RESET __HAL_RCC_APB2_FORCE_RESET
|
||||||
#define __APB2_RELEASE_RESET __HAL_RCC_APB2_RELEASE_RESET
|
#define __APB2_RELEASE_RESET __HAL_RCC_APB2_RELEASE_RESET
|
||||||
|
#if defined(STM32C0)
|
||||||
|
#define __HAL_RCC_APB1_FORCE_RESET __HAL_RCC_APB1_GRP1_FORCE_RESET
|
||||||
|
#define __HAL_RCC_APB1_RELEASE_RESET __HAL_RCC_APB1_GRP1_RELEASE_RESET
|
||||||
|
#define __HAL_RCC_APB2_FORCE_RESET __HAL_RCC_APB1_GRP2_FORCE_RESET
|
||||||
|
#define __HAL_RCC_APB2_RELEASE_RESET __HAL_RCC_APB1_GRP2_RELEASE_RESET
|
||||||
|
#endif /* STM32C0 */
|
||||||
#define __BKP_CLK_DISABLE __HAL_RCC_BKP_CLK_DISABLE
|
#define __BKP_CLK_DISABLE __HAL_RCC_BKP_CLK_DISABLE
|
||||||
#define __BKP_CLK_ENABLE __HAL_RCC_BKP_CLK_ENABLE
|
#define __BKP_CLK_ENABLE __HAL_RCC_BKP_CLK_ENABLE
|
||||||
#define __BKP_FORCE_RESET __HAL_RCC_BKP_FORCE_RESET
|
#define __BKP_FORCE_RESET __HAL_RCC_BKP_FORCE_RESET
|
||||||
|
|
@ -2959,6 +3191,11 @@ extern "C" {
|
||||||
|
|
||||||
#define __HAL_RCC_WWDG_IS_CLK_ENABLED __HAL_RCC_WWDG1_IS_CLK_ENABLED
|
#define __HAL_RCC_WWDG_IS_CLK_ENABLED __HAL_RCC_WWDG1_IS_CLK_ENABLED
|
||||||
#define __HAL_RCC_WWDG_IS_CLK_DISABLED __HAL_RCC_WWDG1_IS_CLK_DISABLED
|
#define __HAL_RCC_WWDG_IS_CLK_DISABLED __HAL_RCC_WWDG1_IS_CLK_DISABLED
|
||||||
|
#define RCC_SPI4CLKSOURCE_D2PCLK1 RCC_SPI4CLKSOURCE_D2PCLK2
|
||||||
|
#define RCC_SPI5CLKSOURCE_D2PCLK1 RCC_SPI5CLKSOURCE_D2PCLK2
|
||||||
|
#define RCC_SPI45CLKSOURCE_D2PCLK1 RCC_SPI45CLKSOURCE_D2PCLK2
|
||||||
|
#define RCC_SPI45CLKSOURCE_CDPCLK1 RCC_SPI45CLKSOURCE_CDPCLK2
|
||||||
|
#define RCC_SPI45CLKSOURCE_PCLK1 RCC_SPI45CLKSOURCE_PCLK2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define __WWDG_CLK_DISABLE __HAL_RCC_WWDG_CLK_DISABLE
|
#define __WWDG_CLK_DISABLE __HAL_RCC_WWDG_CLK_DISABLE
|
||||||
|
|
@ -3423,7 +3660,12 @@ 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) || defined(STM32C0)
|
#if defined(STM32U0)
|
||||||
|
#define RCC_SYSCLKSOURCE_STATUS_PLLR RCC_SYSCLKSOURCE_STATUS_PLLCLK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(STM32L4) || defined(STM32WB) || defined(STM32G0) || defined(STM32G4) || defined(STM32L5) || \
|
||||||
|
defined(STM32WL) || defined(STM32C0) || defined(STM32H7RS) || defined(STM32U0)
|
||||||
#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
|
||||||
|
|
@ -3525,8 +3767,10 @@ extern "C" {
|
||||||
#define __HAL_RCC_GET_DFSDM_SOURCE __HAL_RCC_GET_DFSDM1_SOURCE
|
#define __HAL_RCC_GET_DFSDM_SOURCE __HAL_RCC_GET_DFSDM1_SOURCE
|
||||||
#define RCC_DFSDM1CLKSOURCE_PCLK RCC_DFSDM1CLKSOURCE_PCLK2
|
#define RCC_DFSDM1CLKSOURCE_PCLK RCC_DFSDM1CLKSOURCE_PCLK2
|
||||||
#define RCC_SWPMI1CLKSOURCE_PCLK RCC_SWPMI1CLKSOURCE_PCLK1
|
#define RCC_SWPMI1CLKSOURCE_PCLK RCC_SWPMI1CLKSOURCE_PCLK1
|
||||||
|
#if !defined(STM32U0)
|
||||||
#define RCC_LPTIM1CLKSOURCE_PCLK RCC_LPTIM1CLKSOURCE_PCLK1
|
#define RCC_LPTIM1CLKSOURCE_PCLK RCC_LPTIM1CLKSOURCE_PCLK1
|
||||||
#define RCC_LPTIM2CLKSOURCE_PCLK RCC_LPTIM2CLKSOURCE_PCLK1
|
#define RCC_LPTIM2CLKSOURCE_PCLK RCC_LPTIM2CLKSOURCE_PCLK1
|
||||||
|
#endif
|
||||||
|
|
||||||
#define RCC_DFSDM1AUDIOCLKSOURCE_I2SAPB1 RCC_DFSDM1AUDIOCLKSOURCE_I2S1
|
#define RCC_DFSDM1AUDIOCLKSOURCE_I2SAPB1 RCC_DFSDM1AUDIOCLKSOURCE_I2S1
|
||||||
#define RCC_DFSDM1AUDIOCLKSOURCE_I2SAPB2 RCC_DFSDM1AUDIOCLKSOURCE_I2S2
|
#define RCC_DFSDM1AUDIOCLKSOURCE_I2SAPB2 RCC_DFSDM1AUDIOCLKSOURCE_I2S2
|
||||||
|
|
@ -3568,6 +3812,92 @@ extern "C" {
|
||||||
#define IS_RCC_PLLFRACN_VALUE IS_RCC_PLL_FRACN_VALUE
|
#define IS_RCC_PLLFRACN_VALUE IS_RCC_PLL_FRACN_VALUE
|
||||||
#endif /* STM32U5 */
|
#endif /* STM32U5 */
|
||||||
|
|
||||||
|
#if defined(STM32H5)
|
||||||
|
#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
|
||||||
|
|
||||||
|
#define RCC_PLLSOURCE_NONE RCC_PLL1_SOURCE_NONE
|
||||||
|
#define RCC_PLLSOURCE_HSI RCC_PLL1_SOURCE_HSI
|
||||||
|
#define RCC_PLLSOURCE_CSI RCC_PLL1_SOURCE_CSI
|
||||||
|
#define RCC_PLLSOURCE_HSE RCC_PLL1_SOURCE_HSE
|
||||||
|
#define RCC_PLLVCIRANGE_0 RCC_PLL1_VCIRANGE_0
|
||||||
|
#define RCC_PLLVCIRANGE_1 RCC_PLL1_VCIRANGE_1
|
||||||
|
#define RCC_PLLVCIRANGE_2 RCC_PLL1_VCIRANGE_2
|
||||||
|
#define RCC_PLLVCIRANGE_3 RCC_PLL1_VCIRANGE_3
|
||||||
|
#define RCC_PLL1VCOWIDE RCC_PLL1_VCORANGE_WIDE
|
||||||
|
#define RCC_PLL1VCOMEDIUM RCC_PLL1_VCORANGE_MEDIUM
|
||||||
|
|
||||||
|
#define IS_RCC_PLLSOURCE IS_RCC_PLL1_SOURCE
|
||||||
|
#define IS_RCC_PLLRGE_VALUE IS_RCC_PLL1_VCIRGE_VALUE
|
||||||
|
#define IS_RCC_PLLVCORGE_VALUE IS_RCC_PLL1_VCORGE_VALUE
|
||||||
|
#define IS_RCC_PLLCLOCKOUT_VALUE IS_RCC_PLL1_CLOCKOUT_VALUE
|
||||||
|
#define IS_RCC_PLL_FRACN_VALUE IS_RCC_PLL1_FRACN_VALUE
|
||||||
|
#define IS_RCC_PLLM_VALUE IS_RCC_PLL1_DIVM_VALUE
|
||||||
|
#define IS_RCC_PLLN_VALUE IS_RCC_PLL1_MULN_VALUE
|
||||||
|
#define IS_RCC_PLLP_VALUE IS_RCC_PLL1_DIVP_VALUE
|
||||||
|
#define IS_RCC_PLLQ_VALUE IS_RCC_PLL1_DIVQ_VALUE
|
||||||
|
#define IS_RCC_PLLR_VALUE IS_RCC_PLL1_DIVR_VALUE
|
||||||
|
|
||||||
|
#define __HAL_RCC_PLL_ENABLE __HAL_RCC_PLL1_ENABLE
|
||||||
|
#define __HAL_RCC_PLL_DISABLE __HAL_RCC_PLL1_DISABLE
|
||||||
|
#define __HAL_RCC_PLL_FRACN_ENABLE __HAL_RCC_PLL1_FRACN_ENABLE
|
||||||
|
#define __HAL_RCC_PLL_FRACN_DISABLE __HAL_RCC_PLL1_FRACN_DISABLE
|
||||||
|
#define __HAL_RCC_PLL_CONFIG __HAL_RCC_PLL1_CONFIG
|
||||||
|
#define __HAL_RCC_PLL_PLLSOURCE_CONFIG __HAL_RCC_PLL1_PLLSOURCE_CONFIG
|
||||||
|
#define __HAL_RCC_PLL_DIVM_CONFIG __HAL_RCC_PLL1_DIVM_CONFIG
|
||||||
|
#define __HAL_RCC_PLL_FRACN_CONFIG __HAL_RCC_PLL1_FRACN_CONFIG
|
||||||
|
#define __HAL_RCC_PLL_VCIRANGE __HAL_RCC_PLL1_VCIRANGE
|
||||||
|
#define __HAL_RCC_PLL_VCORANGE __HAL_RCC_PLL1_VCORANGE
|
||||||
|
#define __HAL_RCC_GET_PLL_OSCSOURCE __HAL_RCC_GET_PLL1_OSCSOURCE
|
||||||
|
#define __HAL_RCC_PLLCLKOUT_ENABLE __HAL_RCC_PLL1_CLKOUT_ENABLE
|
||||||
|
#define __HAL_RCC_PLLCLKOUT_DISABLE __HAL_RCC_PLL1_CLKOUT_DISABLE
|
||||||
|
#define __HAL_RCC_GET_PLLCLKOUT_CONFIG __HAL_RCC_GET_PLL1_CLKOUT_CONFIG
|
||||||
|
|
||||||
|
#define __HAL_RCC_PLL2FRACN_ENABLE __HAL_RCC_PLL2_FRACN_ENABLE
|
||||||
|
#define __HAL_RCC_PLL2FRACN_DISABLE __HAL_RCC_PLL2_FRACN_DISABLE
|
||||||
|
#define __HAL_RCC_PLL2CLKOUT_ENABLE __HAL_RCC_PLL2_CLKOUT_ENABLE
|
||||||
|
#define __HAL_RCC_PLL2CLKOUT_DISABLE __HAL_RCC_PLL2_CLKOUT_DISABLE
|
||||||
|
#define __HAL_RCC_PLL2FRACN_CONFIG __HAL_RCC_PLL2_FRACN_CONFIG
|
||||||
|
#define __HAL_RCC_GET_PLL2CLKOUT_CONFIG __HAL_RCC_GET_PLL2_CLKOUT_CONFIG
|
||||||
|
|
||||||
|
#define __HAL_RCC_PLL3FRACN_ENABLE __HAL_RCC_PLL3_FRACN_ENABLE
|
||||||
|
#define __HAL_RCC_PLL3FRACN_DISABLE __HAL_RCC_PLL3_FRACN_DISABLE
|
||||||
|
#define __HAL_RCC_PLL3CLKOUT_ENABLE __HAL_RCC_PLL3_CLKOUT_ENABLE
|
||||||
|
#define __HAL_RCC_PLL3CLKOUT_DISABLE __HAL_RCC_PLL3_CLKOUT_DISABLE
|
||||||
|
#define __HAL_RCC_PLL3FRACN_CONFIG __HAL_RCC_PLL3_FRACN_CONFIG
|
||||||
|
#define __HAL_RCC_GET_PLL3CLKOUT_CONFIG __HAL_RCC_GET_PLL3_CLKOUT_CONFIG
|
||||||
|
|
||||||
|
#define RCC_PLL2VCIRANGE_0 RCC_PLL2_VCIRANGE_0
|
||||||
|
#define RCC_PLL2VCIRANGE_1 RCC_PLL2_VCIRANGE_1
|
||||||
|
#define RCC_PLL2VCIRANGE_2 RCC_PLL2_VCIRANGE_2
|
||||||
|
#define RCC_PLL2VCIRANGE_3 RCC_PLL2_VCIRANGE_3
|
||||||
|
|
||||||
|
#define RCC_PLL2VCOWIDE RCC_PLL2_VCORANGE_WIDE
|
||||||
|
#define RCC_PLL2VCOMEDIUM RCC_PLL2_VCORANGE_MEDIUM
|
||||||
|
|
||||||
|
#define RCC_PLL2SOURCE_NONE RCC_PLL2_SOURCE_NONE
|
||||||
|
#define RCC_PLL2SOURCE_HSI RCC_PLL2_SOURCE_HSI
|
||||||
|
#define RCC_PLL2SOURCE_CSI RCC_PLL2_SOURCE_CSI
|
||||||
|
#define RCC_PLL2SOURCE_HSE RCC_PLL2_SOURCE_HSE
|
||||||
|
|
||||||
|
#define RCC_PLL3VCIRANGE_0 RCC_PLL3_VCIRANGE_0
|
||||||
|
#define RCC_PLL3VCIRANGE_1 RCC_PLL3_VCIRANGE_1
|
||||||
|
#define RCC_PLL3VCIRANGE_2 RCC_PLL3_VCIRANGE_2
|
||||||
|
#define RCC_PLL3VCIRANGE_3 RCC_PLL3_VCIRANGE_3
|
||||||
|
|
||||||
|
#define RCC_PLL3VCOWIDE RCC_PLL3_VCORANGE_WIDE
|
||||||
|
#define RCC_PLL3VCOMEDIUM RCC_PLL3_VCORANGE_MEDIUM
|
||||||
|
|
||||||
|
#define RCC_PLL3SOURCE_NONE RCC_PLL3_SOURCE_NONE
|
||||||
|
#define RCC_PLL3SOURCE_HSI RCC_PLL3_SOURCE_HSI
|
||||||
|
#define RCC_PLL3SOURCE_CSI RCC_PLL3_SOURCE_CSI
|
||||||
|
#define RCC_PLL3SOURCE_HSE RCC_PLL3_SOURCE_HSE
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* STM32H5 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -3584,9 +3914,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)|| \
|
#if defined (STM32G0) || defined (STM32L5) || defined (STM32L412xx) || defined (STM32L422xx) || \
|
||||||
defined (STM32L4Q5xx) || defined (STM32G4) || defined (STM32WL) || defined (STM32U5) || \
|
defined (STM32L4P5xx)|| defined (STM32L4Q5xx) || defined (STM32G4) || defined (STM32WL) || defined (STM32U5) || \
|
||||||
defined (STM32C0)
|
defined (STM32WBA) || defined (STM32H5) || defined (STM32C0) || defined (STM32H7RS) || defined (STM32U0)
|
||||||
#else
|
#else
|
||||||
#define __HAL_RTC_CLEAR_FLAG __HAL_RTC_EXTI_CLEAR_FLAG
|
#define __HAL_RTC_CLEAR_FLAG __HAL_RTC_EXTI_CLEAR_FLAG
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -3621,6 +3951,13 @@ extern "C" {
|
||||||
__HAL_RTC_TAMPER_TIMESTAMP_EXTI_GENERATE_SWIT()))
|
__HAL_RTC_TAMPER_TIMESTAMP_EXTI_GENERATE_SWIT()))
|
||||||
#endif /* STM32F1 */
|
#endif /* STM32F1 */
|
||||||
|
|
||||||
|
#if defined (STM32F0) || defined (STM32F2) || defined (STM32F3) || defined (STM32F4) || defined (STM32F7) || \
|
||||||
|
defined (STM32H7) || \
|
||||||
|
defined (STM32L0) || defined (STM32L1) || \
|
||||||
|
defined (STM32WB)
|
||||||
|
#define __HAL_RTC_TAMPER_GET_IT __HAL_RTC_TAMPER_GET_FLAG
|
||||||
|
#endif
|
||||||
|
|
||||||
#define IS_ALARM IS_RTC_ALARM
|
#define IS_ALARM IS_RTC_ALARM
|
||||||
#define IS_ALARM_MASK IS_RTC_ALARM_MASK
|
#define IS_ALARM_MASK IS_RTC_ALARM_MASK
|
||||||
#define IS_TAMPER IS_RTC_TAMPER
|
#define IS_TAMPER IS_RTC_TAMPER
|
||||||
|
|
@ -3639,6 +3976,11 @@ extern "C" {
|
||||||
#define __RTC_WRITEPROTECTION_ENABLE __HAL_RTC_WRITEPROTECTION_ENABLE
|
#define __RTC_WRITEPROTECTION_ENABLE __HAL_RTC_WRITEPROTECTION_ENABLE
|
||||||
#define __RTC_WRITEPROTECTION_DISABLE __HAL_RTC_WRITEPROTECTION_DISABLE
|
#define __RTC_WRITEPROTECTION_DISABLE __HAL_RTC_WRITEPROTECTION_DISABLE
|
||||||
|
|
||||||
|
#if defined (STM32H5)
|
||||||
|
#define __HAL_RCC_RTCAPB_CLK_ENABLE __HAL_RCC_RTC_CLK_ENABLE
|
||||||
|
#define __HAL_RCC_RTCAPB_CLK_DISABLE __HAL_RCC_RTC_CLK_DISABLE
|
||||||
|
#endif /* STM32H5 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -3897,6 +4239,9 @@ extern "C" {
|
||||||
#define __HAL_TIM_GetCompare __HAL_TIM_GET_COMPARE
|
#define __HAL_TIM_GetCompare __HAL_TIM_GET_COMPARE
|
||||||
|
|
||||||
#define TIM_BREAKINPUTSOURCE_DFSDM TIM_BREAKINPUTSOURCE_DFSDM1
|
#define TIM_BREAKINPUTSOURCE_DFSDM TIM_BREAKINPUTSOURCE_DFSDM1
|
||||||
|
|
||||||
|
#define TIM_OCMODE_ASSYMETRIC_PWM1 TIM_OCMODE_ASYMMETRIC_PWM1
|
||||||
|
#define TIM_OCMODE_ASSYMETRIC_PWM2 TIM_OCMODE_ASYMMETRIC_PWM2
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -284,8 +284,11 @@ void HAL_SYSTICK_Callback(void);
|
||||||
#if (__MPU_PRESENT == 1U)
|
#if (__MPU_PRESENT == 1U)
|
||||||
void HAL_MPU_Enable(uint32_t MPU_Control);
|
void HAL_MPU_Enable(uint32_t MPU_Control);
|
||||||
void HAL_MPU_Disable(void);
|
void HAL_MPU_Disable(void);
|
||||||
|
void HAL_MPU_EnableRegion(uint32_t RegionNumber);
|
||||||
|
void HAL_MPU_DisableRegion(uint32_t RegionNumber);
|
||||||
void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init);
|
void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init);
|
||||||
#endif /* __MPU_PRESENT */
|
#endif /* __MPU_PRESENT */
|
||||||
|
void HAL_CORTEX_ClearEvent(void);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,9 @@ typedef enum
|
||||||
|
|
||||||
/* Exported macro ------------------------------------------------------------*/
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#if !defined(UNUSED)
|
||||||
#define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */
|
#define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */
|
||||||
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#define HAL_MAX_DELAY 0xFFFFFFFFU
|
#define HAL_MAX_DELAY 0xFFFFFFFFU
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,747 @@
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f4xx_hal_mmc.h
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief Header file of MMC HAL module.
|
||||||
|
******************************************************************************
|
||||||
|
* @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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef STM32F4xx_HAL_MMC_H
|
||||||
|
#define STM32F4xx_HAL_MMC_H
|
||||||
|
|
||||||
|
#if defined(SDIO)
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f4xx_ll_sdmmc.h"
|
||||||
|
|
||||||
|
/** @addtogroup STM32F4xx_HAL_Driver
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup MMC
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Exported types ------------------------------------------------------------*/
|
||||||
|
/** @defgroup MMC_Exported_Types MMC Exported Types
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Types_Group1 MMC State enumeration structure
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
HAL_MMC_STATE_RESET = 0x00000000U, /*!< MMC not yet initialized or disabled */
|
||||||
|
HAL_MMC_STATE_READY = 0x00000001U, /*!< MMC initialized and ready for use */
|
||||||
|
HAL_MMC_STATE_TIMEOUT = 0x00000002U, /*!< MMC Timeout state */
|
||||||
|
HAL_MMC_STATE_BUSY = 0x00000003U, /*!< MMC process ongoing */
|
||||||
|
HAL_MMC_STATE_PROGRAMMING = 0x00000004U, /*!< MMC Programming State */
|
||||||
|
HAL_MMC_STATE_RECEIVING = 0x00000005U, /*!< MMC Receinving State */
|
||||||
|
HAL_MMC_STATE_TRANSFER = 0x00000006U, /*!< MMC Transfer State */
|
||||||
|
HAL_MMC_STATE_ERROR = 0x0000000FU /*!< MMC is in error state */
|
||||||
|
}HAL_MMC_StateTypeDef;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Types_Group2 MMC Card State enumeration structure
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef uint32_t HAL_MMC_CardStateTypeDef;
|
||||||
|
|
||||||
|
#define HAL_MMC_CARD_READY 0x00000001U /*!< Card state is ready */
|
||||||
|
#define HAL_MMC_CARD_IDENTIFICATION 0x00000002U /*!< Card is in identification state */
|
||||||
|
#define HAL_MMC_CARD_STANDBY 0x00000003U /*!< Card is in standby state */
|
||||||
|
#define HAL_MMC_CARD_TRANSFER 0x00000004U /*!< Card is in transfer state */
|
||||||
|
#define HAL_MMC_CARD_SENDING 0x00000005U /*!< Card is sending an operation */
|
||||||
|
#define HAL_MMC_CARD_RECEIVING 0x00000006U /*!< Card is receiving operation information */
|
||||||
|
#define HAL_MMC_CARD_PROGRAMMING 0x00000007U /*!< Card is in programming state */
|
||||||
|
#define HAL_MMC_CARD_DISCONNECTED 0x00000008U /*!< Card is disconnected */
|
||||||
|
#define HAL_MMC_CARD_ERROR 0x000000FFU /*!< Card response Error */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Types_Group3 MMC Handle Structure definition
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define MMC_InitTypeDef SDIO_InitTypeDef
|
||||||
|
#define MMC_TypeDef SDIO_TypeDef
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief MMC Card Information Structure definition
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint32_t CardType; /*!< Specifies the card Type */
|
||||||
|
|
||||||
|
uint32_t Class; /*!< Specifies the class of the card class */
|
||||||
|
|
||||||
|
uint32_t RelCardAdd; /*!< Specifies the Relative Card Address */
|
||||||
|
|
||||||
|
uint32_t BlockNbr; /*!< Specifies the Card Capacity in blocks */
|
||||||
|
|
||||||
|
uint32_t BlockSize; /*!< Specifies one block size in bytes */
|
||||||
|
|
||||||
|
uint32_t LogBlockNbr; /*!< Specifies the Card logical Capacity in blocks */
|
||||||
|
|
||||||
|
uint32_t LogBlockSize; /*!< Specifies logical block size in bytes */
|
||||||
|
|
||||||
|
}HAL_MMC_CardInfoTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief MMC handle Structure definition
|
||||||
|
*/
|
||||||
|
#if defined (USE_HAL_MMC_REGISTER_CALLBACKS) && (USE_HAL_MMC_REGISTER_CALLBACKS == 1U)
|
||||||
|
typedef struct __MMC_HandleTypeDef
|
||||||
|
#else
|
||||||
|
typedef struct
|
||||||
|
#endif /* USE_HAL_MMC_REGISTER_CALLBACKS */
|
||||||
|
{
|
||||||
|
MMC_TypeDef *Instance; /*!< MMC registers base address */
|
||||||
|
|
||||||
|
MMC_InitTypeDef Init; /*!< MMC required parameters */
|
||||||
|
|
||||||
|
HAL_LockTypeDef Lock; /*!< MMC locking object */
|
||||||
|
|
||||||
|
uint8_t *pTxBuffPtr; /*!< Pointer to MMC Tx transfer Buffer */
|
||||||
|
|
||||||
|
uint32_t TxXferSize; /*!< MMC Tx Transfer size */
|
||||||
|
|
||||||
|
uint8_t *pRxBuffPtr; /*!< Pointer to MMC Rx transfer Buffer */
|
||||||
|
|
||||||
|
uint32_t RxXferSize; /*!< MMC Rx Transfer size */
|
||||||
|
|
||||||
|
__IO uint32_t Context; /*!< MMC transfer context */
|
||||||
|
|
||||||
|
__IO HAL_MMC_StateTypeDef State; /*!< MMC card State */
|
||||||
|
|
||||||
|
__IO uint32_t ErrorCode; /*!< MMC Card Error codes */
|
||||||
|
|
||||||
|
DMA_HandleTypeDef *hdmarx; /*!< MMC Rx DMA handle parameters */
|
||||||
|
|
||||||
|
DMA_HandleTypeDef *hdmatx; /*!< MMC Tx DMA handle parameters */
|
||||||
|
|
||||||
|
HAL_MMC_CardInfoTypeDef MmcCard; /*!< MMC Card information */
|
||||||
|
|
||||||
|
uint32_t CSD[4U]; /*!< MMC card specific data table */
|
||||||
|
|
||||||
|
uint32_t CID[4U]; /*!< MMC card identification number table */
|
||||||
|
|
||||||
|
uint32_t Ext_CSD[128];
|
||||||
|
|
||||||
|
#if defined (USE_HAL_MMC_REGISTER_CALLBACKS) && (USE_HAL_MMC_REGISTER_CALLBACKS == 1U)
|
||||||
|
void (* TxCpltCallback) (struct __MMC_HandleTypeDef *hmmc);
|
||||||
|
void (* RxCpltCallback) (struct __MMC_HandleTypeDef *hmmc);
|
||||||
|
void (* ErrorCallback) (struct __MMC_HandleTypeDef *hmmc);
|
||||||
|
void (* AbortCpltCallback) (struct __MMC_HandleTypeDef *hmmc);
|
||||||
|
|
||||||
|
void (* MspInitCallback) (struct __MMC_HandleTypeDef *hmmc);
|
||||||
|
void (* MspDeInitCallback) (struct __MMC_HandleTypeDef *hmmc);
|
||||||
|
#endif
|
||||||
|
}MMC_HandleTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Types_Group4 Card Specific Data: CSD Register
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__IO uint8_t CSDStruct; /*!< CSD structure */
|
||||||
|
__IO uint8_t SysSpecVersion; /*!< System specification version */
|
||||||
|
__IO uint8_t Reserved1; /*!< Reserved */
|
||||||
|
__IO uint8_t TAAC; /*!< Data read access time 1 */
|
||||||
|
__IO uint8_t NSAC; /*!< Data read access time 2 in CLK cycles */
|
||||||
|
__IO uint8_t MaxBusClkFrec; /*!< Max. bus clock frequency */
|
||||||
|
__IO uint16_t CardComdClasses; /*!< Card command classes */
|
||||||
|
__IO uint8_t RdBlockLen; /*!< Max. read data block length */
|
||||||
|
__IO uint8_t PartBlockRead; /*!< Partial blocks for read allowed */
|
||||||
|
__IO uint8_t WrBlockMisalign; /*!< Write block misalignment */
|
||||||
|
__IO uint8_t RdBlockMisalign; /*!< Read block misalignment */
|
||||||
|
__IO uint8_t DSRImpl; /*!< DSR implemented */
|
||||||
|
__IO uint8_t Reserved2; /*!< Reserved */
|
||||||
|
__IO uint32_t DeviceSize; /*!< Device Size */
|
||||||
|
__IO uint8_t MaxRdCurrentVDDMin; /*!< Max. read current @ VDD min */
|
||||||
|
__IO uint8_t MaxRdCurrentVDDMax; /*!< Max. read current @ VDD max */
|
||||||
|
__IO uint8_t MaxWrCurrentVDDMin; /*!< Max. write current @ VDD min */
|
||||||
|
__IO uint8_t MaxWrCurrentVDDMax; /*!< Max. write current @ VDD max */
|
||||||
|
__IO uint8_t DeviceSizeMul; /*!< Device size multiplier */
|
||||||
|
__IO uint8_t EraseGrSize; /*!< Erase group size */
|
||||||
|
__IO uint8_t EraseGrMul; /*!< Erase group size multiplier */
|
||||||
|
__IO uint8_t WrProtectGrSize; /*!< Write protect group size */
|
||||||
|
__IO uint8_t WrProtectGrEnable; /*!< Write protect group enable */
|
||||||
|
__IO uint8_t ManDeflECC; /*!< Manufacturer default ECC */
|
||||||
|
__IO uint8_t WrSpeedFact; /*!< Write speed factor */
|
||||||
|
__IO uint8_t MaxWrBlockLen; /*!< Max. write data block length */
|
||||||
|
__IO uint8_t WriteBlockPaPartial; /*!< Partial blocks for write allowed */
|
||||||
|
__IO uint8_t Reserved3; /*!< Reserved */
|
||||||
|
__IO uint8_t ContentProtectAppli; /*!< Content protection application */
|
||||||
|
__IO uint8_t FileFormatGroup; /*!< File format group */
|
||||||
|
__IO uint8_t CopyFlag; /*!< Copy flag (OTP) */
|
||||||
|
__IO uint8_t PermWrProtect; /*!< Permanent write protection */
|
||||||
|
__IO uint8_t TempWrProtect; /*!< Temporary write protection */
|
||||||
|
__IO uint8_t FileFormat; /*!< File format */
|
||||||
|
__IO uint8_t ECC; /*!< ECC code */
|
||||||
|
__IO uint8_t CSD_CRC; /*!< CSD CRC */
|
||||||
|
__IO uint8_t Reserved4; /*!< Always 1 */
|
||||||
|
|
||||||
|
}HAL_MMC_CardCSDTypeDef;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Types_Group5 Card Identification Data: CID Register
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__IO uint8_t ManufacturerID; /*!< Manufacturer ID */
|
||||||
|
__IO uint16_t OEM_AppliID; /*!< OEM/Application ID */
|
||||||
|
__IO uint32_t ProdName1; /*!< Product Name part1 */
|
||||||
|
__IO uint8_t ProdName2; /*!< Product Name part2 */
|
||||||
|
__IO uint8_t ProdRev; /*!< Product Revision */
|
||||||
|
__IO uint32_t ProdSN; /*!< Product Serial Number */
|
||||||
|
__IO uint8_t Reserved1; /*!< Reserved1 */
|
||||||
|
__IO uint16_t ManufactDate; /*!< Manufacturing Date */
|
||||||
|
__IO uint8_t CID_CRC; /*!< CID CRC */
|
||||||
|
__IO uint8_t Reserved2; /*!< Always 1 */
|
||||||
|
|
||||||
|
}HAL_MMC_CardCIDTypeDef;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined (USE_HAL_MMC_REGISTER_CALLBACKS) && (USE_HAL_MMC_REGISTER_CALLBACKS == 1U)
|
||||||
|
/** @defgroup MMC_Exported_Types_Group6 MMC Callback ID enumeration definition
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
HAL_MMC_TX_CPLT_CB_ID = 0x00U, /*!< MMC Tx Complete Callback ID */
|
||||||
|
HAL_MMC_RX_CPLT_CB_ID = 0x01U, /*!< MMC Rx Complete Callback ID */
|
||||||
|
HAL_MMC_ERROR_CB_ID = 0x02U, /*!< MMC Error Callback ID */
|
||||||
|
HAL_MMC_ABORT_CB_ID = 0x03U, /*!< MMC Abort Callback ID */
|
||||||
|
|
||||||
|
HAL_MMC_MSP_INIT_CB_ID = 0x10U, /*!< MMC MspInit Callback ID */
|
||||||
|
HAL_MMC_MSP_DEINIT_CB_ID = 0x11U /*!< MMC MspDeInit Callback ID */
|
||||||
|
}HAL_MMC_CallbackIDTypeDef;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Types_Group7 MMC Callback pointer definition
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef void (*pMMC_CallbackTypeDef) (MMC_HandleTypeDef *hmmc);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
#endif
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Exported constants --------------------------------------------------------*/
|
||||||
|
/** @defgroup MMC_Exported_Constants Exported Constants
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define MMC_BLOCKSIZE 512U /*!< Block size is 512 bytes */
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Constansts_Group1 MMC Error status enumeration Structure definition
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define HAL_MMC_ERROR_NONE SDMMC_ERROR_NONE /*!< No error */
|
||||||
|
#define HAL_MMC_ERROR_CMD_CRC_FAIL SDMMC_ERROR_CMD_CRC_FAIL /*!< Command response received (but CRC check failed) */
|
||||||
|
#define HAL_MMC_ERROR_DATA_CRC_FAIL SDMMC_ERROR_DATA_CRC_FAIL /*!< Data block sent/received (CRC check failed) */
|
||||||
|
#define HAL_MMC_ERROR_CMD_RSP_TIMEOUT SDMMC_ERROR_CMD_RSP_TIMEOUT /*!< Command response timeout */
|
||||||
|
#define HAL_MMC_ERROR_DATA_TIMEOUT SDMMC_ERROR_DATA_TIMEOUT /*!< Data timeout */
|
||||||
|
#define HAL_MMC_ERROR_TX_UNDERRUN SDMMC_ERROR_TX_UNDERRUN /*!< Transmit FIFO underrun */
|
||||||
|
#define HAL_MMC_ERROR_RX_OVERRUN SDMMC_ERROR_RX_OVERRUN /*!< Receive FIFO overrun */
|
||||||
|
#define HAL_MMC_ERROR_ADDR_MISALIGNED SDMMC_ERROR_ADDR_MISALIGNED /*!< Misaligned address */
|
||||||
|
#define HAL_MMC_ERROR_BLOCK_LEN_ERR SDMMC_ERROR_BLOCK_LEN_ERR /*!< Transferred block length is not allowed for the card or the
|
||||||
|
number of transferred bytes does not match the block length */
|
||||||
|
#define HAL_MMC_ERROR_ERASE_SEQ_ERR SDMMC_ERROR_ERASE_SEQ_ERR /*!< An error in the sequence of erase command occurs */
|
||||||
|
#define HAL_MMC_ERROR_BAD_ERASE_PARAM SDMMC_ERROR_BAD_ERASE_PARAM /*!< An invalid selection for erase groups */
|
||||||
|
#define HAL_MMC_ERROR_WRITE_PROT_VIOLATION SDMMC_ERROR_WRITE_PROT_VIOLATION /*!< Attempt to program a write protect block */
|
||||||
|
#define HAL_MMC_ERROR_LOCK_UNLOCK_FAILED SDMMC_ERROR_LOCK_UNLOCK_FAILED /*!< Sequence or password error has been detected in unlock
|
||||||
|
command or if there was an attempt to access a locked card */
|
||||||
|
#define HAL_MMC_ERROR_COM_CRC_FAILED SDMMC_ERROR_COM_CRC_FAILED /*!< CRC check of the previous command failed */
|
||||||
|
#define HAL_MMC_ERROR_ILLEGAL_CMD SDMMC_ERROR_ILLEGAL_CMD /*!< Command is not legal for the card state */
|
||||||
|
#define HAL_MMC_ERROR_CARD_ECC_FAILED SDMMC_ERROR_CARD_ECC_FAILED /*!< Card internal ECC was applied but failed to correct the data */
|
||||||
|
#define HAL_MMC_ERROR_CC_ERR SDMMC_ERROR_CC_ERR /*!< Internal card controller error */
|
||||||
|
#define HAL_MMC_ERROR_GENERAL_UNKNOWN_ERR SDMMC_ERROR_GENERAL_UNKNOWN_ERR /*!< General or unknown error */
|
||||||
|
#define HAL_MMC_ERROR_STREAM_READ_UNDERRUN SDMMC_ERROR_STREAM_READ_UNDERRUN /*!< The card could not sustain data reading in stream rmode */
|
||||||
|
#define HAL_MMC_ERROR_STREAM_WRITE_OVERRUN SDMMC_ERROR_STREAM_WRITE_OVERRUN /*!< The card could not sustain data programming in stream mode */
|
||||||
|
#define HAL_MMC_ERROR_CID_CSD_OVERWRITE SDMMC_ERROR_CID_CSD_OVERWRITE /*!< CID/CSD overwrite error */
|
||||||
|
#define HAL_MMC_ERROR_WP_ERASE_SKIP SDMMC_ERROR_WP_ERASE_SKIP /*!< Only partial address space was erased */
|
||||||
|
#define HAL_MMC_ERROR_CARD_ECC_DISABLED SDMMC_ERROR_CARD_ECC_DISABLED /*!< Command has been executed without using internal ECC */
|
||||||
|
#define HAL_MMC_ERROR_ERASE_RESET SDMMC_ERROR_ERASE_RESET /*!< Erase sequence was cleared before executing because an out
|
||||||
|
of erase sequence command was received */
|
||||||
|
#define HAL_MMC_ERROR_AKE_SEQ_ERR SDMMC_ERROR_AKE_SEQ_ERR /*!< Error in sequence of authentication */
|
||||||
|
#define HAL_MMC_ERROR_INVALID_VOLTRANGE SDMMC_ERROR_INVALID_VOLTRANGE /*!< Error in case of invalid voltage range */
|
||||||
|
#define HAL_MMC_ERROR_ADDR_OUT_OF_RANGE SDMMC_ERROR_ADDR_OUT_OF_RANGE /*!< Error when addressed block is out of range */
|
||||||
|
#define HAL_MMC_ERROR_REQUEST_NOT_APPLICABLE SDMMC_ERROR_REQUEST_NOT_APPLICABLE /*!< Error when command request is not applicable */
|
||||||
|
#define HAL_MMC_ERROR_PARAM SDMMC_ERROR_INVALID_PARAMETER /*!< the used parameter is not valid */
|
||||||
|
#define HAL_MMC_ERROR_UNSUPPORTED_FEATURE SDMMC_ERROR_UNSUPPORTED_FEATURE /*!< Error when feature is not insupported */
|
||||||
|
#define HAL_MMC_ERROR_BUSY SDMMC_ERROR_BUSY /*!< Error when transfer process is busy */
|
||||||
|
#define HAL_MMC_ERROR_DMA SDMMC_ERROR_DMA /*!< Error while DMA transfer */
|
||||||
|
#define HAL_MMC_ERROR_TIMEOUT SDMMC_ERROR_TIMEOUT /*!< Timeout error */
|
||||||
|
|
||||||
|
#if defined (USE_HAL_MMC_REGISTER_CALLBACKS) && (USE_HAL_MMC_REGISTER_CALLBACKS == 1U)
|
||||||
|
#define HAL_MMC_ERROR_INVALID_CALLBACK SDMMC_ERROR_INVALID_PARAMETER /*!< Invalid callback error */
|
||||||
|
#endif
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Constansts_Group2 MMC context enumeration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define MMC_CONTEXT_NONE 0x00000000U /*!< None */
|
||||||
|
#define MMC_CONTEXT_READ_SINGLE_BLOCK 0x00000001U /*!< Read single block operation */
|
||||||
|
#define MMC_CONTEXT_READ_MULTIPLE_BLOCK 0x00000002U /*!< Read multiple blocks operation */
|
||||||
|
#define MMC_CONTEXT_WRITE_SINGLE_BLOCK 0x00000010U /*!< Write single block operation */
|
||||||
|
#define MMC_CONTEXT_WRITE_MULTIPLE_BLOCK 0x00000020U /*!< Write multiple blocks operation */
|
||||||
|
#define MMC_CONTEXT_IT 0x00000008U /*!< Process in Interrupt mode */
|
||||||
|
#define MMC_CONTEXT_DMA 0x00000080U /*!< Process in DMA mode */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Constansts_Group3 MMC Voltage mode
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @brief
|
||||||
|
*/
|
||||||
|
#define MMC_HIGH_VOLTAGE_RANGE 0x80FF8000U /*!< High voltage in byte mode */
|
||||||
|
#define MMC_DUAL_VOLTAGE_RANGE 0x80FF8080U /*!< Dual voltage in byte mode */
|
||||||
|
#define MMC_LOW_VOLTAGE_RANGE 0x80000080U /*!< Low voltage in byte mode */
|
||||||
|
#define EMMC_HIGH_VOLTAGE_RANGE 0xC0FF8000U /*!< High voltage in sector mode */
|
||||||
|
#define EMMC_DUAL_VOLTAGE_RANGE 0xC0FF8080U /*!< Dual voltage in sector mode */
|
||||||
|
#define EMMC_LOW_VOLTAGE_RANGE 0xC0000080U /*!< Low voltage in sector mode */
|
||||||
|
#define MMC_INVALID_VOLTAGE_RANGE 0x0001FF01U
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Constansts_Group4 MMC Memory Cards
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define MMC_LOW_CAPACITY_CARD 0x00000000U /*!< MMC Card Capacity <=2Gbytes */
|
||||||
|
#define MMC_HIGH_CAPACITY_CARD 0x00000001U /*!< MMC Card Capacity >2Gbytes and <2Tbytes */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
|
/** @defgroup MMC_Exported_macros MMC Exported Macros
|
||||||
|
* @brief macros to handle interrupts and specific clock configurations
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/** @brief Reset MMC handle state.
|
||||||
|
* @param __HANDLE__ : MMC handle.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#if defined (USE_HAL_MMC_REGISTER_CALLBACKS) && (USE_HAL_MMC_REGISTER_CALLBACKS == 1U)
|
||||||
|
#define __HAL_MMC_RESET_HANDLE_STATE(__HANDLE__) do { \
|
||||||
|
(__HANDLE__)->State = HAL_MMC_STATE_RESET; \
|
||||||
|
(__HANDLE__)->MspInitCallback = NULL; \
|
||||||
|
(__HANDLE__)->MspDeInitCallback = NULL; \
|
||||||
|
} while(0)
|
||||||
|
#else
|
||||||
|
#define __HAL_MMC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_MMC_STATE_RESET)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enable the MMC device.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_MMC_ENABLE(__HANDLE__) __SDIO_ENABLE((__HANDLE__)->Instance)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disable the MMC device.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_MMC_DISABLE(__HANDLE__) __SDIO_DISABLE((__HANDLE__)->Instance)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enable the SDMMC DMA transfer.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_MMC_DMA_ENABLE(__HANDLE__) __SDIO_DMA_ENABLE((__HANDLE__)->Instance)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disable the SDMMC DMA transfer.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_MMC_DMA_DISABLE(__HANDLE__) __SDIO_DMA_DISABLE((__HANDLE__)->Instance)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enable the MMC device interrupt.
|
||||||
|
* @param __HANDLE__: MMC Handle
|
||||||
|
* @param __INTERRUPT__: specifies the SDMMC interrupt sources to be enabled.
|
||||||
|
* This parameter can be one or a combination of the following values:
|
||||||
|
* @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt
|
||||||
|
* @arg SDIO_IT_DTIMEOUT: Data timeout interrupt
|
||||||
|
* @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt
|
||||||
|
* @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt
|
||||||
|
* @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt
|
||||||
|
* @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt
|
||||||
|
* @arg SDIO_IT_DATAEND: Data end (data counter, DATACOUNT, is zero) interrupt
|
||||||
|
* @arg SDIO_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
|
||||||
|
* @arg SDIO_IT_CMDACT: Command transfer in progress interrupt
|
||||||
|
* @arg SDIO_IT_TXACT: Data transmit in progress interrupt
|
||||||
|
* @arg SDIO_IT_RXACT: Data receive in progress interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOHF: Receive FIFO Half Full interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOF: Transmit FIFO full interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOF: Receive FIFO full interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOE: Transmit FIFO empty interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOE: Receive FIFO empty interrupt
|
||||||
|
* @arg SDIO_IT_TXDAVL: Data available in transmit FIFO interrupt
|
||||||
|
* @arg SDIO_IT_RXDAVL: Data available in receive FIFO interrupt
|
||||||
|
* @arg SDIO_IT_SDIOIT: SD I/O interrupt received interrupt
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_MMC_ENABLE_IT(__HANDLE__, __INTERRUPT__) __SDIO_ENABLE_IT((__HANDLE__)->Instance, (__INTERRUPT__))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disable the MMC device interrupt.
|
||||||
|
* @param __HANDLE__: MMC Handle
|
||||||
|
* @param __INTERRUPT__: specifies the SDMMC interrupt sources to be disabled.
|
||||||
|
* This parameter can be one or a combination of the following values:
|
||||||
|
* @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt
|
||||||
|
* @arg SDIO_IT_DTIMEOUT: Data timeout interrupt
|
||||||
|
* @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt
|
||||||
|
* @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt
|
||||||
|
* @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt
|
||||||
|
* @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt
|
||||||
|
* @arg SDIO_IT_DATAEND: Data end (data counter, DATACOUNT, is zero) interrupt
|
||||||
|
* @arg SDIO_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
|
||||||
|
* @arg SDIO_IT_CMDACT: Command transfer in progress interrupt
|
||||||
|
* @arg SDIO_IT_TXACT: Data transmit in progress interrupt
|
||||||
|
* @arg SDIO_IT_RXACT: Data receive in progress interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOHF: Receive FIFO Half Full interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOF: Transmit FIFO full interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOF: Receive FIFO full interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOE: Transmit FIFO empty interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOE: Receive FIFO empty interrupt
|
||||||
|
* @arg SDIO_IT_TXDAVL: Data available in transmit FIFO interrupt
|
||||||
|
* @arg SDIO_IT_RXDAVL: Data available in receive FIFO interrupt
|
||||||
|
* @arg SDIO_IT_SDIOIT: SD I/O interrupt received interrupt
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_MMC_DISABLE_IT(__HANDLE__, __INTERRUPT__) __SDIO_DISABLE_IT((__HANDLE__)->Instance, (__INTERRUPT__))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Check whether the specified MMC flag is set or not.
|
||||||
|
* @param __HANDLE__: MMC Handle
|
||||||
|
* @param __FLAG__: specifies the flag to check.
|
||||||
|
* This parameter can be one of the following values:
|
||||||
|
* @arg SDIO_FLAG_CCRCFAIL: Command response received (CRC check failed)
|
||||||
|
* @arg SDIO_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)
|
||||||
|
* @arg SDIO_FLAG_CTIMEOUT: Command response timeout
|
||||||
|
* @arg SDIO_FLAG_DTIMEOUT: Data timeout
|
||||||
|
* @arg SDIO_FLAG_TXUNDERR: Transmit FIFO underrun error
|
||||||
|
* @arg SDIO_FLAG_RXOVERR: Received FIFO overrun error
|
||||||
|
* @arg SDIO_FLAG_CMDREND: Command response received (CRC check passed)
|
||||||
|
* @arg SDIO_FLAG_CMDSENT: Command sent (no response required)
|
||||||
|
* @arg SDIO_FLAG_DATAEND: Data end (data counter, DATACOUNT, is zero)
|
||||||
|
* @arg SDIO_FLAG_DBCKEND: Data block sent/received (CRC check passed)
|
||||||
|
* @arg SDIO_FLAG_CMDACT: Command transfer in progress
|
||||||
|
* @arg SDIO_FLAG_TXACT: Data transmit in progress
|
||||||
|
* @arg SDIO_FLAG_RXACT: Data receive in progress
|
||||||
|
* @arg SDIO_FLAG_TXFIFOHE: Transmit FIFO Half Empty
|
||||||
|
* @arg SDIO_FLAG_RXFIFOHF: Receive FIFO Half Full
|
||||||
|
* @arg SDIO_FLAG_TXFIFOF: Transmit FIFO full
|
||||||
|
* @arg SDIO_FLAG_RXFIFOF: Receive FIFO full
|
||||||
|
* @arg SDIO_FLAG_TXFIFOE: Transmit FIFO empty
|
||||||
|
* @arg SDIO_FLAG_RXFIFOE: Receive FIFO empty
|
||||||
|
* @arg SDIO_FLAG_TXDAVL: Data available in transmit FIFO
|
||||||
|
* @arg SDIO_FLAG_RXDAVL: Data available in receive FIFO
|
||||||
|
* @arg SDIO_FLAG_SDIOIT: SD I/O interrupt received
|
||||||
|
* @retval The new state of MMC FLAG (SET or RESET).
|
||||||
|
*/
|
||||||
|
#define __HAL_MMC_GET_FLAG(__HANDLE__, __FLAG__) __SDIO_GET_FLAG((__HANDLE__)->Instance, (__FLAG__))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Clear the MMC's pending flags.
|
||||||
|
* @param __HANDLE__: MMC Handle
|
||||||
|
* @param __FLAG__: specifies the flag to clear.
|
||||||
|
* This parameter can be one or a combination of the following values:
|
||||||
|
* @arg SDIO_FLAG_CCRCFAIL: Command response received (CRC check failed)
|
||||||
|
* @arg SDIO_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)
|
||||||
|
* @arg SDIO_FLAG_CTIMEOUT: Command response timeout
|
||||||
|
* @arg SDIO_FLAG_DTIMEOUT: Data timeout
|
||||||
|
* @arg SDIO_FLAG_TXUNDERR: Transmit FIFO underrun error
|
||||||
|
* @arg SDIO_FLAG_RXOVERR: Received FIFO overrun error
|
||||||
|
* @arg SDIO_FLAG_CMDREND: Command response received (CRC check passed)
|
||||||
|
* @arg SDIO_FLAG_CMDSENT: Command sent (no response required)
|
||||||
|
* @arg SDIO_FLAG_DATAEND: Data end (data counter, DATACOUNT, is zero)
|
||||||
|
* @arg SDIO_FLAG_DBCKEND: Data block sent/received (CRC check passed)
|
||||||
|
* @arg SDIO_FLAG_SDIOIT: SD I/O interrupt received
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_MMC_CLEAR_FLAG(__HANDLE__, __FLAG__) __SDIO_CLEAR_FLAG((__HANDLE__)->Instance, (__FLAG__))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Check whether the specified MMC interrupt has occurred or not.
|
||||||
|
* @param __HANDLE__: MMC Handle
|
||||||
|
* @param __INTERRUPT__: specifies the SDMMC interrupt source to check.
|
||||||
|
* This parameter can be one of the following values:
|
||||||
|
* @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt
|
||||||
|
* @arg SDIO_IT_DTIMEOUT: Data timeout interrupt
|
||||||
|
* @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt
|
||||||
|
* @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt
|
||||||
|
* @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt
|
||||||
|
* @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt
|
||||||
|
* @arg SDIO_IT_DATAEND: Data end (data counter, DATACOUNT, is zero) interrupt
|
||||||
|
* @arg SDIO_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
|
||||||
|
* @arg SDIO_IT_CMDACT: Command transfer in progress interrupt
|
||||||
|
* @arg SDIO_IT_TXACT: Data transmit in progress interrupt
|
||||||
|
* @arg SDIO_IT_RXACT: Data receive in progress interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOHF: Receive FIFO Half Full interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOF: Transmit FIFO full interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOF: Receive FIFO full interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOE: Transmit FIFO empty interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOE: Receive FIFO empty interrupt
|
||||||
|
* @arg SDIO_IT_TXDAVL: Data available in transmit FIFO interrupt
|
||||||
|
* @arg SDIO_IT_RXDAVL: Data available in receive FIFO interrupt
|
||||||
|
* @arg SDIO_IT_SDIOIT: SD I/O interrupt received interrupt
|
||||||
|
* @retval The new state of MMC IT (SET or RESET).
|
||||||
|
*/
|
||||||
|
#define __HAL_MMC_GET_IT(__HANDLE__, __INTERRUPT__) __SDIO_GET_IT((__HANDLE__)->Instance, (__INTERRUPT__))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Clear the MMC's interrupt pending bits.
|
||||||
|
* @param __HANDLE__: MMC Handle
|
||||||
|
* @param __INTERRUPT__: specifies the interrupt pending bit to clear.
|
||||||
|
* This parameter can be one or a combination of the following values:
|
||||||
|
* @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt
|
||||||
|
* @arg SDIO_IT_DTIMEOUT: Data timeout interrupt
|
||||||
|
* @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt
|
||||||
|
* @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt
|
||||||
|
* @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt
|
||||||
|
* @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt
|
||||||
|
* @arg SDIO_IT_DATAEND: Data end (data counter, DATACOUNT, is zero) interrupt
|
||||||
|
* @arg SDIO_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOHF: Receive FIFO Half Full interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOF: Receive FIFO full interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOE: Transmit FIFO empty interrupt
|
||||||
|
* @arg SDIO_IT_SDIOIT: SD I/O interrupt received interrupt
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_MMC_CLEAR_IT(__HANDLE__, __INTERRUPT__) __SDIO_CLEAR_IT((__HANDLE__)->Instance, (__INTERRUPT__))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Exported functions --------------------------------------------------------*/
|
||||||
|
/** @defgroup MMC_Exported_Functions MMC Exported Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Functions_Group1 Initialization and de-initialization functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
HAL_StatusTypeDef HAL_MMC_Init(MMC_HandleTypeDef *hmmc);
|
||||||
|
HAL_StatusTypeDef HAL_MMC_InitCard(MMC_HandleTypeDef *hmmc);
|
||||||
|
HAL_StatusTypeDef HAL_MMC_DeInit (MMC_HandleTypeDef *hmmc);
|
||||||
|
void HAL_MMC_MspInit(MMC_HandleTypeDef *hmmc);
|
||||||
|
void HAL_MMC_MspDeInit(MMC_HandleTypeDef *hmmc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Functions_Group2 Input and Output operation functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* Blocking mode: Polling */
|
||||||
|
HAL_StatusTypeDef HAL_MMC_ReadBlocks(MMC_HandleTypeDef *hmmc, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks, uint32_t Timeout);
|
||||||
|
HAL_StatusTypeDef HAL_MMC_WriteBlocks(MMC_HandleTypeDef *hmmc, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks, uint32_t Timeout);
|
||||||
|
HAL_StatusTypeDef HAL_MMC_Erase(MMC_HandleTypeDef *hmmc, uint32_t BlockStartAdd, uint32_t BlockEndAdd);
|
||||||
|
/* Non-Blocking mode: IT */
|
||||||
|
HAL_StatusTypeDef HAL_MMC_ReadBlocks_IT(MMC_HandleTypeDef *hmmc, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks);
|
||||||
|
HAL_StatusTypeDef HAL_MMC_WriteBlocks_IT(MMC_HandleTypeDef *hmmc, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks);
|
||||||
|
/* Non-Blocking mode: DMA */
|
||||||
|
HAL_StatusTypeDef HAL_MMC_ReadBlocks_DMA(MMC_HandleTypeDef *hmmc, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks);
|
||||||
|
HAL_StatusTypeDef HAL_MMC_WriteBlocks_DMA(MMC_HandleTypeDef *hmmc, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks);
|
||||||
|
|
||||||
|
void HAL_MMC_IRQHandler(MMC_HandleTypeDef *hmmc);
|
||||||
|
|
||||||
|
/* Callback in non blocking modes (DMA) */
|
||||||
|
void HAL_MMC_TxCpltCallback(MMC_HandleTypeDef *hmmc);
|
||||||
|
void HAL_MMC_RxCpltCallback(MMC_HandleTypeDef *hmmc);
|
||||||
|
void HAL_MMC_ErrorCallback(MMC_HandleTypeDef *hmmc);
|
||||||
|
void HAL_MMC_AbortCallback(MMC_HandleTypeDef *hmmc);
|
||||||
|
|
||||||
|
#if defined (USE_HAL_MMC_REGISTER_CALLBACKS) && (USE_HAL_MMC_REGISTER_CALLBACKS == 1U)
|
||||||
|
/* MMC callback registering/unregistering */
|
||||||
|
HAL_StatusTypeDef HAL_MMC_RegisterCallback (MMC_HandleTypeDef *hmmc, HAL_MMC_CallbackIDTypeDef CallbackId, pMMC_CallbackTypeDef pCallback);
|
||||||
|
HAL_StatusTypeDef HAL_MMC_UnRegisterCallback(MMC_HandleTypeDef *hmmc, HAL_MMC_CallbackIDTypeDef CallbackId);
|
||||||
|
#endif
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Functions_Group3 Peripheral Control functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
HAL_StatusTypeDef HAL_MMC_ConfigWideBusOperation(MMC_HandleTypeDef *hmmc, uint32_t WideMode);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Functions_Group4 MMC card related functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
HAL_MMC_CardStateTypeDef HAL_MMC_GetCardState(MMC_HandleTypeDef *hmmc);
|
||||||
|
HAL_StatusTypeDef HAL_MMC_GetCardCID(MMC_HandleTypeDef *hmmc, HAL_MMC_CardCIDTypeDef *pCID);
|
||||||
|
HAL_StatusTypeDef HAL_MMC_GetCardCSD(MMC_HandleTypeDef *hmmc, HAL_MMC_CardCSDTypeDef *pCSD);
|
||||||
|
HAL_StatusTypeDef HAL_MMC_GetCardInfo(MMC_HandleTypeDef *hmmc, HAL_MMC_CardInfoTypeDef *pCardInfo);
|
||||||
|
HAL_StatusTypeDef HAL_MMC_GetCardExtCSD(MMC_HandleTypeDef *hmmc, uint32_t *pExtCSD, uint32_t Timeout);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Functions_Group5 Peripheral State and Errors functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
HAL_MMC_StateTypeDef HAL_MMC_GetState(MMC_HandleTypeDef *hmmc);
|
||||||
|
uint32_t HAL_MMC_GetError(MMC_HandleTypeDef *hmmc);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup MMC_Exported_Functions_Group6 Peripheral Abort management
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
HAL_StatusTypeDef HAL_MMC_Abort(MMC_HandleTypeDef *hmmc);
|
||||||
|
HAL_StatusTypeDef HAL_MMC_Abort_IT(MMC_HandleTypeDef *hmmc);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Private types -------------------------------------------------------------*/
|
||||||
|
/** @defgroup MMC_Private_Types MMC Private Types
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Private defines -----------------------------------------------------------*/
|
||||||
|
/** @defgroup MMC_Private_Defines MMC Private Defines
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Private variables ---------------------------------------------------------*/
|
||||||
|
/** @defgroup MMC_Private_Variables MMC Private Variables
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Private constants ---------------------------------------------------------*/
|
||||||
|
/** @defgroup MMC_Private_Constants MMC Private Constants
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Private macros ------------------------------------------------------------*/
|
||||||
|
/** @defgroup MMC_Private_Macros MMC Private Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Private functions prototypes ----------------------------------------------*/
|
||||||
|
/** @defgroup MMC_Private_Functions_Prototypes MMC Private Functions Prototypes
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Private functions ---------------------------------------------------------*/
|
||||||
|
/** @defgroup MMC_Private_Functions MMC Private Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* SDIO */
|
||||||
|
|
||||||
|
#endif /* STM32F4xx_HAL_MMC_H */
|
||||||
|
|
@ -114,6 +114,8 @@ typedef struct
|
||||||
*/
|
*/
|
||||||
#define PWR_SLEEPENTRY_WFI ((uint8_t)0x01)
|
#define PWR_SLEEPENTRY_WFI ((uint8_t)0x01)
|
||||||
#define PWR_SLEEPENTRY_WFE ((uint8_t)0x02)
|
#define PWR_SLEEPENTRY_WFE ((uint8_t)0x02)
|
||||||
|
#define PWR_SLEEPENTRY_WFE_NO_EVT_CLEAR ((uint8_t)0x03)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -123,6 +125,7 @@ typedef struct
|
||||||
*/
|
*/
|
||||||
#define PWR_STOPENTRY_WFI ((uint8_t)0x01)
|
#define PWR_STOPENTRY_WFI ((uint8_t)0x01)
|
||||||
#define PWR_STOPENTRY_WFE ((uint8_t)0x02)
|
#define PWR_STOPENTRY_WFE ((uint8_t)0x02)
|
||||||
|
#define PWR_STOPENTRY_WFE_NO_EVT_CLEAR ((uint8_t)0x03)
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -401,8 +404,14 @@ void HAL_PWR_DisableSEVOnPend(void);
|
||||||
((MODE) == PWR_PVD_MODE_NORMAL))
|
((MODE) == PWR_PVD_MODE_NORMAL))
|
||||||
#define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_MAINREGULATOR_ON) || \
|
#define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_MAINREGULATOR_ON) || \
|
||||||
((REGULATOR) == PWR_LOWPOWERREGULATOR_ON))
|
((REGULATOR) == PWR_LOWPOWERREGULATOR_ON))
|
||||||
#define IS_PWR_SLEEP_ENTRY(ENTRY) (((ENTRY) == PWR_SLEEPENTRY_WFI) || ((ENTRY) == PWR_SLEEPENTRY_WFE))
|
|
||||||
#define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPENTRY_WFI) || ((ENTRY) == PWR_STOPENTRY_WFE))
|
#define IS_PWR_SLEEP_ENTRY(ENTRY) (((ENTRY) == PWR_SLEEPENTRY_WFI) || \
|
||||||
|
((ENTRY) == PWR_SLEEPENTRY_WFE) || \
|
||||||
|
((ENTRY) == PWR_SLEEPENTRY_WFE_NO_EVT_CLEAR))
|
||||||
|
|
||||||
|
#define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPENTRY_WFI) || \
|
||||||
|
((ENTRY) == PWR_STOPENTRY_WFE) || \
|
||||||
|
((ENTRY) == PWR_STOPENTRY_WFE_NO_EVT_CLEAR))
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -660,7 +660,6 @@ typedef struct
|
||||||
* @brief Force or release AHB1 peripheral reset.
|
* @brief Force or release AHB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0xFFFFFFFFU)
|
|
||||||
#define __HAL_RCC_GPIOA_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOARST))
|
#define __HAL_RCC_GPIOA_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOARST))
|
||||||
#define __HAL_RCC_GPIOB_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOBRST))
|
#define __HAL_RCC_GPIOB_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOBRST))
|
||||||
#define __HAL_RCC_GPIOC_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOCRST))
|
#define __HAL_RCC_GPIOC_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOCRST))
|
||||||
|
|
@ -683,7 +682,6 @@ typedef struct
|
||||||
* @brief Force or release APB1 peripheral reset.
|
* @brief Force or release APB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_APB1_FORCE_RESET() (RCC->APB1RSTR = 0xFFFFFFFFU)
|
|
||||||
#define __HAL_RCC_TIM5_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM5RST))
|
#define __HAL_RCC_TIM5_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM5RST))
|
||||||
#define __HAL_RCC_WWDG_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_WWDGRST))
|
#define __HAL_RCC_WWDG_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_WWDGRST))
|
||||||
#define __HAL_RCC_SPI2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_SPI2RST))
|
#define __HAL_RCC_SPI2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_SPI2RST))
|
||||||
|
|
@ -708,7 +706,6 @@ typedef struct
|
||||||
* @brief Force or release APB2 peripheral reset.
|
* @brief Force or release APB2 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0xFFFFFFFFU)
|
|
||||||
#define __HAL_RCC_TIM1_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM1RST))
|
#define __HAL_RCC_TIM1_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM1RST))
|
||||||
#define __HAL_RCC_USART1_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_USART1RST))
|
#define __HAL_RCC_USART1_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_USART1RST))
|
||||||
#define __HAL_RCC_USART6_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_USART6RST))
|
#define __HAL_RCC_USART6_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_USART6RST))
|
||||||
|
|
@ -1223,7 +1220,9 @@ typedef struct
|
||||||
* @retval The new state of __FLAG__ (TRUE or FALSE).
|
* @retval The new state of __FLAG__ (TRUE or FALSE).
|
||||||
*/
|
*/
|
||||||
#define RCC_FLAG_MASK ((uint8_t)0x1FU)
|
#define RCC_FLAG_MASK ((uint8_t)0x1FU)
|
||||||
#define __HAL_RCC_GET_FLAG(__FLAG__) (((((((__FLAG__) >> 5U) == 1U)? RCC->CR :((((__FLAG__) >> 5U) == 2U) ? RCC->BDCR :((((__FLAG__) >> 5U) == 3U)? RCC->CSR :RCC->CIR))) & (1U << ((__FLAG__) & RCC_FLAG_MASK)))!= 0U)? 1U : 0U)
|
#define __HAL_RCC_GET_FLAG(__FLAG__) (((((((__FLAG__) >> 5U)\
|
||||||
|
== 1U)? RCC->CR :((((__FLAG__) >> 5U) == 2U) ? RCC->BDCR :((((__FLAG__) >> 5U) == 3U)? RCC->CSR :RCC->CIR))) &\
|
||||||
|
(1U << ((__FLAG__) & RCC_FLAG_MASK)))!= 0U)? 1U : 0U)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
@ -1407,7 +1406,7 @@ void HAL_RCC_CSSCallback(void);
|
||||||
((__SOURCE__) == RCC_RTCCLKSOURCE_HSE_DIV30) || \
|
((__SOURCE__) == RCC_RTCCLKSOURCE_HSE_DIV30) || \
|
||||||
((__SOURCE__) == RCC_RTCCLKSOURCE_HSE_DIV31))
|
((__SOURCE__) == RCC_RTCCLKSOURCE_HSE_DIV31))
|
||||||
|
|
||||||
#define IS_RCC_PLLM_VALUE(VALUE) ((VALUE) <= 63U)
|
#define IS_RCC_PLLM_VALUE(VALUE) ((2U <= (VALUE)) && ((VALUE) <= 63U))
|
||||||
|
|
||||||
#define IS_RCC_PLLP_VALUE(VALUE) (((VALUE) == 2U) || ((VALUE) == 4U) || ((VALUE) == 6U) || ((VALUE) == 8U))
|
#define IS_RCC_PLLP_VALUE(VALUE) (((VALUE) == 2U) || ((VALUE) == 4U) || ((VALUE) == 6U) || ((VALUE) == 8U))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -526,7 +526,7 @@ typedef struct
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define RCC_I2SCLKSOURCE_PLLI2S 0x00000000U
|
#define RCC_I2SCLKSOURCE_PLLI2S 0x00000000U
|
||||||
#define RCC_I2SCLKSOURCE_EXT 0x00000001U
|
#define RCC_I2SCLKSOURCE_EXT RCC_CFGR_I2SSRC
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -922,7 +922,7 @@ typedef struct
|
||||||
defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || \
|
defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || \
|
||||||
defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F411xE) || defined(STM32F446xx) || \
|
defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F411xE) || defined(STM32F446xx) || \
|
||||||
defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || \
|
defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || \
|
||||||
defined(STM32F412Rx) || defined(STM32F413xx) || defined(STM32F423xx)
|
defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
|
||||||
/** @defgroup RCC_MCO2_Clock_Source MCO2 Clock Source
|
/** @defgroup RCC_MCO2_Clock_Source MCO2 Clock Source
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
@ -1665,6 +1665,7 @@ typedef struct
|
||||||
* @brief Force or release AHB1 peripheral reset.
|
* @brief Force or release AHB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0x22E017FFU)
|
||||||
#define __HAL_RCC_GPIOD_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIODRST))
|
#define __HAL_RCC_GPIOD_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIODRST))
|
||||||
#define __HAL_RCC_GPIOE_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOERST))
|
#define __HAL_RCC_GPIOE_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOERST))
|
||||||
#define __HAL_RCC_GPIOF_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOFRST))
|
#define __HAL_RCC_GPIOF_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOFRST))
|
||||||
|
|
@ -1696,7 +1697,12 @@ typedef struct
|
||||||
* @brief Force or release AHB2 peripheral reset.
|
* @brief Force or release AHB2 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0xFFFFFFFFU)
|
#if defined(STM32F427xx) || defined(STM32F429xx) || defined(STM32F469xx)
|
||||||
|
#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0x000000C1U)
|
||||||
|
#endif /* STM32F427xx || STM32F429xx || STM32F469xx */
|
||||||
|
#if defined(STM32F437xx) || defined(STM32F439xx) || defined(STM32F479xx)
|
||||||
|
#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0x000000F1U)
|
||||||
|
#endif /* STM32F437xx || STM32F439xx || STM32F479xx */
|
||||||
#define __HAL_RCC_USB_OTG_FS_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_OTGFSRST))
|
#define __HAL_RCC_USB_OTG_FS_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_OTGFSRST))
|
||||||
#define __HAL_RCC_RNG_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_RNGRST))
|
#define __HAL_RCC_RNG_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_RNGRST))
|
||||||
#define __HAL_RCC_DCMI_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_DCMIRST))
|
#define __HAL_RCC_DCMI_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_DCMIRST))
|
||||||
|
|
@ -1721,7 +1727,12 @@ typedef struct
|
||||||
* @brief Force or release AHB3 peripheral reset.
|
* @brief Force or release AHB3 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR = 0xFFFFFFFFU)
|
#if defined(STM32F427xx) || defined(STM32F429xx) || defined(STM32F437xx) || defined(STM32F439xx)
|
||||||
|
#define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR = 0x00000001U)
|
||||||
|
#endif /* STM32F427xx || STM32F429xx || STM32F437xx || STM32F439xx */
|
||||||
|
#if defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
#define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR = 0x00000003U)
|
||||||
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
#define __HAL_RCC_AHB3_RELEASE_RESET() (RCC->AHB3RSTR = 0x00U)
|
#define __HAL_RCC_AHB3_RELEASE_RESET() (RCC->AHB3RSTR = 0x00U)
|
||||||
#define __HAL_RCC_FMC_FORCE_RESET() (RCC->AHB3RSTR |= (RCC_AHB3RSTR_FMCRST))
|
#define __HAL_RCC_FMC_FORCE_RESET() (RCC->AHB3RSTR |= (RCC_AHB3RSTR_FMCRST))
|
||||||
#define __HAL_RCC_FMC_RELEASE_RESET() (RCC->AHB3RSTR &= ~(RCC_AHB3RSTR_FMCRST))
|
#define __HAL_RCC_FMC_RELEASE_RESET() (RCC->AHB3RSTR &= ~(RCC_AHB3RSTR_FMCRST))
|
||||||
|
|
@ -1738,6 +1749,7 @@ typedef struct
|
||||||
* @brief Force or release APB1 peripheral reset.
|
* @brief Force or release APB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#define __HAL_RCC_APB1_FORCE_RESET() (RCC->APB1RSTR = 0xF6FEC9FFU)
|
||||||
#define __HAL_RCC_TIM6_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM6RST))
|
#define __HAL_RCC_TIM6_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM6RST))
|
||||||
#define __HAL_RCC_TIM7_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM7RST))
|
#define __HAL_RCC_TIM7_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM7RST))
|
||||||
#define __HAL_RCC_TIM12_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM12RST))
|
#define __HAL_RCC_TIM12_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM12RST))
|
||||||
|
|
@ -1783,6 +1795,15 @@ typedef struct
|
||||||
* @brief Force or release APB2 peripheral reset.
|
* @brief Force or release APB2 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#if defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0x0C777933U)
|
||||||
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
|
#if defined(STM32F429xx) || defined(STM32F439xx)
|
||||||
|
#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0x04777933U)
|
||||||
|
#endif /* STM32F429xx || STM32F439xx */
|
||||||
|
#if defined(STM32F427xx) || defined(STM32F437xx)
|
||||||
|
#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0x00777933U)
|
||||||
|
#endif /* STM32F427xx || STM32F437xx */
|
||||||
#define __HAL_RCC_TIM8_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM8RST))
|
#define __HAL_RCC_TIM8_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM8RST))
|
||||||
#define __HAL_RCC_SPI5_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI5RST))
|
#define __HAL_RCC_SPI5_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI5RST))
|
||||||
#define __HAL_RCC_SPI6_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI6RST))
|
#define __HAL_RCC_SPI6_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI6RST))
|
||||||
|
|
@ -2590,6 +2611,12 @@ typedef struct
|
||||||
* @brief Force or release AHB1 peripheral reset.
|
* @brief Force or release AHB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#if defined (STM32F405xx) || defined (STM32F415xx)
|
||||||
|
#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0x206011FFU)
|
||||||
|
#endif /* STM32F405xx || STM32F415xx */
|
||||||
|
#if defined (STM32F407xx) || defined (STM32F417xx)
|
||||||
|
#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0x226011FFU)
|
||||||
|
#endif /* STM32F407xx || STM32F417xx */
|
||||||
#define __HAL_RCC_GPIOD_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIODRST))
|
#define __HAL_RCC_GPIOD_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIODRST))
|
||||||
#define __HAL_RCC_GPIOE_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOERST))
|
#define __HAL_RCC_GPIOE_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOERST))
|
||||||
#define __HAL_RCC_GPIOF_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOFRST))
|
#define __HAL_RCC_GPIOF_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOFRST))
|
||||||
|
|
@ -2615,7 +2642,12 @@ typedef struct
|
||||||
* @brief Force or release AHB2 peripheral reset.
|
* @brief Force or release AHB2 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0xFFFFFFFFU)
|
#if defined (STM32F415xx) || defined (STM32F417xx)
|
||||||
|
#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0x000000F1U)
|
||||||
|
#endif /* STM32F415xx || STM32F417xx */
|
||||||
|
#if defined (STM32F405xx) || defined (STM32F407xx)
|
||||||
|
#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0x000000C1U)
|
||||||
|
#endif /* STM32F405xx || STM32F407xx */
|
||||||
#define __HAL_RCC_AHB2_RELEASE_RESET() (RCC->AHB2RSTR = 0x00U)
|
#define __HAL_RCC_AHB2_RELEASE_RESET() (RCC->AHB2RSTR = 0x00U)
|
||||||
|
|
||||||
#if defined(STM32F407xx)|| defined(STM32F417xx)
|
#if defined(STM32F407xx)|| defined(STM32F417xx)
|
||||||
|
|
@ -2644,7 +2676,7 @@ typedef struct
|
||||||
* @brief Force or release AHB3 peripheral reset.
|
* @brief Force or release AHB3 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR = 0xFFFFFFFFU)
|
#define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR = 0x00000001U)
|
||||||
#define __HAL_RCC_AHB3_RELEASE_RESET() (RCC->AHB3RSTR = 0x00U)
|
#define __HAL_RCC_AHB3_RELEASE_RESET() (RCC->AHB3RSTR = 0x00U)
|
||||||
|
|
||||||
#define __HAL_RCC_FSMC_FORCE_RESET() (RCC->AHB3RSTR |= (RCC_AHB3RSTR_FSMCRST))
|
#define __HAL_RCC_FSMC_FORCE_RESET() (RCC->AHB3RSTR |= (RCC_AHB3RSTR_FSMCRST))
|
||||||
|
|
@ -2657,6 +2689,7 @@ typedef struct
|
||||||
* @brief Force or release APB1 peripheral reset.
|
* @brief Force or release APB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#define __HAL_RCC_APB1_FORCE_RESET() (RCC->APB1RSTR = 0xF6FEC9FFU)
|
||||||
#define __HAL_RCC_TIM6_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM6RST))
|
#define __HAL_RCC_TIM6_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM6RST))
|
||||||
#define __HAL_RCC_TIM7_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM7RST))
|
#define __HAL_RCC_TIM7_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM7RST))
|
||||||
#define __HAL_RCC_TIM12_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM12RST))
|
#define __HAL_RCC_TIM12_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM12RST))
|
||||||
|
|
@ -2698,6 +2731,7 @@ typedef struct
|
||||||
* @brief Force or release APB2 peripheral reset.
|
* @brief Force or release APB2 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0x04777933U)
|
||||||
#define __HAL_RCC_TIM8_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM8RST))
|
#define __HAL_RCC_TIM8_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM8RST))
|
||||||
#define __HAL_RCC_SDIO_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SDIORST))
|
#define __HAL_RCC_SDIO_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SDIORST))
|
||||||
#define __HAL_RCC_SPI4_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI4RST))
|
#define __HAL_RCC_SPI4_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI4RST))
|
||||||
|
|
@ -3097,7 +3131,7 @@ typedef struct
|
||||||
* @brief Force or release AHB1 peripheral reset.
|
* @brief Force or release AHB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0xFFFFFFFFU)
|
#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0x0060109FU)
|
||||||
#define __HAL_RCC_GPIOD_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIODRST))
|
#define __HAL_RCC_GPIOD_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIODRST))
|
||||||
#define __HAL_RCC_GPIOE_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOERST))
|
#define __HAL_RCC_GPIOE_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOERST))
|
||||||
#define __HAL_RCC_CRC_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_CRCRST))
|
#define __HAL_RCC_CRC_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_CRCRST))
|
||||||
|
|
@ -3114,7 +3148,7 @@ typedef struct
|
||||||
* @brief Force or release AHB2 peripheral reset.
|
* @brief Force or release AHB2 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0xFFFFFFFFU)
|
#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0x00000080U)
|
||||||
#define __HAL_RCC_USB_OTG_FS_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_OTGFSRST))
|
#define __HAL_RCC_USB_OTG_FS_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_OTGFSRST))
|
||||||
|
|
||||||
#define __HAL_RCC_AHB2_RELEASE_RESET() (RCC->AHB2RSTR = 0x00U)
|
#define __HAL_RCC_AHB2_RELEASE_RESET() (RCC->AHB2RSTR = 0x00U)
|
||||||
|
|
@ -3127,7 +3161,7 @@ typedef struct
|
||||||
* @brief Force or release APB1 peripheral reset.
|
* @brief Force or release APB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_APB1_FORCE_RESET() (RCC->APB1RSTR = 0xFFFFFFFFU)
|
#define __HAL_RCC_APB1_FORCE_RESET() (RCC->APB1RSTR = 0x10E2C80FU)
|
||||||
#define __HAL_RCC_TIM2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM2RST))
|
#define __HAL_RCC_TIM2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM2RST))
|
||||||
#define __HAL_RCC_TIM3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM3RST))
|
#define __HAL_RCC_TIM3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM3RST))
|
||||||
#define __HAL_RCC_TIM4_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM4RST))
|
#define __HAL_RCC_TIM4_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM4RST))
|
||||||
|
|
@ -3148,7 +3182,7 @@ typedef struct
|
||||||
* @brief Force or release APB2 peripheral reset.
|
* @brief Force or release APB2 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0xFFFFFFFFU)
|
#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0x00077931U)
|
||||||
#define __HAL_RCC_SDIO_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SDIORST))
|
#define __HAL_RCC_SDIO_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SDIORST))
|
||||||
#define __HAL_RCC_SPI4_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI4RST))
|
#define __HAL_RCC_SPI4_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI4RST))
|
||||||
#define __HAL_RCC_TIM10_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM10RST))
|
#define __HAL_RCC_TIM10_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM10RST))
|
||||||
|
|
@ -3413,6 +3447,7 @@ typedef struct
|
||||||
* @brief Force or release AHB1 peripheral reset.
|
* @brief Force or release AHB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0x80601087U)
|
||||||
#define __HAL_RCC_CRC_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_CRCRST))
|
#define __HAL_RCC_CRC_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_CRCRST))
|
||||||
#define __HAL_RCC_RNG_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_RNGRST))
|
#define __HAL_RCC_RNG_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_RNGRST))
|
||||||
#define __HAL_RCC_CRC_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_CRCRST))
|
#define __HAL_RCC_CRC_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_CRCRST))
|
||||||
|
|
@ -3445,6 +3480,12 @@ typedef struct
|
||||||
* @brief Force or release APB1 peripheral reset.
|
* @brief Force or release APB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#if defined (STM32F410Rx) || defined (STM32F410Cx)
|
||||||
|
#define __HAL_RCC_APB1_FORCE_RESET() (RCC->APB1RSTR = 0x31624A18U)
|
||||||
|
#endif /* STM32F410Rx || STM32F410Cx */
|
||||||
|
#if defined (STM32F410Tx)
|
||||||
|
#define __HAL_RCC_APB1_FORCE_RESET() (RCC->APB1RSTR = 0x31620A18U)
|
||||||
|
#endif /* STM32F410Tx */
|
||||||
#define __HAL_RCC_TIM6_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM6RST))
|
#define __HAL_RCC_TIM6_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM6RST))
|
||||||
#define __HAL_RCC_LPTIM1_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_LPTIM1RST))
|
#define __HAL_RCC_LPTIM1_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_LPTIM1RST))
|
||||||
#define __HAL_RCC_FMPI2C1_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_FMPI2C1RST))
|
#define __HAL_RCC_FMPI2C1_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_FMPI2C1RST))
|
||||||
|
|
@ -3462,6 +3503,12 @@ typedef struct
|
||||||
* @brief Force or release APB2 peripheral reset.
|
* @brief Force or release APB2 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#if defined (STM32F410Rx) || defined (STM32F410Cx)
|
||||||
|
#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0x00155131U)
|
||||||
|
#endif /* STM32F410Rx || STM32F410Cx */
|
||||||
|
#if defined (STM32F410Tx)
|
||||||
|
#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0x00055111U)
|
||||||
|
#endif /* STM32F410Tx */
|
||||||
#define __HAL_RCC_SPI5_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI5RST))
|
#define __HAL_RCC_SPI5_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI5RST))
|
||||||
#define __HAL_RCC_SPI5_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SPI5RST))
|
#define __HAL_RCC_SPI5_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SPI5RST))
|
||||||
/**
|
/**
|
||||||
|
|
@ -3754,6 +3801,7 @@ typedef struct
|
||||||
* @brief Force or release AHB1 peripheral reset.
|
* @brief Force or release AHB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0x0060109FU)
|
||||||
#define __HAL_RCC_GPIOD_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIODRST))
|
#define __HAL_RCC_GPIOD_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIODRST))
|
||||||
#define __HAL_RCC_GPIOE_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOERST))
|
#define __HAL_RCC_GPIOE_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOERST))
|
||||||
#define __HAL_RCC_CRC_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_CRCRST))
|
#define __HAL_RCC_CRC_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_CRCRST))
|
||||||
|
|
@ -3769,7 +3817,7 @@ typedef struct
|
||||||
* @brief Force or release AHB2 peripheral reset.
|
* @brief Force or release AHB2 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0xFFFFFFFFU)
|
#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0x00000080U)
|
||||||
#define __HAL_RCC_USB_OTG_FS_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_OTGFSRST))
|
#define __HAL_RCC_USB_OTG_FS_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_OTGFSRST))
|
||||||
|
|
||||||
#define __HAL_RCC_AHB2_RELEASE_RESET() (RCC->AHB2RSTR = 0x00U)
|
#define __HAL_RCC_AHB2_RELEASE_RESET() (RCC->AHB2RSTR = 0x00U)
|
||||||
|
|
@ -3792,6 +3840,7 @@ typedef struct
|
||||||
* @brief Force or release APB1 peripheral reset.
|
* @brief Force or release APB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#define __HAL_RCC_APB1_FORCE_RESET() (RCC->APB1RSTR = 0x10E2C80FU)
|
||||||
#define __HAL_RCC_TIM2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM2RST))
|
#define __HAL_RCC_TIM2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM2RST))
|
||||||
#define __HAL_RCC_TIM3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM3RST))
|
#define __HAL_RCC_TIM3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM3RST))
|
||||||
#define __HAL_RCC_TIM4_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM4RST))
|
#define __HAL_RCC_TIM4_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM4RST))
|
||||||
|
|
@ -3811,6 +3860,7 @@ typedef struct
|
||||||
* @brief Force or release APB2 peripheral reset.
|
* @brief Force or release APB2 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0x00177931U)
|
||||||
#define __HAL_RCC_SPI5_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI5RST))
|
#define __HAL_RCC_SPI5_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI5RST))
|
||||||
#define __HAL_RCC_SDIO_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SDIORST))
|
#define __HAL_RCC_SDIO_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SDIORST))
|
||||||
#define __HAL_RCC_SPI4_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI4RST))
|
#define __HAL_RCC_SPI4_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI4RST))
|
||||||
|
|
@ -4430,6 +4480,7 @@ typedef struct
|
||||||
* @brief Force or release AHB1 peripheral reset.
|
* @brief Force or release AHB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0x206010FFU)
|
||||||
#define __HAL_RCC_GPIOD_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIODRST))
|
#define __HAL_RCC_GPIOD_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIODRST))
|
||||||
#define __HAL_RCC_GPIOE_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOERST))
|
#define __HAL_RCC_GPIOE_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOERST))
|
||||||
#define __HAL_RCC_GPIOF_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOFRST))
|
#define __HAL_RCC_GPIOF_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOFRST))
|
||||||
|
|
@ -4451,7 +4502,7 @@ typedef struct
|
||||||
* @brief Force or release AHB2 peripheral reset.
|
* @brief Force or release AHB2 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0xFFFFFFFFU)
|
#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0x00000081U)
|
||||||
#define __HAL_RCC_USB_OTG_FS_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_OTGFSRST))
|
#define __HAL_RCC_USB_OTG_FS_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_OTGFSRST))
|
||||||
#define __HAL_RCC_RNG_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_RNGRST))
|
#define __HAL_RCC_RNG_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_RNGRST))
|
||||||
#define __HAL_RCC_DCMI_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_DCMIRST))
|
#define __HAL_RCC_DCMI_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_DCMIRST))
|
||||||
|
|
@ -4468,7 +4519,7 @@ typedef struct
|
||||||
* @brief Force or release AHB3 peripheral reset.
|
* @brief Force or release AHB3 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR = 0xFFFFFFFFU)
|
#define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR = 0x00000003U)
|
||||||
#define __HAL_RCC_AHB3_RELEASE_RESET() (RCC->AHB3RSTR = 0x00U)
|
#define __HAL_RCC_AHB3_RELEASE_RESET() (RCC->AHB3RSTR = 0x00U)
|
||||||
|
|
||||||
#define __HAL_RCC_FMC_FORCE_RESET() (RCC->AHB3RSTR |= (RCC_AHB3RSTR_FMCRST))
|
#define __HAL_RCC_FMC_FORCE_RESET() (RCC->AHB3RSTR |= (RCC_AHB3RSTR_FMCRST))
|
||||||
|
|
@ -4484,6 +4535,7 @@ typedef struct
|
||||||
* @brief Force or release APB1 peripheral reset.
|
* @brief Force or release APB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#define __HAL_RCC_APB1_FORCE_RESET() (RCC->APB1RSTR = 0x3FFFC9FFU)
|
||||||
#define __HAL_RCC_TIM6_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM6RST))
|
#define __HAL_RCC_TIM6_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM6RST))
|
||||||
#define __HAL_RCC_TIM7_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM7RST))
|
#define __HAL_RCC_TIM7_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM7RST))
|
||||||
#define __HAL_RCC_TIM12_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM12RST))
|
#define __HAL_RCC_TIM12_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM12RST))
|
||||||
|
|
@ -4531,6 +4583,7 @@ typedef struct
|
||||||
* @brief Force or release APB2 peripheral reset.
|
* @brief Force or release APB2 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0x00C77933U)
|
||||||
#define __HAL_RCC_TIM8_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM8RST))
|
#define __HAL_RCC_TIM8_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM8RST))
|
||||||
#define __HAL_RCC_SAI1_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SAI1RST))
|
#define __HAL_RCC_SAI1_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SAI1RST))
|
||||||
#define __HAL_RCC_SAI2_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SAI2RST))
|
#define __HAL_RCC_SAI2_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SAI2RST))
|
||||||
|
|
@ -5343,6 +5396,18 @@ typedef struct
|
||||||
* @brief Force or release AHB1 peripheral reset.
|
* @brief Force or release AHB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#if defined (STM32F412Zx) || defined(STM32F413xx) || defined (STM32F423xx)
|
||||||
|
#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0x006010FFU)
|
||||||
|
#endif /* STM32F412Zx || STM32F413xx || STM32F423xx */
|
||||||
|
#if defined (STM32F412Cx)
|
||||||
|
#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0x00601087U)
|
||||||
|
#endif /* STM32F412Cx */
|
||||||
|
#if defined (STM32F412Vx)
|
||||||
|
#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0x0060109FU)
|
||||||
|
#endif /* STM32F412Vx */
|
||||||
|
#if defined (STM32F412Rx)
|
||||||
|
#define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0x0060108FU)
|
||||||
|
#endif /* STM32F412Rx */
|
||||||
#if defined(STM32F412Rx) || defined(STM32F412Vx) || defined(STM32F412Zx) || defined(STM32F413xx) || defined(STM32F423xx)
|
#if defined(STM32F412Rx) || defined(STM32F412Vx) || defined(STM32F412Zx) || defined(STM32F413xx) || defined(STM32F423xx)
|
||||||
#define __HAL_RCC_GPIOD_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIODRST))
|
#define __HAL_RCC_GPIOD_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIODRST))
|
||||||
#endif /* STM32F412Rx || STM32F412Vx || STM32F412Zx || STM32F413xx || STM32F423xx */
|
#endif /* STM32F412Rx || STM32F412Vx || STM32F412Zx || STM32F413xx || STM32F423xx */
|
||||||
|
|
@ -5374,13 +5439,14 @@ typedef struct
|
||||||
* @brief Force or release AHB2 peripheral reset.
|
* @brief Force or release AHB2 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0xFFFFFFFFU)
|
|
||||||
#define __HAL_RCC_AHB2_RELEASE_RESET() (RCC->AHB2RSTR = 0x00U)
|
|
||||||
|
|
||||||
#if defined(STM32F423xx)
|
#if defined(STM32F423xx)
|
||||||
|
#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0x000000D0U)
|
||||||
#define __HAL_RCC_AES_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_AESRST))
|
#define __HAL_RCC_AES_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_AESRST))
|
||||||
#define __HAL_RCC_AES_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_AESRST))
|
#define __HAL_RCC_AES_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_AESRST))
|
||||||
|
#else
|
||||||
|
#define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0x000000C0U)
|
||||||
#endif /* STM32F423xx */
|
#endif /* STM32F423xx */
|
||||||
|
#define __HAL_RCC_AHB2_RELEASE_RESET() (RCC->AHB2RSTR = 0x00U)
|
||||||
|
|
||||||
#define __HAL_RCC_USB_OTG_FS_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_OTGFSRST))
|
#define __HAL_RCC_USB_OTG_FS_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_OTGFSRST))
|
||||||
#define __HAL_RCC_USB_OTG_FS_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_OTGFSRST))
|
#define __HAL_RCC_USB_OTG_FS_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_OTGFSRST))
|
||||||
|
|
@ -5396,7 +5462,7 @@ typedef struct
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#if defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F413xx) || defined(STM32F423xx)
|
#if defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F413xx) || defined(STM32F423xx)
|
||||||
#define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR = 0xFFFFFFFFU)
|
#define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR = 0x00000003U)
|
||||||
#define __HAL_RCC_AHB3_RELEASE_RESET() (RCC->AHB3RSTR = 0x00U)
|
#define __HAL_RCC_AHB3_RELEASE_RESET() (RCC->AHB3RSTR = 0x00U)
|
||||||
|
|
||||||
#define __HAL_RCC_FSMC_FORCE_RESET() (RCC->AHB3RSTR |= (RCC_AHB3RSTR_FSMCRST))
|
#define __HAL_RCC_FSMC_FORCE_RESET() (RCC->AHB3RSTR |= (RCC_AHB3RSTR_FSMCRST))
|
||||||
|
|
@ -5423,6 +5489,12 @@ typedef struct
|
||||||
* @brief Force or release APB1 peripheral reset.
|
* @brief Force or release APB1 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#if defined(STM32F413xx) || defined(STM32F423xx)
|
||||||
|
#define __HAL_RCC_APB1_FORCE_RESET() (RCC->APB1RSTR = 0xFFFECBFFU)
|
||||||
|
#endif /* STM32F413xx || STM32F423xx */
|
||||||
|
#if defined (STM32F412Zx) || defined (STM32F412Vx) || defined (STM32F412Rx) || defined (STM32F412Cx)
|
||||||
|
#define __HAL_RCC_APB1_FORCE_RESET() (RCC->APB1RSTR = 0x17E6C9FFU)
|
||||||
|
#endif /* STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
|
||||||
#define __HAL_RCC_TIM2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM2RST))
|
#define __HAL_RCC_TIM2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM2RST))
|
||||||
#define __HAL_RCC_TIM3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM3RST))
|
#define __HAL_RCC_TIM3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM3RST))
|
||||||
#define __HAL_RCC_TIM4_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM4RST))
|
#define __HAL_RCC_TIM4_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM4RST))
|
||||||
|
|
@ -5486,6 +5558,12 @@ typedef struct
|
||||||
* @brief Force or release APB2 peripheral reset.
|
* @brief Force or release APB2 peripheral reset.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#if defined(STM32F413xx)|| defined(STM32F423xx)
|
||||||
|
#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0x035779F3U)
|
||||||
|
#endif /* STM32F413xx || STM32F423xx */
|
||||||
|
#if defined (STM32F412Zx) || defined (STM32F412Vx) || defined (STM32F412Rx) || defined (STM32F412Cx)
|
||||||
|
#define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0x01177933U)
|
||||||
|
#endif /* STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
|
||||||
#define __HAL_RCC_TIM8_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM8RST))
|
#define __HAL_RCC_TIM8_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM8RST))
|
||||||
#if defined(STM32F413xx) || defined(STM32F423xx)
|
#if defined(STM32F413xx) || defined(STM32F423xx)
|
||||||
#define __HAL_RCC_UART9_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_UART9RST))
|
#define __HAL_RCC_UART9_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_UART9RST))
|
||||||
|
|
@ -6101,7 +6179,7 @@ typedef struct
|
||||||
* @arg RCC_I2SCLKSOURCE_EXT: External clock mapped on the I2S_CKIN pin
|
* @arg RCC_I2SCLKSOURCE_EXT: External clock mapped on the I2S_CKIN pin
|
||||||
* used as I2S clock source.
|
* used as I2S clock source.
|
||||||
*/
|
*/
|
||||||
#define __HAL_RCC_I2S_CONFIG(__SOURCE__) (*(__IO uint32_t *) RCC_CFGR_I2SSRC_BB = (__SOURCE__))
|
#define __HAL_RCC_I2S_CONFIG(__SOURCE__) (MODIFY_REG(RCC->CFGR, RCC_CFGR_I2SSRC, (__SOURCE__)))
|
||||||
|
|
||||||
|
|
||||||
/** @brief Macro to get the I2S clock source (I2SCLK).
|
/** @brief Macro to get the I2S clock source (I2SCLK).
|
||||||
|
|
@ -6818,7 +6896,8 @@ HAL_StatusTypeDef HAL_RCCEx_DisablePLLSAI(void);
|
||||||
#define RCC_PLLI2SCFGR_OFFSET (RCC_OFFSET + 0x84U)
|
#define RCC_PLLI2SCFGR_OFFSET (RCC_OFFSET + 0x84U)
|
||||||
/* Alias word address of PLLI2SSRC bit */
|
/* Alias word address of PLLI2SSRC bit */
|
||||||
#define RCC_PLLI2SSRC_BIT_NUMBER 0x16U
|
#define RCC_PLLI2SSRC_BIT_NUMBER 0x16U
|
||||||
#define RCC_PLLI2SCFGR_PLLI2SSRC_BB (PERIPH_BB_BASE + (RCC_PLLI2SCFGR_OFFSET * 32U) + (RCC_PLLI2SSRC_BIT_NUMBER * 4U))
|
#define RCC_PLLI2SCFGR_PLLI2SSRC_BB (PERIPH_BB_BASE\
|
||||||
|
+ (RCC_PLLI2SCFGR_OFFSET * 32U) + (RCC_PLLI2SSRC_BIT_NUMBER * 4U))
|
||||||
|
|
||||||
#define PLLI2S_TIMEOUT_VALUE 2U /* Timeout value fixed to 2 ms */
|
#define PLLI2S_TIMEOUT_VALUE 2U /* Timeout value fixed to 2 ms */
|
||||||
#endif /* STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx || STM32F413xx | STM32F423xx */
|
#endif /* STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx || STM32F413xx | STM32F423xx */
|
||||||
|
|
@ -7075,7 +7154,7 @@ HAL_StatusTypeDef HAL_RCCEx_DisablePLLSAI(void);
|
||||||
defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || \
|
defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || \
|
||||||
defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F411xE) || defined(STM32F446xx) || \
|
defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F411xE) || defined(STM32F446xx) || \
|
||||||
defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || \
|
defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || \
|
||||||
defined(STM32F412Rx) || defined(STM32F413xx) || defined(STM32F423xx)
|
defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
|
||||||
|
|
||||||
#define IS_RCC_MCO2SOURCE(SOURCE) (((SOURCE) == RCC_MCO2SOURCE_SYSCLK) || ((SOURCE) == RCC_MCO2SOURCE_PLLI2SCLK)|| \
|
#define IS_RCC_MCO2SOURCE(SOURCE) (((SOURCE) == RCC_MCO2SOURCE_SYSCLK) || ((SOURCE) == RCC_MCO2SOURCE_PLLI2SCLK)|| \
|
||||||
((SOURCE) == RCC_MCO2SOURCE_HSE) || ((SOURCE) == RCC_MCO2SOURCE_PLLCLK))
|
((SOURCE) == RCC_MCO2SOURCE_HSE) || ((SOURCE) == RCC_MCO2SOURCE_PLLCLK))
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2016 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
|
@ -489,6 +489,12 @@ typedef void (*pRTC_CallbackTypeDef)(RTC_HandleTypeDef *hrtc); /*!< pointer to
|
||||||
(__HANDLE__)->Instance->WPR = 0xFFU; \
|
(__HANDLE__)->Instance->WPR = 0xFFU; \
|
||||||
} while(0U)
|
} while(0U)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Check whether the RTC Calendar is initialized.
|
||||||
|
* @param __HANDLE__ specifies the RTC handle.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_RTC_IS_CALENDAR_INITIALIZED(__HANDLE__) (((((__HANDLE__)->Instance->ISR) & (RTC_FLAG_INITS)) == RTC_FLAG_INITS) ? 1U : 0U)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable the RTC ALARMA peripheral.
|
* @brief Enable the RTC ALARMA peripheral.
|
||||||
|
|
@ -772,6 +778,7 @@ HAL_RTCStateTypeDef HAL_RTC_GetState(RTC_HandleTypeDef *hrtc);
|
||||||
RTC_DR_MT | RTC_DR_MU | \
|
RTC_DR_MT | RTC_DR_MU | \
|
||||||
RTC_DR_DT | RTC_DR_DU | \
|
RTC_DR_DT | RTC_DR_DU | \
|
||||||
RTC_DR_WDU))
|
RTC_DR_WDU))
|
||||||
|
#define RTC_ISR_RESERVED_MASK ((uint32_t)(RTC_FLAGS_MASK | RTC_ISR_INIT))
|
||||||
#define RTC_INIT_MASK 0xFFFFFFFFU
|
#define RTC_INIT_MASK 0xFFFFFFFFU
|
||||||
#define RTC_RSF_MASK ((uint32_t)~(RTC_ISR_INIT | RTC_ISR_RSF))
|
#define RTC_RSF_MASK ((uint32_t)~(RTC_ISR_INIT | RTC_ISR_RSF))
|
||||||
#define RTC_FLAGS_MASK ((uint32_t)(RTC_FLAG_INITF | RTC_FLAG_INITS | \
|
#define RTC_FLAGS_MASK ((uint32_t)(RTC_FLAG_INITF | RTC_FLAG_INITS | \
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2016 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
|
@ -162,7 +162,7 @@ typedef struct
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define RTC_TAMPERTRIGGER_RISINGEDGE 0x00000000U
|
#define RTC_TAMPERTRIGGER_RISINGEDGE 0x00000000U
|
||||||
#define RTC_TAMPERTRIGGER_FALLINGEDGE RTC_TAFCR_TAMP1TRG
|
#define RTC_TAMPERTRIGGER_FALLINGEDGE 0x00000002U
|
||||||
#define RTC_TAMPERTRIGGER_LOWLEVEL RTC_TAMPERTRIGGER_RISINGEDGE
|
#define RTC_TAMPERTRIGGER_LOWLEVEL RTC_TAMPERTRIGGER_RISINGEDGE
|
||||||
#define RTC_TAMPERTRIGGER_HIGHLEVEL RTC_TAMPERTRIGGER_FALLINGEDGE
|
#define RTC_TAMPERTRIGGER_HIGHLEVEL RTC_TAMPERTRIGGER_FALLINGEDGE
|
||||||
/**
|
/**
|
||||||
|
|
@ -635,18 +635,6 @@ typedef struct
|
||||||
*/
|
*/
|
||||||
#define __HAL_RTC_TAMPER_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->TAFCR &= ~(__INTERRUPT__))
|
#define __HAL_RTC_TAMPER_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->TAFCR &= ~(__INTERRUPT__))
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Check whether the specified RTC Tamper interrupt has occurred or not.
|
|
||||||
* @param __HANDLE__ specifies the RTC handle.
|
|
||||||
* @param __INTERRUPT__ specifies the RTC Tamper interrupt to check.
|
|
||||||
* This parameter can be:
|
|
||||||
* @arg RTC_IT_TAMP1: Tamper 1 interrupt
|
|
||||||
* @arg RTC_IT_TAMP2: Tamper 2 interrupt
|
|
||||||
* @note RTC_IT_TAMP2 is not applicable to all devices.
|
|
||||||
* @retval None
|
|
||||||
*/
|
|
||||||
#define __HAL_RTC_TAMPER_GET_IT(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__) >> 4U)) != 0U) ? 1U : 0U)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check whether the specified RTC Tamper interrupt has been enabled or not.
|
* @brief Check whether the specified RTC Tamper interrupt has been enabled or not.
|
||||||
* @param __HANDLE__ specifies the RTC handle.
|
* @param __HANDLE__ specifies the RTC handle.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,758 @@
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f4xx_hal_sd.h
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief Header file of SD HAL module.
|
||||||
|
******************************************************************************
|
||||||
|
* @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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef STM32F4xx_HAL_SD_H
|
||||||
|
#define STM32F4xx_HAL_SD_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(SDIO)
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f4xx_ll_sdmmc.h"
|
||||||
|
|
||||||
|
/** @addtogroup STM32F4xx_HAL_Driver
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD SD
|
||||||
|
* @brief SD HAL module driver
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Exported types ------------------------------------------------------------*/
|
||||||
|
/** @defgroup SD_Exported_Types SD Exported Types
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Types_Group1 SD State enumeration structure
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
HAL_SD_STATE_RESET = 0x00000000U, /*!< SD not yet initialized or disabled */
|
||||||
|
HAL_SD_STATE_READY = 0x00000001U, /*!< SD initialized and ready for use */
|
||||||
|
HAL_SD_STATE_TIMEOUT = 0x00000002U, /*!< SD Timeout state */
|
||||||
|
HAL_SD_STATE_BUSY = 0x00000003U, /*!< SD process ongoing */
|
||||||
|
HAL_SD_STATE_PROGRAMMING = 0x00000004U, /*!< SD Programming State */
|
||||||
|
HAL_SD_STATE_RECEIVING = 0x00000005U, /*!< SD Receiving State */
|
||||||
|
HAL_SD_STATE_TRANSFER = 0x00000006U, /*!< SD Transfer State */
|
||||||
|
HAL_SD_STATE_ERROR = 0x0000000FU /*!< SD is in error state */
|
||||||
|
}HAL_SD_StateTypeDef;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Types_Group2 SD Card State enumeration structure
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef uint32_t HAL_SD_CardStateTypeDef;
|
||||||
|
|
||||||
|
#define HAL_SD_CARD_READY 0x00000001U /*!< Card state is ready */
|
||||||
|
#define HAL_SD_CARD_IDENTIFICATION 0x00000002U /*!< Card is in identification state */
|
||||||
|
#define HAL_SD_CARD_STANDBY 0x00000003U /*!< Card is in standby state */
|
||||||
|
#define HAL_SD_CARD_TRANSFER 0x00000004U /*!< Card is in transfer state */
|
||||||
|
#define HAL_SD_CARD_SENDING 0x00000005U /*!< Card is sending an operation */
|
||||||
|
#define HAL_SD_CARD_RECEIVING 0x00000006U /*!< Card is receiving operation information */
|
||||||
|
#define HAL_SD_CARD_PROGRAMMING 0x00000007U /*!< Card is in programming state */
|
||||||
|
#define HAL_SD_CARD_DISCONNECTED 0x00000008U /*!< Card is disconnected */
|
||||||
|
#define HAL_SD_CARD_ERROR 0x000000FFU /*!< Card response Error */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Types_Group3 SD Handle Structure definition
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define SD_InitTypeDef SDIO_InitTypeDef
|
||||||
|
#define SD_TypeDef SDIO_TypeDef
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SD Card Information Structure definition
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint32_t CardType; /*!< Specifies the card Type */
|
||||||
|
|
||||||
|
uint32_t CardVersion; /*!< Specifies the card version */
|
||||||
|
|
||||||
|
uint32_t Class; /*!< Specifies the class of the card class */
|
||||||
|
|
||||||
|
uint32_t RelCardAdd; /*!< Specifies the Relative Card Address */
|
||||||
|
|
||||||
|
uint32_t BlockNbr; /*!< Specifies the Card Capacity in blocks */
|
||||||
|
|
||||||
|
uint32_t BlockSize; /*!< Specifies one block size in bytes */
|
||||||
|
|
||||||
|
uint32_t LogBlockNbr; /*!< Specifies the Card logical Capacity in blocks */
|
||||||
|
|
||||||
|
uint32_t LogBlockSize; /*!< Specifies logical block size in bytes */
|
||||||
|
|
||||||
|
}HAL_SD_CardInfoTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SD handle Structure definition
|
||||||
|
*/
|
||||||
|
#if defined (USE_HAL_SD_REGISTER_CALLBACKS) && (USE_HAL_SD_REGISTER_CALLBACKS == 1U)
|
||||||
|
typedef struct __SD_HandleTypeDef
|
||||||
|
#else
|
||||||
|
typedef struct
|
||||||
|
#endif /* USE_HAL_SD_REGISTER_CALLBACKS */
|
||||||
|
{
|
||||||
|
SD_TypeDef *Instance; /*!< SD registers base address */
|
||||||
|
|
||||||
|
SD_InitTypeDef Init; /*!< SD required parameters */
|
||||||
|
|
||||||
|
HAL_LockTypeDef Lock; /*!< SD locking object */
|
||||||
|
|
||||||
|
uint8_t *pTxBuffPtr; /*!< Pointer to SD Tx transfer Buffer */
|
||||||
|
|
||||||
|
uint32_t TxXferSize; /*!< SD Tx Transfer size */
|
||||||
|
|
||||||
|
uint8_t *pRxBuffPtr; /*!< Pointer to SD Rx transfer Buffer */
|
||||||
|
|
||||||
|
uint32_t RxXferSize; /*!< SD Rx Transfer size */
|
||||||
|
|
||||||
|
__IO uint32_t Context; /*!< SD transfer context */
|
||||||
|
|
||||||
|
__IO HAL_SD_StateTypeDef State; /*!< SD card State */
|
||||||
|
|
||||||
|
__IO uint32_t ErrorCode; /*!< SD Card Error codes */
|
||||||
|
|
||||||
|
DMA_HandleTypeDef *hdmatx; /*!< SD Tx DMA handle parameters */
|
||||||
|
|
||||||
|
DMA_HandleTypeDef *hdmarx; /*!< SD Rx DMA handle parameters */
|
||||||
|
|
||||||
|
HAL_SD_CardInfoTypeDef SdCard; /*!< SD Card information */
|
||||||
|
|
||||||
|
uint32_t CSD[4]; /*!< SD card specific data table */
|
||||||
|
|
||||||
|
uint32_t CID[4]; /*!< SD card identification number table */
|
||||||
|
|
||||||
|
#if defined (USE_HAL_SD_REGISTER_CALLBACKS) && (USE_HAL_SD_REGISTER_CALLBACKS == 1U)
|
||||||
|
void (* TxCpltCallback) (struct __SD_HandleTypeDef *hsd);
|
||||||
|
void (* RxCpltCallback) (struct __SD_HandleTypeDef *hsd);
|
||||||
|
void (* ErrorCallback) (struct __SD_HandleTypeDef *hsd);
|
||||||
|
void (* AbortCpltCallback) (struct __SD_HandleTypeDef *hsd);
|
||||||
|
|
||||||
|
void (* MspInitCallback) (struct __SD_HandleTypeDef *hsd);
|
||||||
|
void (* MspDeInitCallback) (struct __SD_HandleTypeDef *hsd);
|
||||||
|
#endif /* USE_HAL_SD_REGISTER_CALLBACKS */
|
||||||
|
}SD_HandleTypeDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Types_Group4 Card Specific Data: CSD Register
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__IO uint8_t CSDStruct; /*!< CSD structure */
|
||||||
|
__IO uint8_t SysSpecVersion; /*!< System specification version */
|
||||||
|
__IO uint8_t Reserved1; /*!< Reserved */
|
||||||
|
__IO uint8_t TAAC; /*!< Data read access time 1 */
|
||||||
|
__IO uint8_t NSAC; /*!< Data read access time 2 in CLK cycles */
|
||||||
|
__IO uint8_t MaxBusClkFrec; /*!< Max. bus clock frequency */
|
||||||
|
__IO uint16_t CardComdClasses; /*!< Card command classes */
|
||||||
|
__IO uint8_t RdBlockLen; /*!< Max. read data block length */
|
||||||
|
__IO uint8_t PartBlockRead; /*!< Partial blocks for read allowed */
|
||||||
|
__IO uint8_t WrBlockMisalign; /*!< Write block misalignment */
|
||||||
|
__IO uint8_t RdBlockMisalign; /*!< Read block misalignment */
|
||||||
|
__IO uint8_t DSRImpl; /*!< DSR implemented */
|
||||||
|
__IO uint8_t Reserved2; /*!< Reserved */
|
||||||
|
__IO uint32_t DeviceSize; /*!< Device Size */
|
||||||
|
__IO uint8_t MaxRdCurrentVDDMin; /*!< Max. read current @ VDD min */
|
||||||
|
__IO uint8_t MaxRdCurrentVDDMax; /*!< Max. read current @ VDD max */
|
||||||
|
__IO uint8_t MaxWrCurrentVDDMin; /*!< Max. write current @ VDD min */
|
||||||
|
__IO uint8_t MaxWrCurrentVDDMax; /*!< Max. write current @ VDD max */
|
||||||
|
__IO uint8_t DeviceSizeMul; /*!< Device size multiplier */
|
||||||
|
__IO uint8_t EraseGrSize; /*!< Erase group size */
|
||||||
|
__IO uint8_t EraseGrMul; /*!< Erase group size multiplier */
|
||||||
|
__IO uint8_t WrProtectGrSize; /*!< Write protect group size */
|
||||||
|
__IO uint8_t WrProtectGrEnable; /*!< Write protect group enable */
|
||||||
|
__IO uint8_t ManDeflECC; /*!< Manufacturer default ECC */
|
||||||
|
__IO uint8_t WrSpeedFact; /*!< Write speed factor */
|
||||||
|
__IO uint8_t MaxWrBlockLen; /*!< Max. write data block length */
|
||||||
|
__IO uint8_t WriteBlockPaPartial; /*!< Partial blocks for write allowed */
|
||||||
|
__IO uint8_t Reserved3; /*!< Reserved */
|
||||||
|
__IO uint8_t ContentProtectAppli; /*!< Content protection application */
|
||||||
|
__IO uint8_t FileFormatGroup; /*!< File format group */
|
||||||
|
__IO uint8_t CopyFlag; /*!< Copy flag (OTP) */
|
||||||
|
__IO uint8_t PermWrProtect; /*!< Permanent write protection */
|
||||||
|
__IO uint8_t TempWrProtect; /*!< Temporary write protection */
|
||||||
|
__IO uint8_t FileFormat; /*!< File format */
|
||||||
|
__IO uint8_t ECC; /*!< ECC code */
|
||||||
|
__IO uint8_t CSD_CRC; /*!< CSD CRC */
|
||||||
|
__IO uint8_t Reserved4; /*!< Always 1 */
|
||||||
|
}HAL_SD_CardCSDTypeDef;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Types_Group5 Card Identification Data: CID Register
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__IO uint8_t ManufacturerID; /*!< Manufacturer ID */
|
||||||
|
__IO uint16_t OEM_AppliID; /*!< OEM/Application ID */
|
||||||
|
__IO uint32_t ProdName1; /*!< Product Name part1 */
|
||||||
|
__IO uint8_t ProdName2; /*!< Product Name part2 */
|
||||||
|
__IO uint8_t ProdRev; /*!< Product Revision */
|
||||||
|
__IO uint32_t ProdSN; /*!< Product Serial Number */
|
||||||
|
__IO uint8_t Reserved1; /*!< Reserved1 */
|
||||||
|
__IO uint16_t ManufactDate; /*!< Manufacturing Date */
|
||||||
|
__IO uint8_t CID_CRC; /*!< CID CRC */
|
||||||
|
__IO uint8_t Reserved2; /*!< Always 1 */
|
||||||
|
|
||||||
|
}HAL_SD_CardCIDTypeDef;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Types_Group6 SD Card Status returned by ACMD13
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__IO uint8_t DataBusWidth; /*!< Shows the currently defined data bus width */
|
||||||
|
__IO uint8_t SecuredMode; /*!< Card is in secured mode of operation */
|
||||||
|
__IO uint16_t CardType; /*!< Carries information about card type */
|
||||||
|
__IO uint32_t ProtectedAreaSize; /*!< Carries information about the capacity of protected area */
|
||||||
|
__IO uint8_t SpeedClass; /*!< Carries information about the speed class of the card */
|
||||||
|
__IO uint8_t PerformanceMove; /*!< Carries information about the card's performance move */
|
||||||
|
__IO uint8_t AllocationUnitSize; /*!< Carries information about the card's allocation unit size */
|
||||||
|
__IO uint16_t EraseSize; /*!< Determines the number of AUs to be erased in one operation */
|
||||||
|
__IO uint8_t EraseTimeout; /*!< Determines the timeout for any number of AU erase */
|
||||||
|
__IO uint8_t EraseOffset; /*!< Carries information about the erase offset */
|
||||||
|
|
||||||
|
}HAL_SD_CardStatusTypeDef;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined (USE_HAL_SD_REGISTER_CALLBACKS) && (USE_HAL_SD_REGISTER_CALLBACKS == 1U)
|
||||||
|
/** @defgroup SD_Exported_Types_Group7 SD Callback ID enumeration definition
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
HAL_SD_TX_CPLT_CB_ID = 0x00U, /*!< SD Tx Complete Callback ID */
|
||||||
|
HAL_SD_RX_CPLT_CB_ID = 0x01U, /*!< SD Rx Complete Callback ID */
|
||||||
|
HAL_SD_ERROR_CB_ID = 0x02U, /*!< SD Error Callback ID */
|
||||||
|
HAL_SD_ABORT_CB_ID = 0x03U, /*!< SD Abort Callback ID */
|
||||||
|
|
||||||
|
HAL_SD_MSP_INIT_CB_ID = 0x10U, /*!< SD MspInit Callback ID */
|
||||||
|
HAL_SD_MSP_DEINIT_CB_ID = 0x11U /*!< SD MspDeInit Callback ID */
|
||||||
|
}HAL_SD_CallbackIDTypeDef;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Types_Group8 SD Callback pointer definition
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
typedef void (*pSD_CallbackTypeDef) (SD_HandleTypeDef *hsd);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
#endif /* USE_HAL_SD_REGISTER_CALLBACKS */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Exported constants --------------------------------------------------------*/
|
||||||
|
/** @defgroup SD_Exported_Constants Exported Constants
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BLOCKSIZE 512U /*!< Block size is 512 bytes */
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Constansts_Group1 SD Error status enumeration Structure definition
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define HAL_SD_ERROR_NONE SDMMC_ERROR_NONE /*!< No error */
|
||||||
|
#define HAL_SD_ERROR_CMD_CRC_FAIL SDMMC_ERROR_CMD_CRC_FAIL /*!< Command response received (but CRC check failed) */
|
||||||
|
#define HAL_SD_ERROR_DATA_CRC_FAIL SDMMC_ERROR_DATA_CRC_FAIL /*!< Data block sent/received (CRC check failed) */
|
||||||
|
#define HAL_SD_ERROR_CMD_RSP_TIMEOUT SDMMC_ERROR_CMD_RSP_TIMEOUT /*!< Command response timeout */
|
||||||
|
#define HAL_SD_ERROR_DATA_TIMEOUT SDMMC_ERROR_DATA_TIMEOUT /*!< Data timeout */
|
||||||
|
#define HAL_SD_ERROR_TX_UNDERRUN SDMMC_ERROR_TX_UNDERRUN /*!< Transmit FIFO underrun */
|
||||||
|
#define HAL_SD_ERROR_RX_OVERRUN SDMMC_ERROR_RX_OVERRUN /*!< Receive FIFO overrun */
|
||||||
|
#define HAL_SD_ERROR_ADDR_MISALIGNED SDMMC_ERROR_ADDR_MISALIGNED /*!< Misaligned address */
|
||||||
|
#define HAL_SD_ERROR_BLOCK_LEN_ERR SDMMC_ERROR_BLOCK_LEN_ERR /*!< Transferred block length is not allowed for the card or the
|
||||||
|
number of transferred bytes does not match the block length */
|
||||||
|
#define HAL_SD_ERROR_ERASE_SEQ_ERR SDMMC_ERROR_ERASE_SEQ_ERR /*!< An error in the sequence of erase command occurs */
|
||||||
|
#define HAL_SD_ERROR_BAD_ERASE_PARAM SDMMC_ERROR_BAD_ERASE_PARAM /*!< An invalid selection for erase groups */
|
||||||
|
#define HAL_SD_ERROR_WRITE_PROT_VIOLATION SDMMC_ERROR_WRITE_PROT_VIOLATION /*!< Attempt to program a write protect block */
|
||||||
|
#define HAL_SD_ERROR_LOCK_UNLOCK_FAILED SDMMC_ERROR_LOCK_UNLOCK_FAILED /*!< Sequence or password error has been detected in unlock
|
||||||
|
command or if there was an attempt to access a locked card */
|
||||||
|
#define HAL_SD_ERROR_COM_CRC_FAILED SDMMC_ERROR_COM_CRC_FAILED /*!< CRC check of the previous command failed */
|
||||||
|
#define HAL_SD_ERROR_ILLEGAL_CMD SDMMC_ERROR_ILLEGAL_CMD /*!< Command is not legal for the card state */
|
||||||
|
#define HAL_SD_ERROR_CARD_ECC_FAILED SDMMC_ERROR_CARD_ECC_FAILED /*!< Card internal ECC was applied but failed to correct the data */
|
||||||
|
#define HAL_SD_ERROR_CC_ERR SDMMC_ERROR_CC_ERR /*!< Internal card controller error */
|
||||||
|
#define HAL_SD_ERROR_GENERAL_UNKNOWN_ERR SDMMC_ERROR_GENERAL_UNKNOWN_ERR /*!< General or unknown error */
|
||||||
|
#define HAL_SD_ERROR_STREAM_READ_UNDERRUN SDMMC_ERROR_STREAM_READ_UNDERRUN /*!< The card could not sustain data reading in stream rmode */
|
||||||
|
#define HAL_SD_ERROR_STREAM_WRITE_OVERRUN SDMMC_ERROR_STREAM_WRITE_OVERRUN /*!< The card could not sustain data programming in stream mode */
|
||||||
|
#define HAL_SD_ERROR_CID_CSD_OVERWRITE SDMMC_ERROR_CID_CSD_OVERWRITE /*!< CID/CSD overwrite error */
|
||||||
|
#define HAL_SD_ERROR_WP_ERASE_SKIP SDMMC_ERROR_WP_ERASE_SKIP /*!< Only partial address space was erased */
|
||||||
|
#define HAL_SD_ERROR_CARD_ECC_DISABLED SDMMC_ERROR_CARD_ECC_DISABLED /*!< Command has been executed without using internal ECC */
|
||||||
|
#define HAL_SD_ERROR_ERASE_RESET SDMMC_ERROR_ERASE_RESET /*!< Erase sequence was cleared before executing because an out
|
||||||
|
of erase sequence command was received */
|
||||||
|
#define HAL_SD_ERROR_AKE_SEQ_ERR SDMMC_ERROR_AKE_SEQ_ERR /*!< Error in sequence of authentication */
|
||||||
|
#define HAL_SD_ERROR_INVALID_VOLTRANGE SDMMC_ERROR_INVALID_VOLTRANGE /*!< Error in case of invalid voltage range */
|
||||||
|
#define HAL_SD_ERROR_ADDR_OUT_OF_RANGE SDMMC_ERROR_ADDR_OUT_OF_RANGE /*!< Error when addressed block is out of range */
|
||||||
|
#define HAL_SD_ERROR_REQUEST_NOT_APPLICABLE SDMMC_ERROR_REQUEST_NOT_APPLICABLE /*!< Error when command request is not applicable */
|
||||||
|
#define HAL_SD_ERROR_PARAM SDMMC_ERROR_INVALID_PARAMETER /*!< the used parameter is not valid */
|
||||||
|
#define HAL_SD_ERROR_UNSUPPORTED_FEATURE SDMMC_ERROR_UNSUPPORTED_FEATURE /*!< Error when feature is not insupported */
|
||||||
|
#define HAL_SD_ERROR_BUSY SDMMC_ERROR_BUSY /*!< Error when transfer process is busy */
|
||||||
|
#define HAL_SD_ERROR_DMA SDMMC_ERROR_DMA /*!< Error while DMA transfer */
|
||||||
|
#define HAL_SD_ERROR_TIMEOUT SDMMC_ERROR_TIMEOUT /*!< Timeout error */
|
||||||
|
|
||||||
|
#if defined (USE_HAL_SD_REGISTER_CALLBACKS) && (USE_HAL_SD_REGISTER_CALLBACKS == 1U)
|
||||||
|
#define HAL_SD_ERROR_INVALID_CALLBACK SDMMC_ERROR_INVALID_PARAMETER /*!< Invalid callback error */
|
||||||
|
#endif /* USE_HAL_SD_REGISTER_CALLBACKS */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Constansts_Group2 SD context enumeration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define SD_CONTEXT_NONE 0x00000000U /*!< None */
|
||||||
|
#define SD_CONTEXT_READ_SINGLE_BLOCK 0x00000001U /*!< Read single block operation */
|
||||||
|
#define SD_CONTEXT_READ_MULTIPLE_BLOCK 0x00000002U /*!< Read multiple blocks operation */
|
||||||
|
#define SD_CONTEXT_WRITE_SINGLE_BLOCK 0x00000010U /*!< Write single block operation */
|
||||||
|
#define SD_CONTEXT_WRITE_MULTIPLE_BLOCK 0x00000020U /*!< Write multiple blocks operation */
|
||||||
|
#define SD_CONTEXT_IT 0x00000008U /*!< Process in Interrupt mode */
|
||||||
|
#define SD_CONTEXT_DMA 0x00000080U /*!< Process in DMA mode */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Constansts_Group3 SD Supported Memory Cards
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define CARD_SDSC 0x00000000U /*!< SD Standard Capacity <2Go */
|
||||||
|
#define CARD_SDHC_SDXC 0x00000001U /*!< SD High Capacity <32Go, SD Extended Capacity <2To */
|
||||||
|
#define CARD_SECURED 0x00000003U
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Constansts_Group4 SD Supported Version
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define CARD_V1_X 0x00000000U
|
||||||
|
#define CARD_V2_X 0x00000001U
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
|
/** @defgroup SD_Exported_macros SD Exported Macros
|
||||||
|
* @brief macros to handle interrupts and specific clock configurations
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/** @brief Reset SD handle state.
|
||||||
|
* @param __HANDLE__ : SD handle.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#if defined (USE_HAL_SD_REGISTER_CALLBACKS) && (USE_HAL_SD_REGISTER_CALLBACKS == 1U)
|
||||||
|
#define __HAL_SD_RESET_HANDLE_STATE(__HANDLE__) do { \
|
||||||
|
(__HANDLE__)->State = HAL_SD_STATE_RESET; \
|
||||||
|
(__HANDLE__)->MspInitCallback = NULL; \
|
||||||
|
(__HANDLE__)->MspDeInitCallback = NULL; \
|
||||||
|
} while(0)
|
||||||
|
#else
|
||||||
|
#define __HAL_SD_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SD_STATE_RESET)
|
||||||
|
#endif /* USE_HAL_SD_REGISTER_CALLBACKS */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enable the SD device.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_SD_ENABLE(__HANDLE__) __SDIO_ENABLE((__HANDLE__)->Instance)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disable the SD device.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_SD_DISABLE(__HANDLE__) __SDIO_DISABLE((__HANDLE__)->Instance)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enable the SDMMC DMA transfer.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_SD_DMA_ENABLE(__HANDLE__) __SDIO_DMA_ENABLE((__HANDLE__)->Instance)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disable the SDMMC DMA transfer.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_SD_DMA_DISABLE(__HANDLE__) __SDIO_DMA_DISABLE((__HANDLE__)->Instance)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enable the SD device interrupt.
|
||||||
|
* @param __HANDLE__: SD Handle
|
||||||
|
* @param __INTERRUPT__: specifies the SDMMC interrupt sources to be enabled.
|
||||||
|
* This parameter can be one or a combination of the following values:
|
||||||
|
* @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt
|
||||||
|
* @arg SDIO_IT_DTIMEOUT: Data timeout interrupt
|
||||||
|
* @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt
|
||||||
|
* @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt
|
||||||
|
* @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt
|
||||||
|
* @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt
|
||||||
|
* @arg SDIO_IT_DATAEND: Data end (data counter, DATACOUNT, is zero) interrupt
|
||||||
|
* @arg SDIO_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
|
||||||
|
* @arg SDIO_IT_CMDACT: Command transfer in progress interrupt
|
||||||
|
* @arg SDIO_IT_TXACT: Data transmit in progress interrupt
|
||||||
|
* @arg SDIO_IT_RXACT: Data receive in progress interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOHF: Receive FIFO Half Full interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOF: Transmit FIFO full interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOF: Receive FIFO full interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOE: Transmit FIFO empty interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOE: Receive FIFO empty interrupt
|
||||||
|
* @arg SDIO_IT_TXDAVL: Data available in transmit FIFO interrupt
|
||||||
|
* @arg SDIO_IT_RXDAVL: Data available in receive FIFO interrupt
|
||||||
|
* @arg SDIO_IT_SDIOIT: SDIO interrupt received interrupt
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_SD_ENABLE_IT(__HANDLE__, __INTERRUPT__) __SDIO_ENABLE_IT((__HANDLE__)->Instance, (__INTERRUPT__))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disable the SD device interrupt.
|
||||||
|
* @param __HANDLE__: SD Handle
|
||||||
|
* @param __INTERRUPT__: specifies the SDMMC interrupt sources to be disabled.
|
||||||
|
* This parameter can be one or a combination of the following values:
|
||||||
|
* @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt
|
||||||
|
* @arg SDIO_IT_DTIMEOUT: Data timeout interrupt
|
||||||
|
* @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt
|
||||||
|
* @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt
|
||||||
|
* @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt
|
||||||
|
* @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt
|
||||||
|
* @arg SDIO_IT_DATAEND: Data end (data counter, DATACOUNT, is zero) interrupt
|
||||||
|
* @arg SDIO_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
|
||||||
|
* @arg SDIO_IT_CMDACT: Command transfer in progress interrupt
|
||||||
|
* @arg SDIO_IT_TXACT: Data transmit in progress interrupt
|
||||||
|
* @arg SDIO_IT_RXACT: Data receive in progress interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOHF: Receive FIFO Half Full interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOF: Transmit FIFO full interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOF: Receive FIFO full interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOE: Transmit FIFO empty interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOE: Receive FIFO empty interrupt
|
||||||
|
* @arg SDIO_IT_TXDAVL: Data available in transmit FIFO interrupt
|
||||||
|
* @arg SDIO_IT_RXDAVL: Data available in receive FIFO interrupt
|
||||||
|
* @arg SDIO_IT_SDIOIT: SDIO interrupt received interrupt
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_SD_DISABLE_IT(__HANDLE__, __INTERRUPT__) __SDIO_DISABLE_IT((__HANDLE__)->Instance, (__INTERRUPT__))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Check whether the specified SD flag is set or not.
|
||||||
|
* @param __HANDLE__: SD Handle
|
||||||
|
* @param __FLAG__: specifies the flag to check.
|
||||||
|
* This parameter can be one of the following values:
|
||||||
|
* @arg SDIO_FLAG_CCRCFAIL: Command response received (CRC check failed)
|
||||||
|
* @arg SDIO_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)
|
||||||
|
* @arg SDIO_FLAG_CTIMEOUT: Command response timeout
|
||||||
|
* @arg SDIO_FLAG_DTIMEOUT: Data timeout
|
||||||
|
* @arg SDIO_FLAG_TXUNDERR: Transmit FIFO underrun error
|
||||||
|
* @arg SDIO_FLAG_RXOVERR: Received FIFO overrun error
|
||||||
|
* @arg SDIO_FLAG_CMDREND: Command response received (CRC check passed)
|
||||||
|
* @arg SDIO_FLAG_CMDSENT: Command sent (no response required)
|
||||||
|
* @arg SDIO_FLAG_DATAEND: Data end (data counter, DATACOUNT, is zero)
|
||||||
|
* @arg SDIO_FLAG_DBCKEND: Data block sent/received (CRC check passed)
|
||||||
|
* @arg SDIO_FLAG_CMDACT: Command transfer in progress
|
||||||
|
* @arg SDIO_FLAG_TXACT: Data transmit in progress
|
||||||
|
* @arg SDIO_FLAG_RXACT: Data receive in progress
|
||||||
|
* @arg SDIO_FLAG_TXFIFOHE: Transmit FIFO Half Empty
|
||||||
|
* @arg SDIO_FLAG_RXFIFOHF: Receive FIFO Half Full
|
||||||
|
* @arg SDIO_FLAG_TXFIFOF: Transmit FIFO full
|
||||||
|
* @arg SDIO_FLAG_RXFIFOF: Receive FIFO full
|
||||||
|
* @arg SDIO_FLAG_TXFIFOE: Transmit FIFO empty
|
||||||
|
* @arg SDIO_FLAG_RXFIFOE: Receive FIFO empty
|
||||||
|
* @arg SDIO_FLAG_TXDAVL: Data available in transmit FIFO
|
||||||
|
* @arg SDIO_FLAG_RXDAVL: Data available in receive FIFO
|
||||||
|
* @arg SDIO_FLAG_SDIOIT: SDIO interrupt received
|
||||||
|
* @retval The new state of SD FLAG (SET or RESET).
|
||||||
|
*/
|
||||||
|
#define __HAL_SD_GET_FLAG(__HANDLE__, __FLAG__) __SDIO_GET_FLAG((__HANDLE__)->Instance, (__FLAG__))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Clear the SD's pending flags.
|
||||||
|
* @param __HANDLE__: SD Handle
|
||||||
|
* @param __FLAG__: specifies the flag to clear.
|
||||||
|
* This parameter can be one or a combination of the following values:
|
||||||
|
* @arg SDIO_FLAG_CCRCFAIL: Command response received (CRC check failed)
|
||||||
|
* @arg SDIO_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)
|
||||||
|
* @arg SDIO_FLAG_CTIMEOUT: Command response timeout
|
||||||
|
* @arg SDIO_FLAG_DTIMEOUT: Data timeout
|
||||||
|
* @arg SDIO_FLAG_TXUNDERR: Transmit FIFO underrun error
|
||||||
|
* @arg SDIO_FLAG_RXOVERR: Received FIFO overrun error
|
||||||
|
* @arg SDIO_FLAG_CMDREND: Command response received (CRC check passed)
|
||||||
|
* @arg SDIO_FLAG_CMDSENT: Command sent (no response required)
|
||||||
|
* @arg SDIO_FLAG_DATAEND: Data end (data counter, DATACOUNT, is zero)
|
||||||
|
* @arg SDIO_FLAG_DBCKEND: Data block sent/received (CRC check passed)
|
||||||
|
* @arg SDIO_FLAG_SDIOIT: SDIO interrupt received
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_SD_CLEAR_FLAG(__HANDLE__, __FLAG__) __SDIO_CLEAR_FLAG((__HANDLE__)->Instance, (__FLAG__))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Check whether the specified SD interrupt has occurred or not.
|
||||||
|
* @param __HANDLE__: SD Handle
|
||||||
|
* @param __INTERRUPT__: specifies the SDMMC interrupt source to check.
|
||||||
|
* This parameter can be one of the following values:
|
||||||
|
* @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt
|
||||||
|
* @arg SDIO_IT_DTIMEOUT: Data timeout interrupt
|
||||||
|
* @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt
|
||||||
|
* @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt
|
||||||
|
* @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt
|
||||||
|
* @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt
|
||||||
|
* @arg SDIO_IT_DATAEND: Data end (data counter, DATACOUNT, is zero) interrupt
|
||||||
|
* @arg SDIO_IT_DBCKEND: Data block sent/received (CRC check passed) interrupt
|
||||||
|
* @arg SDIO_IT_CMDACT: Command transfer in progress interrupt
|
||||||
|
* @arg SDIO_IT_TXACT: Data transmit in progress interrupt
|
||||||
|
* @arg SDIO_IT_RXACT: Data receive in progress interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOHF: Receive FIFO Half Full interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOF: Transmit FIFO full interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOF: Receive FIFO full interrupt
|
||||||
|
* @arg SDIO_IT_TXFIFOE: Transmit FIFO empty interrupt
|
||||||
|
* @arg SDIO_IT_RXFIFOE: Receive FIFO empty interrupt
|
||||||
|
* @arg SDIO_IT_TXDAVL: Data available in transmit FIFO interrupt
|
||||||
|
* @arg SDIO_IT_RXDAVL: Data available in receive FIFO interrupt
|
||||||
|
* @arg SDIO_IT_SDIOIT: SDIO interrupt received interrupt
|
||||||
|
* @retval The new state of SD IT (SET or RESET).
|
||||||
|
*/
|
||||||
|
#define __HAL_SD_GET_IT(__HANDLE__, __INTERRUPT__) __SDIO_GET_IT((__HANDLE__)->Instance, (__INTERRUPT__))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Clear the SD's interrupt pending bits.
|
||||||
|
* @param __HANDLE__: SD Handle
|
||||||
|
* @param __INTERRUPT__: specifies the interrupt pending bit to clear.
|
||||||
|
* This parameter can be one or a combination of the following values:
|
||||||
|
* @arg SDIO_IT_CCRCFAIL: Command response received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt
|
||||||
|
* @arg SDIO_IT_CTIMEOUT: Command response timeout interrupt
|
||||||
|
* @arg SDIO_IT_DTIMEOUT: Data timeout interrupt
|
||||||
|
* @arg SDIO_IT_TXUNDERR: Transmit FIFO underrun error interrupt
|
||||||
|
* @arg SDIO_IT_RXOVERR: Received FIFO overrun error interrupt
|
||||||
|
* @arg SDIO_IT_CMDREND: Command response received (CRC check passed) interrupt
|
||||||
|
* @arg SDIO_IT_CMDSENT: Command sent (no response required) interrupt
|
||||||
|
* @arg SDIO_IT_DATAEND: Data end (data counter, DATACOUNT, is zero) interrupt
|
||||||
|
* @arg SDIO_IT_SDIOIT: SDIO interrupt received interrupt
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define __HAL_SD_CLEAR_IT(__HANDLE__, __INTERRUPT__) __SDIO_CLEAR_IT((__HANDLE__)->Instance, (__INTERRUPT__))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Exported functions --------------------------------------------------------*/
|
||||||
|
/** @defgroup SD_Exported_Functions SD Exported Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Functions_Group1 Initialization and de-initialization functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
HAL_StatusTypeDef HAL_SD_Init(SD_HandleTypeDef *hsd);
|
||||||
|
HAL_StatusTypeDef HAL_SD_InitCard(SD_HandleTypeDef *hsd);
|
||||||
|
HAL_StatusTypeDef HAL_SD_DeInit (SD_HandleTypeDef *hsd);
|
||||||
|
void HAL_SD_MspInit(SD_HandleTypeDef *hsd);
|
||||||
|
void HAL_SD_MspDeInit(SD_HandleTypeDef *hsd);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Functions_Group2 Input and Output operation functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* Blocking mode: Polling */
|
||||||
|
HAL_StatusTypeDef HAL_SD_ReadBlocks(SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks, uint32_t Timeout);
|
||||||
|
HAL_StatusTypeDef HAL_SD_WriteBlocks(SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks, uint32_t Timeout);
|
||||||
|
HAL_StatusTypeDef HAL_SD_Erase(SD_HandleTypeDef *hsd, uint32_t BlockStartAdd, uint32_t BlockEndAdd);
|
||||||
|
/* Non-Blocking mode: IT */
|
||||||
|
HAL_StatusTypeDef HAL_SD_ReadBlocks_IT(SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks);
|
||||||
|
HAL_StatusTypeDef HAL_SD_WriteBlocks_IT(SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks);
|
||||||
|
/* Non-Blocking mode: DMA */
|
||||||
|
HAL_StatusTypeDef HAL_SD_ReadBlocks_DMA(SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks);
|
||||||
|
HAL_StatusTypeDef HAL_SD_WriteBlocks_DMA(SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks);
|
||||||
|
|
||||||
|
void HAL_SD_IRQHandler(SD_HandleTypeDef *hsd);
|
||||||
|
|
||||||
|
/* Callback in non blocking modes (DMA) */
|
||||||
|
void HAL_SD_TxCpltCallback(SD_HandleTypeDef *hsd);
|
||||||
|
void HAL_SD_RxCpltCallback(SD_HandleTypeDef *hsd);
|
||||||
|
void HAL_SD_ErrorCallback(SD_HandleTypeDef *hsd);
|
||||||
|
void HAL_SD_AbortCallback(SD_HandleTypeDef *hsd);
|
||||||
|
|
||||||
|
#if defined (USE_HAL_SD_REGISTER_CALLBACKS) && (USE_HAL_SD_REGISTER_CALLBACKS == 1U)
|
||||||
|
/* SD callback registering/unregistering */
|
||||||
|
HAL_StatusTypeDef HAL_SD_RegisterCallback (SD_HandleTypeDef *hsd, HAL_SD_CallbackIDTypeDef CallbackId, pSD_CallbackTypeDef pCallback);
|
||||||
|
HAL_StatusTypeDef HAL_SD_UnRegisterCallback(SD_HandleTypeDef *hsd, HAL_SD_CallbackIDTypeDef CallbackId);
|
||||||
|
#endif /* USE_HAL_SD_REGISTER_CALLBACKS */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Functions_Group3 Peripheral Control functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
HAL_StatusTypeDef HAL_SD_ConfigWideBusOperation(SD_HandleTypeDef *hsd, uint32_t WideMode);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Functions_Group4 SD card related functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
HAL_StatusTypeDef HAL_SD_SendSDStatus(SD_HandleTypeDef *hsd, uint32_t *pSDstatus);
|
||||||
|
HAL_SD_CardStateTypeDef HAL_SD_GetCardState(SD_HandleTypeDef *hsd);
|
||||||
|
HAL_StatusTypeDef HAL_SD_GetCardCID(SD_HandleTypeDef *hsd, HAL_SD_CardCIDTypeDef *pCID);
|
||||||
|
HAL_StatusTypeDef HAL_SD_GetCardCSD(SD_HandleTypeDef *hsd, HAL_SD_CardCSDTypeDef *pCSD);
|
||||||
|
HAL_StatusTypeDef HAL_SD_GetCardStatus(SD_HandleTypeDef *hsd, HAL_SD_CardStatusTypeDef *pStatus);
|
||||||
|
HAL_StatusTypeDef HAL_SD_GetCardInfo(SD_HandleTypeDef *hsd, HAL_SD_CardInfoTypeDef *pCardInfo);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Functions_Group5 Peripheral State and Errors functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
HAL_SD_StateTypeDef HAL_SD_GetState(SD_HandleTypeDef *hsd);
|
||||||
|
uint32_t HAL_SD_GetError(SD_HandleTypeDef *hsd);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @defgroup SD_Exported_Functions_Group6 Perioheral Abort management
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
HAL_StatusTypeDef HAL_SD_Abort(SD_HandleTypeDef *hsd);
|
||||||
|
HAL_StatusTypeDef HAL_SD_Abort_IT(SD_HandleTypeDef *hsd);
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Private types -------------------------------------------------------------*/
|
||||||
|
/** @defgroup SD_Private_Types SD Private Types
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Private defines -----------------------------------------------------------*/
|
||||||
|
/** @defgroup SD_Private_Defines SD Private Defines
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Private variables ---------------------------------------------------------*/
|
||||||
|
/** @defgroup SD_Private_Variables SD Private Variables
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Private constants ---------------------------------------------------------*/
|
||||||
|
/** @defgroup SD_Private_Constants SD Private Constants
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Private macros ------------------------------------------------------------*/
|
||||||
|
/** @defgroup SD_Private_Macros SD Private Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Private functions prototypes ----------------------------------------------*/
|
||||||
|
/** @defgroup SD_Private_Functions_Prototypes SD Private Functions Prototypes
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Private functions ---------------------------------------------------------*/
|
||||||
|
/** @defgroup SD_Private_Functions SD Private Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#endif /* SDIO */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* STM32F4xx_HAL_SD_H */
|
||||||
|
|
@ -403,7 +403,6 @@ typedef enum
|
||||||
, HAL_TIM_PERIOD_ELAPSED_HALF_CB_ID = 0x0FU /*!< TIM Period Elapsed half complete Callback ID */
|
, HAL_TIM_PERIOD_ELAPSED_HALF_CB_ID = 0x0FU /*!< TIM Period Elapsed half complete Callback ID */
|
||||||
, HAL_TIM_TRIGGER_CB_ID = 0x10U /*!< TIM Trigger Callback ID */
|
, HAL_TIM_TRIGGER_CB_ID = 0x10U /*!< TIM Trigger Callback ID */
|
||||||
, HAL_TIM_TRIGGER_HALF_CB_ID = 0x11U /*!< TIM Trigger half complete Callback ID */
|
, HAL_TIM_TRIGGER_HALF_CB_ID = 0x11U /*!< TIM Trigger half complete Callback ID */
|
||||||
|
|
||||||
, HAL_TIM_IC_CAPTURE_CB_ID = 0x12U /*!< TIM Input Capture Callback ID */
|
, HAL_TIM_IC_CAPTURE_CB_ID = 0x12U /*!< TIM Input Capture Callback ID */
|
||||||
, HAL_TIM_IC_CAPTURE_HALF_CB_ID = 0x13U /*!< TIM Input Capture half complete Callback ID */
|
, HAL_TIM_IC_CAPTURE_HALF_CB_ID = 0x13U /*!< TIM Input Capture half complete Callback ID */
|
||||||
, HAL_TIM_OC_DELAY_ELAPSED_CB_ID = 0x14U /*!< TIM Output Compare Delay Elapsed Callback ID */
|
, HAL_TIM_OC_DELAY_ELAPSED_CB_ID = 0x14U /*!< TIM Output Compare Delay Elapsed Callback ID */
|
||||||
|
|
@ -1654,6 +1653,10 @@ typedef void (*pTIM_CallbackTypeDef)(TIM_HandleTypeDef *htim); /*!< pointer to
|
||||||
#define IS_TIM_OPM_CHANNELS(__CHANNEL__) (((__CHANNEL__) == TIM_CHANNEL_1) || \
|
#define IS_TIM_OPM_CHANNELS(__CHANNEL__) (((__CHANNEL__) == TIM_CHANNEL_1) || \
|
||||||
((__CHANNEL__) == TIM_CHANNEL_2))
|
((__CHANNEL__) == TIM_CHANNEL_2))
|
||||||
|
|
||||||
|
#define IS_TIM_PERIOD(__HANDLE__, __PERIOD__) ((IS_TIM_32B_COUNTER_INSTANCE(((__HANDLE__)->Instance)) == 0U) ? \
|
||||||
|
(((__PERIOD__) > 0U) && ((__PERIOD__) <= 0x0000FFFFU)) : \
|
||||||
|
((__PERIOD__) > 0U))
|
||||||
|
|
||||||
#define IS_TIM_COMPLEMENTARY_CHANNELS(__CHANNEL__) (((__CHANNEL__) == TIM_CHANNEL_1) || \
|
#define IS_TIM_COMPLEMENTARY_CHANNELS(__CHANNEL__) (((__CHANNEL__) == TIM_CHANNEL_1) || \
|
||||||
((__CHANNEL__) == TIM_CHANNEL_2) || \
|
((__CHANNEL__) == TIM_CHANNEL_2) || \
|
||||||
((__CHANNEL__) == TIM_CHANNEL_3))
|
((__CHANNEL__) == TIM_CHANNEL_3))
|
||||||
|
|
@ -1705,7 +1708,6 @@ typedef void (*pTIM_CallbackTypeDef)(TIM_HandleTypeDef *htim); /*!< pointer to
|
||||||
|
|
||||||
#define IS_TIM_BREAK_FILTER(__BRKFILTER__) ((__BRKFILTER__) <= 0xFUL)
|
#define IS_TIM_BREAK_FILTER(__BRKFILTER__) ((__BRKFILTER__) <= 0xFUL)
|
||||||
|
|
||||||
|
|
||||||
#define IS_TIM_BREAK_STATE(__STATE__) (((__STATE__) == TIM_BREAK_ENABLE) || \
|
#define IS_TIM_BREAK_STATE(__STATE__) (((__STATE__) == TIM_BREAK_ENABLE) || \
|
||||||
((__STATE__) == TIM_BREAK_DISABLE))
|
((__STATE__) == TIM_BREAK_DISABLE))
|
||||||
|
|
||||||
|
|
@ -1896,7 +1898,7 @@ HAL_StatusTypeDef HAL_TIM_Base_Stop(TIM_HandleTypeDef *htim);
|
||||||
HAL_StatusTypeDef HAL_TIM_Base_Start_IT(TIM_HandleTypeDef *htim);
|
HAL_StatusTypeDef HAL_TIM_Base_Start_IT(TIM_HandleTypeDef *htim);
|
||||||
HAL_StatusTypeDef HAL_TIM_Base_Stop_IT(TIM_HandleTypeDef *htim);
|
HAL_StatusTypeDef HAL_TIM_Base_Stop_IT(TIM_HandleTypeDef *htim);
|
||||||
/* Non-Blocking mode: DMA */
|
/* Non-Blocking mode: DMA */
|
||||||
HAL_StatusTypeDef HAL_TIM_Base_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pData, uint16_t Length);
|
HAL_StatusTypeDef HAL_TIM_Base_Start_DMA(TIM_HandleTypeDef *htim, const uint32_t *pData, uint16_t Length);
|
||||||
HAL_StatusTypeDef HAL_TIM_Base_Stop_DMA(TIM_HandleTypeDef *htim);
|
HAL_StatusTypeDef HAL_TIM_Base_Stop_DMA(TIM_HandleTypeDef *htim);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
@ -1918,7 +1920,8 @@ HAL_StatusTypeDef HAL_TIM_OC_Stop(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
HAL_StatusTypeDef HAL_TIM_OC_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIM_OC_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
HAL_StatusTypeDef HAL_TIM_OC_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIM_OC_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
/* Non-Blocking mode: DMA */
|
/* Non-Blocking mode: DMA */
|
||||||
HAL_StatusTypeDef HAL_TIM_OC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length);
|
HAL_StatusTypeDef HAL_TIM_OC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, const uint32_t *pData,
|
||||||
|
uint16_t Length);
|
||||||
HAL_StatusTypeDef HAL_TIM_OC_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIM_OC_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
@ -1940,7 +1943,8 @@ HAL_StatusTypeDef HAL_TIM_PWM_Stop(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
HAL_StatusTypeDef HAL_TIM_PWM_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIM_PWM_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
HAL_StatusTypeDef HAL_TIM_PWM_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIM_PWM_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
/* Non-Blocking mode: DMA */
|
/* Non-Blocking mode: DMA */
|
||||||
HAL_StatusTypeDef HAL_TIM_PWM_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length);
|
HAL_StatusTypeDef HAL_TIM_PWM_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, const uint32_t *pData,
|
||||||
|
uint16_t Length);
|
||||||
HAL_StatusTypeDef HAL_TIM_PWM_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIM_PWM_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
@ -1992,7 +1996,7 @@ HAL_StatusTypeDef HAL_TIM_OnePulse_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Out
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Timer Encoder functions ****************************************************/
|
/* Timer Encoder functions ****************************************************/
|
||||||
HAL_StatusTypeDef HAL_TIM_Encoder_Init(TIM_HandleTypeDef *htim, TIM_Encoder_InitTypeDef *sConfig);
|
HAL_StatusTypeDef HAL_TIM_Encoder_Init(TIM_HandleTypeDef *htim, const TIM_Encoder_InitTypeDef *sConfig);
|
||||||
HAL_StatusTypeDef HAL_TIM_Encoder_DeInit(TIM_HandleTypeDef *htim);
|
HAL_StatusTypeDef HAL_TIM_Encoder_DeInit(TIM_HandleTypeDef *htim);
|
||||||
void HAL_TIM_Encoder_MspInit(TIM_HandleTypeDef *htim);
|
void HAL_TIM_Encoder_MspInit(TIM_HandleTypeDef *htim);
|
||||||
void HAL_TIM_Encoder_MspDeInit(TIM_HandleTypeDef *htim);
|
void HAL_TIM_Encoder_MspDeInit(TIM_HandleTypeDef *htim);
|
||||||
|
|
@ -2025,21 +2029,26 @@ void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim);
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Control functions *********************************************************/
|
/* Control functions *********************************************************/
|
||||||
HAL_StatusTypeDef HAL_TIM_OC_ConfigChannel(TIM_HandleTypeDef *htim, TIM_OC_InitTypeDef *sConfig, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIM_OC_ConfigChannel(TIM_HandleTypeDef *htim, const TIM_OC_InitTypeDef *sConfig,
|
||||||
HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim, TIM_OC_InitTypeDef *sConfig, uint32_t Channel);
|
uint32_t Channel);
|
||||||
HAL_StatusTypeDef HAL_TIM_IC_ConfigChannel(TIM_HandleTypeDef *htim, TIM_IC_InitTypeDef *sConfig, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim, const TIM_OC_InitTypeDef *sConfig,
|
||||||
|
uint32_t Channel);
|
||||||
|
HAL_StatusTypeDef HAL_TIM_IC_ConfigChannel(TIM_HandleTypeDef *htim, const TIM_IC_InitTypeDef *sConfig,
|
||||||
|
uint32_t Channel);
|
||||||
HAL_StatusTypeDef HAL_TIM_OnePulse_ConfigChannel(TIM_HandleTypeDef *htim, TIM_OnePulse_InitTypeDef *sConfig,
|
HAL_StatusTypeDef HAL_TIM_OnePulse_ConfigChannel(TIM_HandleTypeDef *htim, TIM_OnePulse_InitTypeDef *sConfig,
|
||||||
uint32_t OutputChannel, uint32_t InputChannel);
|
uint32_t OutputChannel, uint32_t InputChannel);
|
||||||
HAL_StatusTypeDef HAL_TIM_ConfigOCrefClear(TIM_HandleTypeDef *htim, TIM_ClearInputConfigTypeDef *sClearInputConfig,
|
HAL_StatusTypeDef HAL_TIM_ConfigOCrefClear(TIM_HandleTypeDef *htim,
|
||||||
|
const TIM_ClearInputConfigTypeDef *sClearInputConfig,
|
||||||
uint32_t Channel);
|
uint32_t Channel);
|
||||||
HAL_StatusTypeDef HAL_TIM_ConfigClockSource(TIM_HandleTypeDef *htim, TIM_ClockConfigTypeDef *sClockSourceConfig);
|
HAL_StatusTypeDef HAL_TIM_ConfigClockSource(TIM_HandleTypeDef *htim, const TIM_ClockConfigTypeDef *sClockSourceConfig);
|
||||||
HAL_StatusTypeDef HAL_TIM_ConfigTI1Input(TIM_HandleTypeDef *htim, uint32_t TI1_Selection);
|
HAL_StatusTypeDef HAL_TIM_ConfigTI1Input(TIM_HandleTypeDef *htim, uint32_t TI1_Selection);
|
||||||
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro(TIM_HandleTypeDef *htim, TIM_SlaveConfigTypeDef *sSlaveConfig);
|
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro(TIM_HandleTypeDef *htim, const TIM_SlaveConfigTypeDef *sSlaveConfig);
|
||||||
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro_IT(TIM_HandleTypeDef *htim, TIM_SlaveConfigTypeDef *sSlaveConfig);
|
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro_IT(TIM_HandleTypeDef *htim, const TIM_SlaveConfigTypeDef *sSlaveConfig);
|
||||||
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, const uint32_t *BurstBuffer,
|
||||||
|
uint32_t BurstLength);
|
||||||
HAL_StatusTypeDef HAL_TIM_DMABurst_MultiWriteStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
|
HAL_StatusTypeDef HAL_TIM_DMABurst_MultiWriteStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
|
||||||
uint32_t BurstRequestSrc, uint32_t *BurstBuffer,
|
uint32_t BurstRequestSrc, const uint32_t *BurstBuffer,
|
||||||
uint32_t BurstLength, uint32_t DataLength);
|
uint32_t BurstLength, uint32_t DataLength);
|
||||||
HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStop(TIM_HandleTypeDef *htim, uint32_t BurstRequestSrc);
|
HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStop(TIM_HandleTypeDef *htim, uint32_t BurstRequestSrc);
|
||||||
HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
|
HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
|
||||||
|
|
@ -2049,7 +2058,7 @@ HAL_StatusTypeDef HAL_TIM_DMABurst_MultiReadStart(TIM_HandleTypeDef *htim, uint3
|
||||||
uint32_t BurstLength, uint32_t DataLength);
|
uint32_t BurstLength, uint32_t DataLength);
|
||||||
HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStop(TIM_HandleTypeDef *htim, uint32_t BurstRequestSrc);
|
HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStop(TIM_HandleTypeDef *htim, uint32_t BurstRequestSrc);
|
||||||
HAL_StatusTypeDef HAL_TIM_GenerateEvent(TIM_HandleTypeDef *htim, uint32_t EventSource);
|
HAL_StatusTypeDef HAL_TIM_GenerateEvent(TIM_HandleTypeDef *htim, uint32_t EventSource);
|
||||||
uint32_t HAL_TIM_ReadCapturedValue(TIM_HandleTypeDef *htim, uint32_t Channel);
|
uint32_t HAL_TIM_ReadCapturedValue(const TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -2086,17 +2095,17 @@ HAL_StatusTypeDef HAL_TIM_UnRegisterCallback(TIM_HandleTypeDef *htim, HAL_TIM_Ca
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Peripheral State functions ************************************************/
|
/* Peripheral State functions ************************************************/
|
||||||
HAL_TIM_StateTypeDef HAL_TIM_Base_GetState(TIM_HandleTypeDef *htim);
|
HAL_TIM_StateTypeDef HAL_TIM_Base_GetState(const TIM_HandleTypeDef *htim);
|
||||||
HAL_TIM_StateTypeDef HAL_TIM_OC_GetState(TIM_HandleTypeDef *htim);
|
HAL_TIM_StateTypeDef HAL_TIM_OC_GetState(const TIM_HandleTypeDef *htim);
|
||||||
HAL_TIM_StateTypeDef HAL_TIM_PWM_GetState(TIM_HandleTypeDef *htim);
|
HAL_TIM_StateTypeDef HAL_TIM_PWM_GetState(const TIM_HandleTypeDef *htim);
|
||||||
HAL_TIM_StateTypeDef HAL_TIM_IC_GetState(TIM_HandleTypeDef *htim);
|
HAL_TIM_StateTypeDef HAL_TIM_IC_GetState(const TIM_HandleTypeDef *htim);
|
||||||
HAL_TIM_StateTypeDef HAL_TIM_OnePulse_GetState(TIM_HandleTypeDef *htim);
|
HAL_TIM_StateTypeDef HAL_TIM_OnePulse_GetState(const TIM_HandleTypeDef *htim);
|
||||||
HAL_TIM_StateTypeDef HAL_TIM_Encoder_GetState(TIM_HandleTypeDef *htim);
|
HAL_TIM_StateTypeDef HAL_TIM_Encoder_GetState(const TIM_HandleTypeDef *htim);
|
||||||
|
|
||||||
/* Peripheral Channel state functions ************************************************/
|
/* Peripheral Channel state functions ************************************************/
|
||||||
HAL_TIM_ActiveChannel HAL_TIM_GetActiveChannel(TIM_HandleTypeDef *htim);
|
HAL_TIM_ActiveChannel HAL_TIM_GetActiveChannel(const TIM_HandleTypeDef *htim);
|
||||||
HAL_TIM_ChannelStateTypeDef HAL_TIM_GetChannelState(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_TIM_ChannelStateTypeDef HAL_TIM_GetChannelState(const TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
HAL_TIM_DMABurstStateTypeDef HAL_TIM_DMABurstState(TIM_HandleTypeDef *htim);
|
HAL_TIM_DMABurstStateTypeDef HAL_TIM_DMABurstState(const TIM_HandleTypeDef *htim);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -2110,9 +2119,9 @@ HAL_TIM_DMABurstStateTypeDef HAL_TIM_DMABurstState(TIM_HandleTypeDef *htim);
|
||||||
/** @defgroup TIM_Private_Functions TIM Private Functions
|
/** @defgroup TIM_Private_Functions TIM Private Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
void TIM_Base_SetConfig(TIM_TypeDef *TIMx, TIM_Base_InitTypeDef *Structure);
|
void TIM_Base_SetConfig(TIM_TypeDef *TIMx, const TIM_Base_InitTypeDef *Structure);
|
||||||
void TIM_TI1_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICSelection, uint32_t TIM_ICFilter);
|
void TIM_TI1_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICSelection, uint32_t TIM_ICFilter);
|
||||||
void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config);
|
void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config);
|
||||||
void TIM_ETR_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ExtTRGPrescaler,
|
void TIM_ETR_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ExtTRGPrescaler,
|
||||||
uint32_t TIM_ExtTRGPolarity, uint32_t ExtTRGFilter);
|
uint32_t TIM_ExtTRGPolarity, uint32_t ExtTRGFilter);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,9 +74,8 @@ typedef struct
|
||||||
#if defined (TIM2)
|
#if defined (TIM2)
|
||||||
#if defined(TIM8)
|
#if defined(TIM8)
|
||||||
#define TIM_TIM2_TIM8_TRGO 0x00000000U /*!< TIM2 ITR1 is connected to TIM8 TRGO */
|
#define TIM_TIM2_TIM8_TRGO 0x00000000U /*!< TIM2 ITR1 is connected to TIM8 TRGO */
|
||||||
#else
|
|
||||||
#define TIM_TIM2_ETH_PTP TIM_OR_ITR1_RMP_0 /*!< TIM2 ITR1 is connected to PTP trigger output */
|
|
||||||
#endif /* TIM8 */
|
#endif /* TIM8 */
|
||||||
|
#define TIM_TIM2_ETH_PTP TIM_OR_ITR1_RMP_0 /*!< TIM2 ITR1 is connected to PTP trigger output */
|
||||||
#define TIM_TIM2_USBFS_SOF TIM_OR_ITR1_RMP_1 /*!< TIM2 ITR1 is connected to OTG FS SOF */
|
#define TIM_TIM2_USBFS_SOF TIM_OR_ITR1_RMP_1 /*!< TIM2 ITR1 is connected to OTG FS SOF */
|
||||||
#define TIM_TIM2_USBHS_SOF (TIM_OR_ITR1_RMP_1 | TIM_OR_ITR1_RMP_0) /*!< TIM2 ITR1 is connected to OTG HS SOF */
|
#define TIM_TIM2_USBHS_SOF (TIM_OR_ITR1_RMP_1 | TIM_OR_ITR1_RMP_0) /*!< TIM2 ITR1 is connected to OTG HS SOF */
|
||||||
#endif /* TIM2 */
|
#endif /* TIM2 */
|
||||||
|
|
@ -205,7 +204,7 @@ typedef struct
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Timer Hall Sensor functions **********************************************/
|
/* Timer Hall Sensor functions **********************************************/
|
||||||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef *htim, TIM_HallSensor_InitTypeDef *sConfig);
|
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef *htim, const TIM_HallSensor_InitTypeDef *sConfig);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit(TIM_HandleTypeDef *htim);
|
HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit(TIM_HandleTypeDef *htim);
|
||||||
|
|
||||||
void HAL_TIMEx_HallSensor_MspInit(TIM_HandleTypeDef *htim);
|
void HAL_TIMEx_HallSensor_MspInit(TIM_HandleTypeDef *htim);
|
||||||
|
|
@ -238,7 +237,8 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Chann
|
||||||
HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
|
|
||||||
/* Non-Blocking mode: DMA */
|
/* Non-Blocking mode: DMA */
|
||||||
HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length);
|
HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, const uint32_t *pData,
|
||||||
|
uint16_t Length);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
@ -257,7 +257,8 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel)
|
||||||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
/* Non-Blocking mode: DMA */
|
/* Non-Blocking mode: DMA */
|
||||||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length);
|
HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, const uint32_t *pData,
|
||||||
|
uint16_t Length);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
@ -291,9 +292,9 @@ HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_IT(TIM_HandleTypeDef *htim, uint32
|
||||||
HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_DMA(TIM_HandleTypeDef *htim, uint32_t InputTrigger,
|
HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_DMA(TIM_HandleTypeDef *htim, uint32_t InputTrigger,
|
||||||
uint32_t CommutationSource);
|
uint32_t CommutationSource);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
|
HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
|
||||||
TIM_MasterConfigTypeDef *sMasterConfig);
|
const TIM_MasterConfigTypeDef *sMasterConfig);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim,
|
HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim,
|
||||||
TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig);
|
const TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap);
|
HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
@ -316,8 +317,8 @@ void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim);
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Extended Peripheral State functions ***************************************/
|
/* Extended Peripheral State functions ***************************************/
|
||||||
HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef *htim);
|
HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(const TIM_HandleTypeDef *htim);
|
||||||
HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(TIM_HandleTypeDef *htim, uint32_t ChannelN);
|
HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(const TIM_HandleTypeDef *htim, uint32_t ChannelN);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -371,6 +371,16 @@ __STATIC_INLINE void LL_LPM_DisableEventOnPend(void)
|
||||||
CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SEVONPEND_Msk));
|
CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SEVONPEND_Msk));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Clear pending events.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void LL_LPM_ClearEvent(void)
|
||||||
|
{
|
||||||
|
__SEV();
|
||||||
|
__WFE();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -586,7 +596,7 @@ __STATIC_INLINE void LL_MPU_ConfigRegion(uint32_t Region, uint32_t SubRegionDisa
|
||||||
/* Set base address */
|
/* Set base address */
|
||||||
WRITE_REG(MPU->RBAR, (Address & 0xFFFFFFE0U));
|
WRITE_REG(MPU->RBAR, (Address & 0xFFFFFFE0U));
|
||||||
/* Configure MPU */
|
/* Configure MPU */
|
||||||
WRITE_REG(MPU->RASR, (MPU_RASR_ENABLE_Msk | Attributes | SubRegionDisable << MPU_RASR_SRD_Pos));
|
WRITE_REG(MPU->RASR, (MPU_RASR_ENABLE_Msk | Attributes | (SubRegionDisable << MPU_RASR_SRD_Pos)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1171,7 +1171,7 @@ __STATIC_INLINE void LL_DMA_SetCurrentTargetMem(DMA_TypeDef *DMAx, uint32_t Stre
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set Current target (only in double buffer mode) to Memory 1 or Memory 0.
|
* @brief Get Current target (only in double buffer mode).
|
||||||
* @rmtoll CR CT LL_DMA_GetCurrentTargetMem
|
* @rmtoll CR CT LL_DMA_GetCurrentTargetMem
|
||||||
* @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:
|
||||||
|
|
|
||||||
|
|
@ -622,7 +622,7 @@ typedef struct
|
||||||
#define LL_RCC_SDIO_CLKSOURCE RCC_DCKCFGR2_SDIOSEL /*!< SDIO Clock source selection */
|
#define LL_RCC_SDIO_CLKSOURCE RCC_DCKCFGR2_SDIOSEL /*!< SDIO Clock source selection */
|
||||||
#else
|
#else
|
||||||
#define LL_RCC_SDIO_CLKSOURCE RCC_PLLCFGR_PLLQ /*!< SDIO Clock source selection */
|
#define LL_RCC_SDIO_CLKSOURCE RCC_PLLCFGR_PLLQ /*!< SDIO Clock source selection */
|
||||||
#endif
|
#endif /* RCC_DCKCFGR_SDIOSEL */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -2866,7 +2866,8 @@ typedef struct
|
||||||
* @arg @ref LL_RCC_SYSCLK_DIV_512
|
* @arg @ref LL_RCC_SYSCLK_DIV_512
|
||||||
* @retval HCLK clock frequency (in Hz)
|
* @retval HCLK clock frequency (in Hz)
|
||||||
*/
|
*/
|
||||||
#define __LL_RCC_CALC_HCLK_FREQ(__SYSCLKFREQ__, __AHBPRESCALER__) ((__SYSCLKFREQ__) >> AHBPrescTable[((__AHBPRESCALER__) & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos])
|
#define __LL_RCC_CALC_HCLK_FREQ(__SYSCLKFREQ__, __AHBPRESCALER__) ((__SYSCLKFREQ__) >> AHBPrescTable[((__AHBPRESCALER__) &\
|
||||||
|
RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos])
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Helper macro to calculate the PCLK1 frequency (ABP1)
|
* @brief Helper macro to calculate the PCLK1 frequency (ABP1)
|
||||||
|
|
@ -4819,7 +4820,8 @@ __STATIC_INLINE void LL_RCC_PLL_ConfigDomain_SPDIFRX(uint32_t Source, uint32_t P
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#if defined(RCC_DCKCFGR_PLLDIVR)
|
#if defined(RCC_DCKCFGR_PLLDIVR)
|
||||||
__STATIC_INLINE void LL_RCC_PLL_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR, uint32_t PLLDIVR)
|
__STATIC_INLINE void LL_RCC_PLL_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR,
|
||||||
|
uint32_t PLLDIVR)
|
||||||
#else
|
#else
|
||||||
__STATIC_INLINE void LL_RCC_PLL_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR)
|
__STATIC_INLINE void LL_RCC_PLL_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR)
|
||||||
#endif /* RCC_DCKCFGR_PLLDIVR */
|
#endif /* RCC_DCKCFGR_PLLDIVR */
|
||||||
|
|
@ -5334,7 +5336,8 @@ __STATIC_INLINE uint32_t LL_RCC_PLLI2S_IsReady(void)
|
||||||
* (*) value not defined in all devices.
|
* (*) value not defined in all devices.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void LL_RCC_PLLI2S_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLQ_R, uint32_t PLLDIVQ_R)
|
__STATIC_INLINE void LL_RCC_PLLI2S_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLQ_R,
|
||||||
|
uint32_t PLLDIVQ_R)
|
||||||
{
|
{
|
||||||
__IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&RCC->PLLCFGR) + (Source & 0x80U)));
|
__IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&RCC->PLLCFGR) + (Source & 0x80U)));
|
||||||
MODIFY_REG(*pReg, RCC_PLLCFGR_PLLSRC, (Source & (~0x80U)));
|
MODIFY_REG(*pReg, RCC_PLLCFGR_PLLSRC, (Source & (~0x80U)));
|
||||||
|
|
@ -6102,7 +6105,8 @@ __STATIC_INLINE uint32_t LL_RCC_PLLSAI_IsReady(void)
|
||||||
* @arg @ref LL_RCC_PLLSAIDIVQ_DIV_32
|
* @arg @ref LL_RCC_PLLSAIDIVQ_DIV_32
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void LL_RCC_PLLSAI_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLQ, uint32_t PLLDIVQ)
|
__STATIC_INLINE void LL_RCC_PLLSAI_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLQ,
|
||||||
|
uint32_t PLLDIVQ)
|
||||||
{
|
{
|
||||||
MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, Source);
|
MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, Source);
|
||||||
#if defined(RCC_PLLSAICFGR_PLLSAIM)
|
#if defined(RCC_PLLSAICFGR_PLLSAIM)
|
||||||
|
|
@ -6307,7 +6311,8 @@ __STATIC_INLINE void LL_RCC_PLLSAI_ConfigDomain_48M(uint32_t Source, uint32_t PL
|
||||||
* @arg @ref LL_RCC_PLLSAIDIVR_DIV_16
|
* @arg @ref LL_RCC_PLLSAIDIVR_DIV_16
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void LL_RCC_PLLSAI_ConfigDomain_LTDC(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR, uint32_t PLLDIVR)
|
__STATIC_INLINE void LL_RCC_PLLSAI_ConfigDomain_LTDC(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR,
|
||||||
|
uint32_t PLLDIVR)
|
||||||
{
|
{
|
||||||
MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM, Source | PLLM);
|
MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM, Source | PLLM);
|
||||||
MODIFY_REG(RCC->PLLSAICFGR, RCC_PLLSAICFGR_PLLSAIN | RCC_PLLSAICFGR_PLLSAIR, PLLN << RCC_PLLSAICFGR_PLLSAIN_Pos | PLLR);
|
MODIFY_REG(RCC->PLLSAICFGR, RCC_PLLSAICFGR_PLLSAIN | RCC_PLLSAICFGR_PLLSAIR, PLLN << RCC_PLLSAICFGR_PLLSAIN_Pos | PLLR);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2016 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
|
@ -1030,7 +1030,7 @@ __STATIC_INLINE void LL_RTC_TIME_SetFormat(RTC_TypeDef *RTCx, uint32_t TimeForma
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get time format (AM or PM notation)
|
* @brief Get time format (AM or PM notation)
|
||||||
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
||||||
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
||||||
|
|
@ -1064,7 +1064,7 @@ __STATIC_INLINE void LL_RTC_TIME_SetHour(RTC_TypeDef *RTCx, uint32_t Hours)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get Hours in BCD format
|
* @brief Get Hours in BCD format
|
||||||
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
||||||
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
||||||
|
|
@ -1099,7 +1099,7 @@ __STATIC_INLINE void LL_RTC_TIME_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get Minutes in BCD format
|
* @brief Get Minutes in BCD format
|
||||||
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
||||||
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
||||||
|
|
@ -1134,7 +1134,7 @@ __STATIC_INLINE void LL_RTC_TIME_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get Seconds in BCD format
|
* @brief Get Seconds in BCD format
|
||||||
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
||||||
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
||||||
|
|
@ -1184,7 +1184,7 @@ __STATIC_INLINE void LL_RTC_TIME_Config(RTC_TypeDef *RTCx, uint32_t Format12_24,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get time (hour, minute and second) in BCD format
|
* @brief Get time (hour, minute and second) in BCD format
|
||||||
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
||||||
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
||||||
|
|
@ -1326,7 +1326,7 @@ __STATIC_INLINE void LL_RTC_DATE_SetYear(RTC_TypeDef *RTCx, uint32_t Year)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get Year in BCD format
|
* @brief Get Year in BCD format
|
||||||
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Year from BCD to Binary format
|
* @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Year from BCD to Binary format
|
||||||
* @rmtoll DR YT LL_RTC_DATE_GetYear\n
|
* @rmtoll DR YT LL_RTC_DATE_GetYear\n
|
||||||
|
|
@ -1360,7 +1360,7 @@ __STATIC_INLINE void LL_RTC_DATE_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get Week day
|
* @brief Get Week day
|
||||||
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @rmtoll DR WDU LL_RTC_DATE_GetWeekDay
|
* @rmtoll DR WDU LL_RTC_DATE_GetWeekDay
|
||||||
* @param RTCx RTC Instance
|
* @param RTCx RTC Instance
|
||||||
|
|
@ -1407,7 +1407,7 @@ __STATIC_INLINE void LL_RTC_DATE_SetMonth(RTC_TypeDef *RTCx, uint32_t Month)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get Month in BCD format
|
* @brief Get Month in BCD format
|
||||||
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Month from BCD to Binary format
|
* @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Month from BCD to Binary format
|
||||||
* @rmtoll DR MT LL_RTC_DATE_GetMonth\n
|
* @rmtoll DR MT LL_RTC_DATE_GetMonth\n
|
||||||
|
|
@ -1449,7 +1449,7 @@ __STATIC_INLINE void LL_RTC_DATE_SetDay(RTC_TypeDef *RTCx, uint32_t Day)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get Day in BCD format
|
* @brief Get Day in BCD format
|
||||||
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format
|
* @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format
|
||||||
* @rmtoll DR DT LL_RTC_DATE_GetDay\n
|
* @rmtoll DR DT LL_RTC_DATE_GetDay\n
|
||||||
|
|
@ -1511,7 +1511,7 @@ __STATIC_INLINE void LL_RTC_DATE_Config(RTC_TypeDef *RTCx, uint32_t WeekDay, uin
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get date (WeekDay, Day, Month and Year) in BCD format
|
* @brief Get date (WeekDay, Day, Month and Year) in BCD format
|
||||||
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note helper macros __LL_RTC_GET_WEEKDAY, __LL_RTC_GET_YEAR, __LL_RTC_GET_MONTH,
|
* @note helper macros __LL_RTC_GET_WEEKDAY, __LL_RTC_GET_YEAR, __LL_RTC_GET_MONTH,
|
||||||
* and __LL_RTC_GET_DAY are available to get independently each parameter.
|
* and __LL_RTC_GET_DAY are available to get independently each parameter.
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -254,7 +254,7 @@ __STATIC_INLINE uint32_t LL_GetPackageType(void)
|
||||||
* @param HCLKFrequency HCLK frequency in Hz (can be calculated thanks to RCC helper macro)
|
* @param HCLKFrequency HCLK frequency in Hz (can be calculated thanks to RCC helper macro)
|
||||||
* @note When a RTOS is used, it is recommended to avoid changing the SysTick
|
* @note When a RTOS is used, it is recommended to avoid changing the SysTick
|
||||||
* configuration by calling this function, for a delay use rather osDelay RTOS service.
|
* configuration by calling this function, for a delay use rather osDelay RTOS service.
|
||||||
* @param Ticks Number of ticks
|
* @param Ticks Frequency of Ticks (Hz)
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void LL_InitTick(uint32_t HCLKFrequency, uint32_t Ticks)
|
__STATIC_INLINE void LL_InitTick(uint32_t HCLKFrequency, uint32_t Ticks)
|
||||||
|
|
|
||||||
|
|
@ -50,11 +50,11 @@
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief STM32F4xx HAL Driver version number V1.8.1
|
* @brief STM32F4xx HAL Driver version number V1.8.3
|
||||||
*/
|
*/
|
||||||
#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 (0x08U) /*!< [23:16] sub1 version */
|
#define __STM32F4xx_HAL_VERSION_SUB1 (0x08U) /*!< [23:16] sub1 version */
|
||||||
#define __STM32F4xx_HAL_VERSION_SUB2 (0x01U) /*!< [15:8] sub2 version */
|
#define __STM32F4xx_HAL_VERSION_SUB2 (0x03U) /*!< [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)\
|
||||||
|
|
@ -368,7 +368,8 @@ HAL_StatusTypeDef HAL_SetTickFreq(HAL_TickFreqTypeDef Freq)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Return tick frequency.
|
* @brief Return tick frequency.
|
||||||
* @retval tick period in Hz
|
* @retval Tick frequency.
|
||||||
|
* Value of @ref HAL_TickFreqTypeDef.
|
||||||
*/
|
*/
|
||||||
HAL_TickFreqTypeDef HAL_GetTickFreq(void)
|
HAL_TickFreqTypeDef HAL_GetTickFreq(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -289,6 +289,38 @@ void HAL_MPU_Enable(uint32_t MPU_Control)
|
||||||
__ISB();
|
__ISB();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the MPU Region.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void HAL_MPU_EnableRegion(uint32_t RegionNumber)
|
||||||
|
{
|
||||||
|
/* Check the parameters */
|
||||||
|
assert_param(IS_MPU_REGION_NUMBER(RegionNumber));
|
||||||
|
|
||||||
|
/* Set the Region number */
|
||||||
|
MPU->RNR = RegionNumber;
|
||||||
|
|
||||||
|
/* Enable the Region */
|
||||||
|
SET_BIT(MPU->RASR, MPU_RASR_ENABLE_Msk);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disables the MPU Region.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void HAL_MPU_DisableRegion(uint32_t RegionNumber)
|
||||||
|
{
|
||||||
|
/* Check the parameters */
|
||||||
|
assert_param(IS_MPU_REGION_NUMBER(RegionNumber));
|
||||||
|
|
||||||
|
/* Set the Region number */
|
||||||
|
MPU->RNR = RegionNumber;
|
||||||
|
|
||||||
|
/* Disable the Region */
|
||||||
|
CLEAR_BIT(MPU->RASR, MPU_RASR_ENABLE_Msk);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initializes and configures the Region and the memory to be protected.
|
* @brief Initializes and configures the Region and the memory to be protected.
|
||||||
* @param MPU_Init Pointer to a MPU_Region_InitTypeDef structure that contains
|
* @param MPU_Init Pointer to a MPU_Region_InitTypeDef structure that contains
|
||||||
|
|
@ -300,13 +332,6 @@ void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init)
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_MPU_REGION_NUMBER(MPU_Init->Number));
|
assert_param(IS_MPU_REGION_NUMBER(MPU_Init->Number));
|
||||||
assert_param(IS_MPU_REGION_ENABLE(MPU_Init->Enable));
|
assert_param(IS_MPU_REGION_ENABLE(MPU_Init->Enable));
|
||||||
|
|
||||||
/* Set the Region number */
|
|
||||||
MPU->RNR = MPU_Init->Number;
|
|
||||||
|
|
||||||
if ((MPU_Init->Enable) != RESET)
|
|
||||||
{
|
|
||||||
/* Check the parameters */
|
|
||||||
assert_param(IS_MPU_INSTRUCTION_ACCESS(MPU_Init->DisableExec));
|
assert_param(IS_MPU_INSTRUCTION_ACCESS(MPU_Init->DisableExec));
|
||||||
assert_param(IS_MPU_REGION_PERMISSION_ATTRIBUTE(MPU_Init->AccessPermission));
|
assert_param(IS_MPU_REGION_PERMISSION_ATTRIBUTE(MPU_Init->AccessPermission));
|
||||||
assert_param(IS_MPU_TEX_LEVEL(MPU_Init->TypeExtField));
|
assert_param(IS_MPU_TEX_LEVEL(MPU_Init->TypeExtField));
|
||||||
|
|
@ -316,6 +341,13 @@ void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init)
|
||||||
assert_param(IS_MPU_SUB_REGION_DISABLE(MPU_Init->SubRegionDisable));
|
assert_param(IS_MPU_SUB_REGION_DISABLE(MPU_Init->SubRegionDisable));
|
||||||
assert_param(IS_MPU_REGION_SIZE(MPU_Init->Size));
|
assert_param(IS_MPU_REGION_SIZE(MPU_Init->Size));
|
||||||
|
|
||||||
|
/* Set the Region number */
|
||||||
|
MPU->RNR = MPU_Init->Number;
|
||||||
|
|
||||||
|
/* Disable the Region */
|
||||||
|
CLEAR_BIT(MPU->RASR, MPU_RASR_ENABLE_Msk);
|
||||||
|
|
||||||
|
/* Apply configuration */
|
||||||
MPU->RBAR = MPU_Init->BaseAddress;
|
MPU->RBAR = MPU_Init->BaseAddress;
|
||||||
MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) |
|
MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) |
|
||||||
((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) |
|
((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) |
|
||||||
|
|
@ -327,14 +359,18 @@ void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init)
|
||||||
((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) |
|
((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) |
|
||||||
((uint32_t)MPU_Init->Enable << MPU_RASR_ENABLE_Pos);
|
((uint32_t)MPU_Init->Enable << MPU_RASR_ENABLE_Pos);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
MPU->RBAR = 0x00U;
|
|
||||||
MPU->RASR = 0x00U;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* __MPU_PRESENT */
|
#endif /* __MPU_PRESENT */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Clear pending events.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void HAL_CORTEX_ClearEvent(void)
|
||||||
|
{
|
||||||
|
__SEV();
|
||||||
|
__WFE();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the priority grouping field from the NVIC Interrupt Controller.
|
* @brief Gets the priority grouping field from the NVIC Interrupt Controller.
|
||||||
* @retval Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field)
|
* @retval Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field)
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@
|
||||||
(++) Provide exiting handle as parameter.
|
(++) Provide exiting handle as parameter.
|
||||||
(++) Provide pointer on EXTI_ConfigTypeDef structure as second parameter.
|
(++) Provide pointer on EXTI_ConfigTypeDef structure as second parameter.
|
||||||
|
|
||||||
(#) Clear Exti configuration of a dedicated line using HAL_EXTI_GetConfigLine().
|
(#) Clear Exti configuration of a dedicated line using HAL_EXTI_ClearConfigLine().
|
||||||
(++) Provide exiting handle as parameter.
|
(++) Provide exiting handle as parameter.
|
||||||
|
|
||||||
(#) Register callback to treat Exti interrupts using HAL_EXTI_RegisterCallback().
|
(#) Register callback to treat Exti interrupts using HAL_EXTI_RegisterCallback().
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
|
|
||||||
(#) Get interrupt pending bit using HAL_EXTI_GetPending().
|
(#) Get interrupt pending bit using HAL_EXTI_GetPending().
|
||||||
|
|
||||||
(#) Clear interrupt pending bit using HAL_EXTI_GetPending().
|
(#) Clear interrupt pending bit using HAL_EXTI_ClearPending().
|
||||||
|
|
||||||
(#) Generate software interrupt using HAL_EXTI_GenerateSWI().
|
(#) Generate software interrupt using HAL_EXTI_GenerateSWI().
|
||||||
|
|
||||||
|
|
@ -300,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] << 16u );
|
regval = SYSCFG->EXTICR[linepos >> 2u];
|
||||||
pExtiConfig->GPIOSel = ((regval << (SYSCFG_EXTICR1_EXTI1_Pos * (3uL - (linepos & 0x03u)))) >> 28u);
|
pExtiConfig->GPIOSel = (regval >> (SYSCFG_EXTICR1_EXTI1_Pos * (linepos & 0x03u))) & SYSCFG_EXTICR1_EXTI0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -469,6 +469,9 @@ uint32_t HAL_EXTI_GetPending(EXTI_HandleTypeDef *hexti, uint32_t Edge)
|
||||||
uint32_t linepos;
|
uint32_t linepos;
|
||||||
uint32_t maskline;
|
uint32_t maskline;
|
||||||
|
|
||||||
|
/* Prevent unused argument(s) compilation warning */
|
||||||
|
UNUSED(Edge);
|
||||||
|
|
||||||
/* Check parameters */
|
/* Check parameters */
|
||||||
assert_param(IS_EXTI_LINE(hexti->Line));
|
assert_param(IS_EXTI_LINE(hexti->Line));
|
||||||
assert_param(IS_EXTI_CONFIG_LINE(hexti->Line));
|
assert_param(IS_EXTI_CONFIG_LINE(hexti->Line));
|
||||||
|
|
@ -496,6 +499,9 @@ void HAL_EXTI_ClearPending(EXTI_HandleTypeDef *hexti, uint32_t Edge)
|
||||||
{
|
{
|
||||||
uint32_t maskline;
|
uint32_t maskline;
|
||||||
|
|
||||||
|
/* Prevent unused argument(s) compilation warning */
|
||||||
|
UNUSED(Edge);
|
||||||
|
|
||||||
/* Check parameters */
|
/* Check parameters */
|
||||||
assert_param(IS_EXTI_LINE(hexti->Line));
|
assert_param(IS_EXTI_LINE(hexti->Line));
|
||||||
assert_param(IS_EXTI_CONFIG_LINE(hexti->Line));
|
assert_param(IS_EXTI_CONFIG_LINE(hexti->Line));
|
||||||
|
|
|
||||||
|
|
@ -213,9 +213,6 @@ HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t Address, u
|
||||||
{
|
{
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
|
|
||||||
/* Process Locked */
|
|
||||||
__HAL_LOCK(&pFlash);
|
|
||||||
|
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_FLASH_TYPEPROGRAM(TypeProgram));
|
assert_param(IS_FLASH_TYPEPROGRAM(TypeProgram));
|
||||||
|
|
||||||
|
|
@ -364,9 +361,6 @@ void HAL_FLASH_IRQHandler(void)
|
||||||
|
|
||||||
/* Disable Error source interrupt */
|
/* Disable Error source interrupt */
|
||||||
__HAL_FLASH_DISABLE_IT(FLASH_IT_ERR);
|
__HAL_FLASH_DISABLE_IT(FLASH_IT_ERR);
|
||||||
|
|
||||||
/* Process Unlocked */
|
|
||||||
__HAL_UNLOCK(&pFlash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -232,9 +232,6 @@ HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit)
|
||||||
{
|
{
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
|
|
||||||
/* Process Locked */
|
|
||||||
__HAL_LOCK(&pFlash);
|
|
||||||
|
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_FLASH_TYPEERASE(pEraseInit->TypeErase));
|
assert_param(IS_FLASH_TYPEERASE(pEraseInit->TypeErase));
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -179,10 +179,12 @@ void HAL_PWR_DisableBkUpAccess(void)
|
||||||
==================
|
==================
|
||||||
[..]
|
[..]
|
||||||
(+) Entry:
|
(+) Entry:
|
||||||
The Sleep mode is entered by using the HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI)
|
The Sleep mode is entered by using the HAL_PWR_EnterSLEEPMode(Regulator, SLEEPEntry)
|
||||||
functions with
|
functions with
|
||||||
(++) PWR_SLEEPENTRY_WFI: enter SLEEP mode with WFI instruction
|
(++) PWR_SLEEPENTRY_WFI: enter SLEEP mode with WFI instruction
|
||||||
(++) PWR_SLEEPENTRY_WFE: enter SLEEP mode with WFE instruction
|
(++) PWR_SLEEPENTRY_WFE: enter SLEEP mode with WFE instruction
|
||||||
|
(++) PWR_SLEEPENTRY_WFE_NO_EVT_CLEAR: Enter SLEEP mode with WFE instruction and
|
||||||
|
no clear of pending event before.
|
||||||
|
|
||||||
-@@- The Regulator parameter is not used for the STM32F4 family
|
-@@- The Regulator parameter is not used for the STM32F4 family
|
||||||
and is kept as parameter just to maintain compatibility with the
|
and is kept as parameter just to maintain compatibility with the
|
||||||
|
|
@ -204,10 +206,17 @@ void HAL_PWR_DisableBkUpAccess(void)
|
||||||
the HAL_PWREx_DisableFlashPowerDown() function.
|
the HAL_PWREx_DisableFlashPowerDown() function.
|
||||||
|
|
||||||
(+) Entry:
|
(+) Entry:
|
||||||
The Stop mode is entered using the HAL_PWR_EnterSTOPMode(PWR_MAINREGULATOR_ON)
|
The Stop mode is entered using the HAL_PWR_EnterSTOPMode(Regulator, STOPEntry)
|
||||||
function with:
|
function with:
|
||||||
(++) Main regulator ON.
|
(++) Regulator:
|
||||||
(++) Low Power regulator ON.
|
(+++) Main regulator ON.
|
||||||
|
(+++) Low Power regulator ON.
|
||||||
|
(++) STOPEntry:
|
||||||
|
(+++) PWR_STOPENTRY_WFI : Enter STOP mode with WFI instruction.
|
||||||
|
(+++) PWR_STOPENTRY_WFE : Enter STOP mode with WFE instruction and
|
||||||
|
clear of pending events before.
|
||||||
|
(+++) PWR_STOPENTRY_WFE_NO_EVT_CLEAR : Enter STOP mode with WFE instruction and
|
||||||
|
no clear of pending event before.
|
||||||
(+) Exit:
|
(+) Exit:
|
||||||
Any EXTI Line (Internal or External) configured in Interrupt/Event mode.
|
Any EXTI Line (Internal or External) configured in Interrupt/Event mode.
|
||||||
|
|
||||||
|
|
@ -372,12 +381,18 @@ void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx)
|
||||||
* just to maintain compatibility with the lower power families.
|
* just to maintain compatibility with the lower power families.
|
||||||
* @param SLEEPEntry Specifies if SLEEP mode in entered with WFI or WFE instruction.
|
* @param SLEEPEntry Specifies if SLEEP mode in entered with WFI or WFE instruction.
|
||||||
* This parameter can be one of the following values:
|
* This parameter can be one of the following values:
|
||||||
* @arg PWR_SLEEPENTRY_WFI: enter SLEEP mode with WFI instruction
|
* @arg PWR_SLEEPENTRY_WFI : Enter SLEEP mode with WFI instruction
|
||||||
* @arg PWR_SLEEPENTRY_WFE: enter SLEEP mode with WFE instruction
|
* @arg PWR_SLEEPENTRY_WFE : Enter SLEEP mode with WFE instruction and
|
||||||
|
* clear of pending events before.
|
||||||
|
* @arg PWR_SLEEPENTRY_WFE_NO_EVT_CLEAR : Enter SLEEP mode with WFE instruction and
|
||||||
|
* no clear of pending event before.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry)
|
void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry)
|
||||||
{
|
{
|
||||||
|
/* Prevent unused argument(s) compilation warning */
|
||||||
|
UNUSED(Regulator);
|
||||||
|
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_PWR_REGULATOR(Regulator));
|
assert_param(IS_PWR_REGULATOR(Regulator));
|
||||||
assert_param(IS_PWR_SLEEP_ENTRY(SLEEPEntry));
|
assert_param(IS_PWR_SLEEP_ENTRY(SLEEPEntry));
|
||||||
|
|
@ -393,9 +408,14 @@ void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Request Wait For Event */
|
if(SLEEPEntry != PWR_SLEEPENTRY_WFE_NO_EVT_CLEAR)
|
||||||
|
{
|
||||||
|
/* Clear all pending event */
|
||||||
__SEV();
|
__SEV();
|
||||||
__WFE();
|
__WFE();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Request Wait For Event */
|
||||||
__WFE();
|
__WFE();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -416,7 +436,10 @@ void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry)
|
||||||
* @param STOPEntry Specifies if Stop mode in entered with WFI or WFE instruction.
|
* @param STOPEntry Specifies if Stop mode in entered with WFI or WFE instruction.
|
||||||
* This parameter can be one of the following values:
|
* This parameter can be one of the following values:
|
||||||
* @arg PWR_STOPENTRY_WFI : Enter Stop mode with WFI instruction
|
* @arg PWR_STOPENTRY_WFI : Enter Stop mode with WFI instruction
|
||||||
* @arg PWR_STOPENTRY_WFE: Enter Stop mode with WFE instruction
|
* @arg PWR_STOPENTRY_WFE : Enter Stop mode with WFE instruction and
|
||||||
|
* clear of pending events before.
|
||||||
|
* @arg PWR_STOPENTRY_WFE_NO_EVT_CLEAR : Enter STOP mode with WFE instruction and
|
||||||
|
* no clear of pending event before.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void HAL_PWR_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry)
|
void HAL_PWR_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry)
|
||||||
|
|
@ -439,9 +462,13 @@ void HAL_PWR_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Request Wait For Event */
|
if(STOPEntry != PWR_STOPENTRY_WFE_NO_EVT_CLEAR)
|
||||||
|
{
|
||||||
|
/* Clear all pending event */
|
||||||
__SEV();
|
__SEV();
|
||||||
__WFE();
|
__WFE();
|
||||||
|
}
|
||||||
|
/* Request Wait For Event */
|
||||||
__WFE();
|
__WFE();
|
||||||
}
|
}
|
||||||
/* Reset SLEEPDEEP bit of Cortex System Control Register */
|
/* Reset SLEEPDEEP bit of Cortex System Control Register */
|
||||||
|
|
|
||||||
|
|
@ -218,8 +218,8 @@ __weak HAL_StatusTypeDef HAL_RCC_DeInit(void)
|
||||||
*/
|
*/
|
||||||
__weak HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
|
__weak HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
|
||||||
{
|
{
|
||||||
uint32_t tickstart, pll_config;
|
uint32_t tickstart;
|
||||||
|
uint32_t pll_config;
|
||||||
/* Check Null pointer */
|
/* Check Null pointer */
|
||||||
if (RCC_OscInitStruct == NULL)
|
if (RCC_OscInitStruct == NULL)
|
||||||
{
|
{
|
||||||
|
|
@ -479,7 +479,7 @@ __weak HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruc
|
||||||
/* Get Start Tick */
|
/* Get Start Tick */
|
||||||
tickstart = HAL_GetTick();
|
tickstart = HAL_GetTick();
|
||||||
|
|
||||||
/* Wait till PLL is ready */
|
/* Wait till PLL is disabled */
|
||||||
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
|
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
|
||||||
{
|
{
|
||||||
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
|
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
|
||||||
|
|
@ -517,7 +517,7 @@ __weak HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruc
|
||||||
/* Get Start Tick */
|
/* Get Start Tick */
|
||||||
tickstart = HAL_GetTick();
|
tickstart = HAL_GetTick();
|
||||||
|
|
||||||
/* Wait till PLL is ready */
|
/* Wait till PLL is disabled */
|
||||||
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
|
while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)
|
||||||
{
|
{
|
||||||
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
|
if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE)
|
||||||
|
|
@ -553,7 +553,7 @@ __weak HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruc
|
||||||
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
|
||||||
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
|
||||||
(READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)))
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)))
|
||||||
#endif
|
#endif /* RCC_PLLCFGR_PLLR */
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -884,7 +884,9 @@ void HAL_RCC_DisableCSS(void)
|
||||||
*/
|
*/
|
||||||
__weak uint32_t HAL_RCC_GetSysClockFreq(void)
|
__weak uint32_t HAL_RCC_GetSysClockFreq(void)
|
||||||
{
|
{
|
||||||
uint32_t pllm = 0U, pllvco = 0U, pllp = 0U;
|
uint32_t pllm = 0U;
|
||||||
|
uint32_t pllvco = 0U;
|
||||||
|
uint32_t pllp = 0U;
|
||||||
uint32_t sysclockfreq = 0U;
|
uint32_t sysclockfreq = 0U;
|
||||||
|
|
||||||
/* Get SYSCLK source -------------------------------------------------------*/
|
/* Get SYSCLK source -------------------------------------------------------*/
|
||||||
|
|
|
||||||
|
|
@ -326,7 +326,8 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
assert_param(IS_RCC_PLLI2SN_VALUE(PeriphClkInit->PLLI2S.PLLI2SN));
|
assert_param(IS_RCC_PLLI2SN_VALUE(PeriphClkInit->PLLI2S.PLLI2SN));
|
||||||
|
|
||||||
/*------ In Case of PLLI2S is selected as source clock for I2S -----------*/
|
/*------ In Case of PLLI2S is selected as source clock for I2S -----------*/
|
||||||
if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S_APB1) == RCC_PERIPHCLK_I2S_APB1) && (PeriphClkInit->I2sApb1ClockSelection == RCC_I2SAPB1CLKSOURCE_PLLI2S)) ||
|
if (((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S_APB1) == RCC_PERIPHCLK_I2S_APB1)
|
||||||
|
&& (PeriphClkInit->I2sApb1ClockSelection == RCC_I2SAPB1CLKSOURCE_PLLI2S)) ||
|
||||||
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S_APB2) == RCC_PERIPHCLK_I2S_APB2) && (PeriphClkInit->I2sApb2ClockSelection == RCC_I2SAPB2CLKSOURCE_PLLI2S)))
|
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S_APB2) == RCC_PERIPHCLK_I2S_APB2) && (PeriphClkInit->I2sApb2ClockSelection == RCC_I2SAPB2CLKSOURCE_PLLI2S)))
|
||||||
{
|
{
|
||||||
/* check for Parameters */
|
/* check for Parameters */
|
||||||
|
|
@ -338,11 +339,13 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
/* Configure the PLLI2S division factors */
|
/* Configure the PLLI2S division factors */
|
||||||
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLI2SM) */
|
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLI2SM) */
|
||||||
/* I2SCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SR */
|
/* I2SCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SR */
|
||||||
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN , plli2sp, plli2sq, PeriphClkInit->PLLI2S.PLLI2SR);
|
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN, plli2sp, plli2sq,
|
||||||
|
PeriphClkInit->PLLI2S.PLLI2SR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*------- In Case of PLLI2S is selected as source clock for SAI ----------*/
|
/*------- In Case of PLLI2S is selected as source clock for SAI ----------*/
|
||||||
if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) && (PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLI2S)) ||
|
if (((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1)
|
||||||
|
&& (PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLI2S)) ||
|
||||||
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLI2S)))
|
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLI2S)))
|
||||||
{
|
{
|
||||||
/* Check for PLLI2S Parameters */
|
/* Check for PLLI2S Parameters */
|
||||||
|
|
@ -357,14 +360,16 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
/* PLLI2S_VCO Input = PLL_SOURCE/PLLI2SM */
|
/* PLLI2S_VCO Input = PLL_SOURCE/PLLI2SM */
|
||||||
/* PLLI2S_VCO Output = PLLI2S_VCO Input * PLLI2SN */
|
/* PLLI2S_VCO Output = PLLI2S_VCO Input * PLLI2SN */
|
||||||
/* SAI_CLK(first level) = PLLI2S_VCO Output/PLLI2SQ */
|
/* SAI_CLK(first level) = PLLI2S_VCO Output/PLLI2SQ */
|
||||||
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN , plli2sp, PeriphClkInit->PLLI2S.PLLI2SQ, plli2sr);
|
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN, plli2sp,
|
||||||
|
PeriphClkInit->PLLI2S.PLLI2SQ, plli2sr);
|
||||||
|
|
||||||
/* SAI_CLK_x = SAI_CLK(first level)/PLLI2SDIVQ */
|
/* SAI_CLK_x = SAI_CLK(first level)/PLLI2SDIVQ */
|
||||||
__HAL_RCC_PLLI2S_PLLSAICLKDIVQ_CONFIG(PeriphClkInit->PLLI2SDivQ);
|
__HAL_RCC_PLLI2S_PLLSAICLKDIVQ_CONFIG(PeriphClkInit->PLLI2SDivQ);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*------ In Case of PLLI2S is selected as source clock for SPDIFRX -------*/
|
/*------ In Case of PLLI2S is selected as source clock for SPDIFRX -------*/
|
||||||
if((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPDIFRX) == RCC_PERIPHCLK_SPDIFRX) && (PeriphClkInit->SpdifClockSelection == RCC_SPDIFRXCLKSOURCE_PLLI2SP))
|
if ((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPDIFRX) == RCC_PERIPHCLK_SPDIFRX)
|
||||||
|
&& (PeriphClkInit->SpdifClockSelection == RCC_SPDIFRXCLKSOURCE_PLLI2SP))
|
||||||
{
|
{
|
||||||
/* check for Parameters */
|
/* check for Parameters */
|
||||||
assert_param(IS_RCC_PLLI2SP_VALUE(PeriphClkInit->PLLI2S.PLLI2SP));
|
assert_param(IS_RCC_PLLI2SP_VALUE(PeriphClkInit->PLLI2S.PLLI2SP));
|
||||||
|
|
@ -374,7 +379,8 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
/* Configure the PLLI2S division factors */
|
/* Configure the PLLI2S division factors */
|
||||||
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLI2SM) */
|
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLI2SM) */
|
||||||
/* SPDIFRXCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SP */
|
/* SPDIFRXCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SP */
|
||||||
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN , PeriphClkInit->PLLI2S.PLLI2SP, plli2sq, plli2sr);
|
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN, PeriphClkInit->PLLI2S.PLLI2SP,
|
||||||
|
plli2sq, plli2sr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------- In Case of PLLI2S is just selected -----------------*/
|
/*----------------- In Case of PLLI2S is just selected -----------------*/
|
||||||
|
|
@ -387,7 +393,8 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
|
|
||||||
/* Configure the PLLI2S division factors */
|
/* Configure the PLLI2S division factors */
|
||||||
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLI2SM) */
|
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLI2SM) */
|
||||||
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN , PeriphClkInit->PLLI2S.PLLI2SP, PeriphClkInit->PLLI2S.PLLI2SQ, PeriphClkInit->PLLI2S.PLLI2SR);
|
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN, PeriphClkInit->PLLI2S.PLLI2SP,
|
||||||
|
PeriphClkInit->PLLI2S.PLLI2SQ, PeriphClkInit->PLLI2S.PLLI2SR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable the PLLI2S */
|
/* Enable the PLLI2S */
|
||||||
|
|
@ -429,7 +436,8 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
assert_param(IS_RCC_PLLSAIN_VALUE(PeriphClkInit->PLLSAI.PLLSAIN));
|
assert_param(IS_RCC_PLLSAIN_VALUE(PeriphClkInit->PLLSAI.PLLSAIN));
|
||||||
|
|
||||||
/*------ In Case of PLLSAI is selected as source clock for SAI -----------*/
|
/*------ In Case of PLLSAI is selected as source clock for SAI -----------*/
|
||||||
if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) && (PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLSAI)) ||
|
if (((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1)
|
||||||
|
&& (PeriphClkInit->Sai1ClockSelection == RCC_SAI1CLKSOURCE_PLLSAI)) ||
|
||||||
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLSAI)))
|
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) && (PeriphClkInit->Sai2ClockSelection == RCC_SAI2CLKSOURCE_PLLSAI)))
|
||||||
{
|
{
|
||||||
/* check for PLLSAIQ Parameter */
|
/* check for PLLSAIQ Parameter */
|
||||||
|
|
@ -442,7 +450,8 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
/* PLLSAI_VCO Input = PLL_SOURCE/PLLM */
|
/* PLLSAI_VCO Input = PLL_SOURCE/PLLM */
|
||||||
/* PLLSAI_VCO Output = PLLSAI_VCO Input * PLLSAIN */
|
/* PLLSAI_VCO Output = PLLSAI_VCO Input * PLLSAIN */
|
||||||
/* SAI_CLK(first level) = PLLSAI_VCO Output/PLLSAIQ */
|
/* SAI_CLK(first level) = PLLSAI_VCO Output/PLLSAIQ */
|
||||||
__HAL_RCC_PLLSAI_CONFIG(PeriphClkInit->PLLSAI.PLLSAIM, PeriphClkInit->PLLSAI.PLLSAIN , pllsaip, PeriphClkInit->PLLSAI.PLLSAIQ, 0U);
|
__HAL_RCC_PLLSAI_CONFIG(PeriphClkInit->PLLSAI.PLLSAIM, PeriphClkInit->PLLSAI.PLLSAIN, pllsaip,
|
||||||
|
PeriphClkInit->PLLSAI.PLLSAIQ, 0U);
|
||||||
|
|
||||||
/* SAI_CLK_x = SAI_CLK(first level)/PLLSAIDIVQ */
|
/* SAI_CLK_x = SAI_CLK(first level)/PLLSAIDIVQ */
|
||||||
__HAL_RCC_PLLSAI_PLLSAICLKDIVQ_CONFIG(PeriphClkInit->PLLSAIDivQ);
|
__HAL_RCC_PLLSAI_PLLSAICLKDIVQ_CONFIG(PeriphClkInit->PLLSAIDivQ);
|
||||||
|
|
@ -450,7 +459,8 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
|
|
||||||
/*------ In Case of PLLSAI is selected as source clock for CLK48 ---------*/
|
/*------ In Case of PLLSAI is selected as source clock for CLK48 ---------*/
|
||||||
/* In Case of PLLI2S is selected as source clock for CLK48 */
|
/* In Case of PLLI2S is selected as source clock for CLK48 */
|
||||||
if((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CLK48) == RCC_PERIPHCLK_CLK48) && (PeriphClkInit->Clk48ClockSelection == RCC_CLK48CLKSOURCE_PLLSAIP))
|
if ((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CLK48) == RCC_PERIPHCLK_CLK48)
|
||||||
|
&& (PeriphClkInit->Clk48ClockSelection == RCC_CLK48CLKSOURCE_PLLSAIP))
|
||||||
{
|
{
|
||||||
/* check for Parameters */
|
/* check for Parameters */
|
||||||
assert_param(IS_RCC_PLLSAIP_VALUE(PeriphClkInit->PLLSAI.PLLSAIP));
|
assert_param(IS_RCC_PLLSAIP_VALUE(PeriphClkInit->PLLSAI.PLLSAIP));
|
||||||
|
|
@ -459,7 +469,8 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
/* Configure the PLLSAI division factors */
|
/* Configure the PLLSAI division factors */
|
||||||
/* PLLSAI_VCO = f(VCO clock) = f(PLLSAI clock input) * (PLLI2SN/PLLSAIM) */
|
/* PLLSAI_VCO = f(VCO clock) = f(PLLSAI clock input) * (PLLI2SN/PLLSAIM) */
|
||||||
/* 48CLK = f(PLLSAI clock output) = f(VCO clock) / PLLSAIP */
|
/* 48CLK = f(PLLSAI clock output) = f(VCO clock) / PLLSAIP */
|
||||||
__HAL_RCC_PLLSAI_CONFIG(PeriphClkInit->PLLSAI.PLLSAIM, PeriphClkInit->PLLSAI.PLLSAIN , PeriphClkInit->PLLSAI.PLLSAIP, pllsaiq, 0U);
|
__HAL_RCC_PLLSAI_CONFIG(PeriphClkInit->PLLSAI.PLLSAIM, PeriphClkInit->PLLSAI.PLLSAIN, PeriphClkInit->PLLSAI.PLLSAIP,
|
||||||
|
pllsaiq, 0U);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable PLLSAI Clock */
|
/* Enable PLLSAI Clock */
|
||||||
|
|
@ -843,6 +854,10 @@ uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return frequency;
|
return frequency;
|
||||||
}
|
}
|
||||||
|
|
@ -962,7 +977,8 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
assert_param(IS_RCC_PLLI2SR_VALUE(PeriphClkInit->PLLI2S.PLLI2SR));
|
assert_param(IS_RCC_PLLI2SR_VALUE(PeriphClkInit->PLLI2S.PLLI2SR));
|
||||||
|
|
||||||
/* Configure the PLLI2S multiplication and division factors */
|
/* Configure the PLLI2S multiplication and division factors */
|
||||||
__HAL_RCC_PLLI2S_SAICLK_CONFIG(PeriphClkInit->PLLI2S.PLLI2SN, PeriphClkInit->PLLI2S.PLLI2SQ, PeriphClkInit->PLLI2S.PLLI2SR);
|
__HAL_RCC_PLLI2S_SAICLK_CONFIG(PeriphClkInit->PLLI2S.PLLI2SN, PeriphClkInit->PLLI2S.PLLI2SQ,
|
||||||
|
PeriphClkInit->PLLI2S.PLLI2SR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable the PLLI2S */
|
/* Enable the PLLI2S */
|
||||||
|
|
@ -1253,6 +1269,10 @@ uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return frequency;
|
return frequency;
|
||||||
}
|
}
|
||||||
|
|
@ -1497,7 +1517,8 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
__HAL_RCC_PLL_I2S_CONFIG(PeriphClkInit->PLLI2SSelection);
|
__HAL_RCC_PLL_I2S_CONFIG(PeriphClkInit->PLLI2SSelection);
|
||||||
|
|
||||||
/*------- In Case of PLLI2S is selected as source clock for I2S ----------*/
|
/*------- In Case of PLLI2S is selected as source clock for I2S ----------*/
|
||||||
if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S_APB1) == RCC_PERIPHCLK_I2S_APB1) && (PeriphClkInit->I2sApb1ClockSelection == RCC_I2SAPB1CLKSOURCE_PLLI2S)) ||
|
if (((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S_APB1) == RCC_PERIPHCLK_I2S_APB1)
|
||||||
|
&& (PeriphClkInit->I2sApb1ClockSelection == RCC_I2SAPB1CLKSOURCE_PLLI2S)) ||
|
||||||
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S_APB2) == RCC_PERIPHCLK_I2S_APB2) && (PeriphClkInit->I2sApb2ClockSelection == RCC_I2SAPB2CLKSOURCE_PLLI2S)) ||
|
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2S_APB2) == RCC_PERIPHCLK_I2S_APB2) && (PeriphClkInit->I2sApb2ClockSelection == RCC_I2SAPB2CLKSOURCE_PLLI2S)) ||
|
||||||
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CLK48) == RCC_PERIPHCLK_CLK48) && (PeriphClkInit->Clk48ClockSelection == RCC_CLK48CLKSOURCE_PLLI2SQ)) ||
|
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CLK48) == RCC_PERIPHCLK_CLK48) && (PeriphClkInit->Clk48ClockSelection == RCC_CLK48CLKSOURCE_PLLI2SQ)) ||
|
||||||
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SDIO) == RCC_PERIPHCLK_SDIO) && (PeriphClkInit->SdioClockSelection == RCC_SDIOCLKSOURCE_CLK48) && (PeriphClkInit->Clk48ClockSelection == RCC_CLK48CLKSOURCE_PLLI2SQ)))
|
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SDIO) == RCC_PERIPHCLK_SDIO) && (PeriphClkInit->SdioClockSelection == RCC_SDIOCLKSOURCE_CLK48) && (PeriphClkInit->Clk48ClockSelection == RCC_CLK48CLKSOURCE_PLLI2SQ)))
|
||||||
|
|
@ -1509,12 +1530,14 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
/* Configure the PLLI2S division factors */
|
/* Configure the PLLI2S division factors */
|
||||||
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLI2SM)*/
|
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLI2SM)*/
|
||||||
/* I2SCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SR */
|
/* I2SCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SR */
|
||||||
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN , PeriphClkInit->PLLI2S.PLLI2SQ, PeriphClkInit->PLLI2S.PLLI2SR);
|
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN, PeriphClkInit->PLLI2S.PLLI2SQ,
|
||||||
|
PeriphClkInit->PLLI2S.PLLI2SR);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(STM32F413xx) || defined(STM32F423xx)
|
#if defined(STM32F413xx) || defined(STM32F423xx)
|
||||||
/*------- In Case of PLLI2S is selected as source clock for SAI ----------*/
|
/*------- In Case of PLLI2S is selected as source clock for SAI ----------*/
|
||||||
if(((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAIA) == RCC_PERIPHCLK_SAIA) && (PeriphClkInit->SaiAClockSelection == RCC_SAIACLKSOURCE_PLLI2SR)) ||
|
if (((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAIA) == RCC_PERIPHCLK_SAIA)
|
||||||
|
&& (PeriphClkInit->SaiAClockSelection == RCC_SAIACLKSOURCE_PLLI2SR)) ||
|
||||||
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAIB) == RCC_PERIPHCLK_SAIB) && (PeriphClkInit->SaiBClockSelection == RCC_SAIBCLKSOURCE_PLLI2SR)))
|
((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAIB) == RCC_PERIPHCLK_SAIB) && (PeriphClkInit->SaiBClockSelection == RCC_SAIBCLKSOURCE_PLLI2SR)))
|
||||||
{
|
{
|
||||||
/* Check for PLLI2S Parameters */
|
/* Check for PLLI2S Parameters */
|
||||||
|
|
@ -1528,7 +1551,8 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
/* PLLI2S_VCO Input = PLL_SOURCE/PLLI2SM */
|
/* PLLI2S_VCO Input = PLL_SOURCE/PLLI2SM */
|
||||||
/* PLLI2S_VCO Output = PLLI2S_VCO Input * PLLI2SN */
|
/* PLLI2S_VCO Output = PLLI2S_VCO Input * PLLI2SN */
|
||||||
/* SAI_CLK(first level) = PLLI2S_VCO Output/PLLI2SQ */
|
/* SAI_CLK(first level) = PLLI2S_VCO Output/PLLI2SQ */
|
||||||
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN, plli2sq, PeriphClkInit->PLLI2S.PLLI2SR);
|
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN, plli2sq,
|
||||||
|
PeriphClkInit->PLLI2S.PLLI2SR);
|
||||||
|
|
||||||
/* SAI_CLK_x = SAI_CLK(first level)/PLLI2SDIVR */
|
/* SAI_CLK_x = SAI_CLK(first level)/PLLI2SDIVR */
|
||||||
__HAL_RCC_PLLI2S_PLLSAICLKDIVR_CONFIG(PeriphClkInit->PLLI2SDivR);
|
__HAL_RCC_PLLI2S_PLLSAICLKDIVR_CONFIG(PeriphClkInit->PLLI2SDivR);
|
||||||
|
|
@ -1545,7 +1569,8 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
/* Configure the PLLI2S division factors */
|
/* Configure the PLLI2S division factors */
|
||||||
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLI2SM)*/
|
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLI2SM)*/
|
||||||
/* SPDIFRXCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SP */
|
/* SPDIFRXCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SP */
|
||||||
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN , PeriphClkInit->PLLI2S.PLLI2SQ, PeriphClkInit->PLLI2S.PLLI2SR);
|
__HAL_RCC_PLLI2S_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN, PeriphClkInit->PLLI2S.PLLI2SQ,
|
||||||
|
PeriphClkInit->PLLI2S.PLLI2SR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable the PLLI2S */
|
/* Enable the PLLI2S */
|
||||||
|
|
@ -1910,6 +1935,10 @@ uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return frequency;
|
return frequency;
|
||||||
}
|
}
|
||||||
|
|
@ -2140,6 +2169,10 @@ uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return frequency;
|
return frequency;
|
||||||
}
|
}
|
||||||
|
|
@ -2234,7 +2267,8 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
assert_param(IS_RCC_PLLI2SR_VALUE(PeriphClkInit->PLLI2S.PLLI2SR));
|
assert_param(IS_RCC_PLLI2SR_VALUE(PeriphClkInit->PLLI2S.PLLI2SR));
|
||||||
|
|
||||||
/* Configure the PLLI2S multiplication and division factors */
|
/* Configure the PLLI2S multiplication and division factors */
|
||||||
__HAL_RCC_PLLI2S_SAICLK_CONFIG(PeriphClkInit->PLLI2S.PLLI2SN, PeriphClkInit->PLLI2S.PLLI2SQ, PeriphClkInit->PLLI2S.PLLI2SR);
|
__HAL_RCC_PLLI2S_SAICLK_CONFIG(PeriphClkInit->PLLI2S.PLLI2SN, PeriphClkInit->PLLI2S.PLLI2SQ,
|
||||||
|
PeriphClkInit->PLLI2S.PLLI2SR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable the PLLI2S */
|
/* Enable the PLLI2S */
|
||||||
|
|
@ -2491,6 +2525,10 @@ uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return frequency;
|
return frequency;
|
||||||
}
|
}
|
||||||
|
|
@ -2546,7 +2584,8 @@ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClk
|
||||||
/* Configure the PLLI2S division factors */
|
/* Configure the PLLI2S division factors */
|
||||||
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLI2SM) */
|
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLI2SM) */
|
||||||
/* I2SCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SR */
|
/* I2SCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SR */
|
||||||
__HAL_RCC_PLLI2S_I2SCLK_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN, PeriphClkInit->PLLI2S.PLLI2SR);
|
__HAL_RCC_PLLI2S_I2SCLK_CONFIG(PeriphClkInit->PLLI2S.PLLI2SM, PeriphClkInit->PLLI2S.PLLI2SN,
|
||||||
|
PeriphClkInit->PLLI2S.PLLI2SR);
|
||||||
#else
|
#else
|
||||||
/* Configure the PLLI2S division factors */
|
/* Configure the PLLI2S division factors */
|
||||||
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLM) */
|
/* PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) * (PLLI2SN/PLLM) */
|
||||||
|
|
@ -2745,6 +2784,10 @@ uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return frequency;
|
return frequency;
|
||||||
}
|
}
|
||||||
|
|
@ -3282,7 +3325,8 @@ HAL_StatusTypeDef HAL_RCC_DeInit(void)
|
||||||
#endif /* RCC_CIR_PLLSAIRDYIE */
|
#endif /* RCC_CIR_PLLSAIRDYIE */
|
||||||
|
|
||||||
/* Clear all interrupt flags */
|
/* Clear all interrupt flags */
|
||||||
SET_BIT(RCC->CIR, RCC_CIR_LSIRDYC | RCC_CIR_LSERDYC | RCC_CIR_HSIRDYC | RCC_CIR_HSERDYC | RCC_CIR_PLLRDYC | RCC_CIR_CSSC);
|
SET_BIT(RCC->CIR, RCC_CIR_LSIRDYC | RCC_CIR_LSERDYC | RCC_CIR_HSIRDYC | RCC_CIR_HSERDYC | RCC_CIR_PLLRDYC |
|
||||||
|
RCC_CIR_CSSC);
|
||||||
|
|
||||||
#if defined(RCC_CIR_PLLI2SRDYC)
|
#if defined(RCC_CIR_PLLI2SRDYC)
|
||||||
SET_BIT(RCC->CIR, RCC_CIR_PLLI2SRDYC);
|
SET_BIT(RCC->CIR, RCC_CIR_PLLI2SRDYC);
|
||||||
|
|
@ -3332,7 +3376,8 @@ HAL_StatusTypeDef HAL_RCC_DeInit(void)
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
|
HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
|
||||||
{
|
{
|
||||||
uint32_t tickstart, pll_config;
|
uint32_t tickstart;
|
||||||
|
uint32_t pll_config;
|
||||||
|
|
||||||
/* Check Null pointer */
|
/* Check Null pointer */
|
||||||
if (RCC_OscInitStruct == NULL)
|
if (RCC_OscInitStruct == NULL)
|
||||||
|
|
@ -3349,11 +3394,13 @@ HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
|
||||||
assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState));
|
assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState));
|
||||||
/* When the HSE is used as system clock or clock source for PLL in these cases HSE will not disabled */
|
/* When the HSE is used as system clock or clock source for PLL in these cases HSE will not disabled */
|
||||||
#if defined(STM32F446xx)
|
#if defined(STM32F446xx)
|
||||||
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) ||\
|
if ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE)
|
||||||
|
|| \
|
||||||
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)) || \
|
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)) || \
|
||||||
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLLR) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
|
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLLR) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
|
||||||
#else
|
#else
|
||||||
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) ||\
|
if ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE)
|
||||||
|
|| \
|
||||||
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
|
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE)))
|
||||||
#endif /* STM32F446xx */
|
#endif /* STM32F446xx */
|
||||||
{
|
{
|
||||||
|
|
@ -3407,11 +3454,13 @@ HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
|
||||||
|
|
||||||
/* Check if HSI is used as system clock or as PLL source when PLL is selected as system clock */
|
/* Check if HSI is used as system clock or as PLL source when PLL is selected as system clock */
|
||||||
#if defined(STM32F446xx)
|
#if defined(STM32F446xx)
|
||||||
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) ||\
|
if ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI)
|
||||||
|
|| \
|
||||||
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)) || \
|
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)) || \
|
||||||
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLLR) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
|
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLLR) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
|
||||||
#else
|
#else
|
||||||
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) ||\
|
if ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI)
|
||||||
|
|| \
|
||||||
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
|
((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
|
||||||
#endif /* STM32F446xx */
|
#endif /* STM32F446xx */
|
||||||
{
|
{
|
||||||
|
|
@ -3681,7 +3730,7 @@ HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
|
||||||
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) ||
|
||||||
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) ||
|
||||||
(READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)))
|
(READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)))
|
||||||
#endif
|
#endif /* RCC_PLLCFGR_PLLR */
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2016 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
|
@ -306,6 +306,9 @@ HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc)
|
||||||
/* Set RTC state */
|
/* Set RTC state */
|
||||||
hrtc->State = HAL_RTC_STATE_BUSY;
|
hrtc->State = HAL_RTC_STATE_BUSY;
|
||||||
|
|
||||||
|
/* Check whether the calendar needs to be initialized */
|
||||||
|
if (__HAL_RTC_IS_CALENDAR_INITIALIZED(hrtc) == 0U)
|
||||||
|
{
|
||||||
/* Disable the write protection for RTC registers */
|
/* Disable the write protection for RTC registers */
|
||||||
__HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
|
__HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
|
||||||
|
|
||||||
|
|
@ -331,12 +334,21 @@ HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc)
|
||||||
{
|
{
|
||||||
hrtc->Instance->TAFCR &= (uint32_t)~RTC_OUTPUT_TYPE_PUSHPULL;
|
hrtc->Instance->TAFCR &= (uint32_t)~RTC_OUTPUT_TYPE_PUSHPULL;
|
||||||
hrtc->Instance->TAFCR |= (uint32_t)(hrtc->Init.OutPutType);
|
hrtc->Instance->TAFCR |= (uint32_t)(hrtc->Init.OutPutType);
|
||||||
|
|
||||||
hrtc->State = HAL_RTC_STATE_READY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable the write protection for RTC registers */
|
/* Enable the write protection for RTC registers */
|
||||||
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
|
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* The calendar is already initialized */
|
||||||
|
status = HAL_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (status == HAL_OK)
|
||||||
|
{
|
||||||
|
hrtc->State = HAL_RTC_STATE_READY;
|
||||||
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
@ -522,7 +534,7 @@ HAL_StatusTypeDef HAL_RTC_RegisterCallback(RTC_HandleTypeDef *hrtc, HAL_RTC_Call
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Unregisters an RTC Callback
|
* @brief Unregisters an RTC Callback
|
||||||
* RTC callabck is redirected to the weak predefined callback
|
* RTC callback is redirected to the weak predefined callback
|
||||||
* @param hrtc pointer to a RTC_HandleTypeDef structure that contains
|
* @param hrtc pointer to a RTC_HandleTypeDef structure that contains
|
||||||
* the configuration information for RTC.
|
* the configuration information for RTC.
|
||||||
* @param CallbackID ID of the callback to be unregistered
|
* @param CallbackID ID of the callback to be unregistered
|
||||||
|
|
@ -1293,7 +1305,8 @@ HAL_StatusTypeDef HAL_RTC_SetAlarm_IT(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef
|
||||||
/* Wait till RTC ALRAWF flag is set and if timeout is reached exit */
|
/* Wait till RTC ALRAWF flag is set and if timeout is reached exit */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (count-- == 0U)
|
count = count - 1U;
|
||||||
|
if (count == 0U)
|
||||||
{
|
{
|
||||||
/* Enable the write protection for RTC registers */
|
/* Enable the write protection for RTC registers */
|
||||||
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
|
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
|
||||||
|
|
@ -1329,7 +1342,8 @@ HAL_StatusTypeDef HAL_RTC_SetAlarm_IT(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef
|
||||||
/* Wait till RTC ALRBWF flag is set and if timeout is reached exit */
|
/* Wait till RTC ALRBWF flag is set and if timeout is reached exit */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (count-- == 0U)
|
count = count - 1U;
|
||||||
|
if (count == 0U)
|
||||||
{
|
{
|
||||||
/* Enable the write protection for RTC registers */
|
/* Enable the write protection for RTC registers */
|
||||||
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
|
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
|
||||||
|
|
@ -1529,21 +1543,24 @@ HAL_StatusTypeDef HAL_RTC_GetAlarm(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sA
|
||||||
*/
|
*/
|
||||||
void HAL_RTC_AlarmIRQHandler(RTC_HandleTypeDef *hrtc)
|
void HAL_RTC_AlarmIRQHandler(RTC_HandleTypeDef *hrtc)
|
||||||
{
|
{
|
||||||
|
/* Clear the EXTI's line Flag for RTC Alarm */
|
||||||
|
__HAL_RTC_ALARM_EXTI_CLEAR_FLAG();
|
||||||
|
|
||||||
/* Get the Alarm A interrupt source enable status */
|
/* Get the Alarm A interrupt source enable status */
|
||||||
if (__HAL_RTC_ALARM_GET_IT_SOURCE(hrtc, RTC_IT_ALRA) != 0U)
|
if (__HAL_RTC_ALARM_GET_IT_SOURCE(hrtc, RTC_IT_ALRA) != 0U)
|
||||||
{
|
{
|
||||||
/* Get the pending status of the Alarm A Interrupt */
|
/* Get the pending status of the Alarm A Interrupt */
|
||||||
if (__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRAF) != 0U)
|
if (__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRAF) != 0U)
|
||||||
{
|
{
|
||||||
|
/* Clear the Alarm A interrupt pending bit */
|
||||||
|
__HAL_RTC_ALARM_CLEAR_FLAG(hrtc, RTC_FLAG_ALRAF);
|
||||||
|
|
||||||
/* Alarm A callback */
|
/* Alarm A callback */
|
||||||
#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1)
|
#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1)
|
||||||
hrtc->AlarmAEventCallback(hrtc);
|
hrtc->AlarmAEventCallback(hrtc);
|
||||||
#else
|
#else
|
||||||
HAL_RTC_AlarmAEventCallback(hrtc);
|
HAL_RTC_AlarmAEventCallback(hrtc);
|
||||||
#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */
|
#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */
|
||||||
|
|
||||||
/* Clear the Alarm A interrupt pending bit */
|
|
||||||
__HAL_RTC_ALARM_CLEAR_FLAG(hrtc, RTC_FLAG_ALRAF);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1553,21 +1570,18 @@ void HAL_RTC_AlarmIRQHandler(RTC_HandleTypeDef *hrtc)
|
||||||
/* Get the pending status of the Alarm B Interrupt */
|
/* Get the pending status of the Alarm B Interrupt */
|
||||||
if (__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRBF) != 0U)
|
if (__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRBF) != 0U)
|
||||||
{
|
{
|
||||||
|
/* Clear the Alarm B interrupt pending bit */
|
||||||
|
__HAL_RTC_ALARM_CLEAR_FLAG(hrtc, RTC_FLAG_ALRBF);
|
||||||
|
|
||||||
/* Alarm B callback */
|
/* Alarm B callback */
|
||||||
#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1)
|
#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1)
|
||||||
hrtc->AlarmBEventCallback(hrtc);
|
hrtc->AlarmBEventCallback(hrtc);
|
||||||
#else
|
#else
|
||||||
HAL_RTCEx_AlarmBEventCallback(hrtc);
|
HAL_RTCEx_AlarmBEventCallback(hrtc);
|
||||||
#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */
|
#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */
|
||||||
|
|
||||||
/* Clear the Alarm B interrupt pending bit */
|
|
||||||
__HAL_RTC_ALARM_CLEAR_FLAG(hrtc, RTC_FLAG_ALRBF);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear the EXTI's line Flag for RTC Alarm */
|
|
||||||
__HAL_RTC_ALARM_EXTI_CLEAR_FLAG();
|
|
||||||
|
|
||||||
/* Change RTC state */
|
/* Change RTC state */
|
||||||
hrtc->State = HAL_RTC_STATE_READY;
|
hrtc->State = HAL_RTC_STATE_READY;
|
||||||
}
|
}
|
||||||
|
|
@ -1663,8 +1677,8 @@ HAL_StatusTypeDef HAL_RTC_WaitForSynchro(RTC_HandleTypeDef *hrtc)
|
||||||
{
|
{
|
||||||
uint32_t tickstart = 0U;
|
uint32_t tickstart = 0U;
|
||||||
|
|
||||||
/* Clear RSF flag */
|
/* Clear RSF flag, keep reserved bits at reset values (setting other flags has no effect) */
|
||||||
hrtc->Instance->ISR &= (uint32_t)RTC_RSF_MASK;
|
hrtc->Instance->ISR = ((uint32_t)(RTC_RSF_MASK & RTC_ISR_RESERVED_MASK));
|
||||||
|
|
||||||
/* Get tick */
|
/* Get tick */
|
||||||
tickstart = HAL_GetTick();
|
tickstart = HAL_GetTick();
|
||||||
|
|
@ -1859,7 +1873,7 @@ HAL_StatusTypeDef RTC_ExitInitMode(RTC_HandleTypeDef *hrtc)
|
||||||
*/
|
*/
|
||||||
uint8_t RTC_ByteToBcd2(uint8_t number)
|
uint8_t RTC_ByteToBcd2(uint8_t number)
|
||||||
{
|
{
|
||||||
uint8_t bcdhigh = 0U;
|
uint32_t bcdhigh = 0U;
|
||||||
|
|
||||||
while (number >= 10U)
|
while (number >= 10U)
|
||||||
{
|
{
|
||||||
|
|
@ -1877,9 +1891,9 @@ uint8_t RTC_ByteToBcd2(uint8_t number)
|
||||||
*/
|
*/
|
||||||
uint8_t RTC_Bcd2ToByte(uint8_t number)
|
uint8_t RTC_Bcd2ToByte(uint8_t number)
|
||||||
{
|
{
|
||||||
uint8_t tmp = 0U;
|
uint32_t tens = 0U;
|
||||||
tmp = ((uint8_t)(number & (uint8_t)0xF0) >> (uint8_t)0x4) * 10;
|
tens = (((uint32_t)number & 0xF0U) >> 4U) * 10U;
|
||||||
return (tmp + (number & (uint8_t)0x0F));
|
return (uint8_t)(tens + ((uint32_t)number & 0x0FU));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2016 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
|
|
@ -605,6 +605,9 @@ HAL_StatusTypeDef HAL_RTCEx_DeactivateTamper(RTC_HandleTypeDef *hrtc, uint32_t T
|
||||||
*/
|
*/
|
||||||
void HAL_RTCEx_TamperTimeStampIRQHandler(RTC_HandleTypeDef *hrtc)
|
void HAL_RTCEx_TamperTimeStampIRQHandler(RTC_HandleTypeDef *hrtc)
|
||||||
{
|
{
|
||||||
|
/* Clear the EXTI's Flag for RTC Timestamp and Tamper */
|
||||||
|
__HAL_RTC_TAMPER_TIMESTAMP_EXTI_CLEAR_FLAG();
|
||||||
|
|
||||||
/* Get the Timestamp interrupt source enable status */
|
/* Get the Timestamp interrupt source enable status */
|
||||||
if (__HAL_RTC_TIMESTAMP_GET_IT_SOURCE(hrtc, RTC_IT_TS) != 0U)
|
if (__HAL_RTC_TIMESTAMP_GET_IT_SOURCE(hrtc, RTC_IT_TS) != 0U)
|
||||||
{
|
{
|
||||||
|
|
@ -618,7 +621,8 @@ void HAL_RTCEx_TamperTimeStampIRQHandler(RTC_HandleTypeDef *hrtc)
|
||||||
HAL_RTCEx_TimeStampEventCallback(hrtc);
|
HAL_RTCEx_TimeStampEventCallback(hrtc);
|
||||||
#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */
|
#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */
|
||||||
|
|
||||||
/* Clear the Timestamp interrupt pending bit */
|
/* Clear the Timestamp interrupt pending bit after returning from callback
|
||||||
|
as RTC_TSTR and RTC_TSDR registers are cleared when TSF bit is reset */
|
||||||
__HAL_RTC_TIMESTAMP_CLEAR_FLAG(hrtc, RTC_FLAG_TSF);
|
__HAL_RTC_TIMESTAMP_CLEAR_FLAG(hrtc, RTC_FLAG_TSF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -629,15 +633,15 @@ void HAL_RTCEx_TamperTimeStampIRQHandler(RTC_HandleTypeDef *hrtc)
|
||||||
/* Get the pending status of the Tamper 1 Interrupt */
|
/* Get the pending status of the Tamper 1 Interrupt */
|
||||||
if (__HAL_RTC_TAMPER_GET_FLAG(hrtc, RTC_FLAG_TAMP1F) != 0U)
|
if (__HAL_RTC_TAMPER_GET_FLAG(hrtc, RTC_FLAG_TAMP1F) != 0U)
|
||||||
{
|
{
|
||||||
|
/* Clear the Tamper interrupt pending bit */
|
||||||
|
__HAL_RTC_TAMPER_CLEAR_FLAG(hrtc, RTC_FLAG_TAMP1F);
|
||||||
|
|
||||||
/* Tamper callback */
|
/* Tamper callback */
|
||||||
#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1)
|
#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1)
|
||||||
hrtc->Tamper1EventCallback(hrtc);
|
hrtc->Tamper1EventCallback(hrtc);
|
||||||
#else
|
#else
|
||||||
HAL_RTCEx_Tamper1EventCallback(hrtc);
|
HAL_RTCEx_Tamper1EventCallback(hrtc);
|
||||||
#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */
|
#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */
|
||||||
|
|
||||||
/* Clear the Tamper interrupt pending bit */
|
|
||||||
__HAL_RTC_TAMPER_CLEAR_FLAG(hrtc, RTC_FLAG_TAMP1F);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -648,22 +652,19 @@ void HAL_RTCEx_TamperTimeStampIRQHandler(RTC_HandleTypeDef *hrtc)
|
||||||
/* Get the pending status of the Tamper 2 Interrupt */
|
/* Get the pending status of the Tamper 2 Interrupt */
|
||||||
if (__HAL_RTC_TAMPER_GET_FLAG(hrtc, RTC_FLAG_TAMP2F) != 0U)
|
if (__HAL_RTC_TAMPER_GET_FLAG(hrtc, RTC_FLAG_TAMP2F) != 0U)
|
||||||
{
|
{
|
||||||
|
/* Clear the Tamper interrupt pending bit */
|
||||||
|
__HAL_RTC_TAMPER_CLEAR_FLAG(hrtc, RTC_FLAG_TAMP2F);
|
||||||
|
|
||||||
/* Tamper callback */
|
/* Tamper callback */
|
||||||
#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1)
|
#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1)
|
||||||
hrtc->Tamper2EventCallback(hrtc);
|
hrtc->Tamper2EventCallback(hrtc);
|
||||||
#else
|
#else
|
||||||
HAL_RTCEx_Tamper2EventCallback(hrtc);
|
HAL_RTCEx_Tamper2EventCallback(hrtc);
|
||||||
#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */
|
#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */
|
||||||
|
|
||||||
/* Clear the Tamper interrupt pending bit */
|
|
||||||
__HAL_RTC_TAMPER_CLEAR_FLAG(hrtc, RTC_FLAG_TAMP2F);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* RTC_TAMPER2_SUPPORT */
|
#endif /* RTC_TAMPER2_SUPPORT */
|
||||||
|
|
||||||
/* Clear the EXTI's Flag for RTC Timestamp and Tamper */
|
|
||||||
__HAL_RTC_TAMPER_TIMESTAMP_EXTI_CLEAR_FLAG();
|
|
||||||
|
|
||||||
/* Change RTC state */
|
/* Change RTC state */
|
||||||
hrtc->State = HAL_RTC_STATE_READY;
|
hrtc->State = HAL_RTC_STATE_READY;
|
||||||
}
|
}
|
||||||
|
|
@ -979,7 +980,8 @@ HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer_IT(RTC_HandleTypeDef *hrtc, uint32_t
|
||||||
/* Wait till RTC WUTWF flag is reset and if timeout is reached exit */
|
/* Wait till RTC WUTWF flag is reset and if timeout is reached exit */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (count-- == 0U)
|
count = count - 1U;
|
||||||
|
if (count == 0U)
|
||||||
{
|
{
|
||||||
/* Enable the write protection for RTC registers */
|
/* Enable the write protection for RTC registers */
|
||||||
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
|
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
|
||||||
|
|
@ -1006,7 +1008,8 @@ HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer_IT(RTC_HandleTypeDef *hrtc, uint32_t
|
||||||
/* Wait till RTC WUTWF flag is set and if timeout is reached exit */
|
/* Wait till RTC WUTWF flag is set and if timeout is reached exit */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (count-- == 0U)
|
count = count - 1U;
|
||||||
|
if (count == 0U)
|
||||||
{
|
{
|
||||||
/* Enable the write protection for RTC registers */
|
/* Enable the write protection for RTC registers */
|
||||||
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
|
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
|
||||||
|
|
@ -1130,23 +1133,23 @@ uint32_t HAL_RTCEx_GetWakeUpTimer(RTC_HandleTypeDef *hrtc)
|
||||||
*/
|
*/
|
||||||
void HAL_RTCEx_WakeUpTimerIRQHandler(RTC_HandleTypeDef *hrtc)
|
void HAL_RTCEx_WakeUpTimerIRQHandler(RTC_HandleTypeDef *hrtc)
|
||||||
{
|
{
|
||||||
|
/* Clear the EXTI's line Flag for RTC WakeUpTimer */
|
||||||
|
__HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG();
|
||||||
|
|
||||||
/* Get the pending status of the Wakeup timer Interrupt */
|
/* Get the pending status of the Wakeup timer Interrupt */
|
||||||
if (__HAL_RTC_WAKEUPTIMER_GET_FLAG(hrtc, RTC_FLAG_WUTF) != 0U)
|
if (__HAL_RTC_WAKEUPTIMER_GET_FLAG(hrtc, RTC_FLAG_WUTF) != 0U)
|
||||||
{
|
{
|
||||||
|
/* Clear the Wakeup timer interrupt pending bit */
|
||||||
|
__HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(hrtc, RTC_FLAG_WUTF);
|
||||||
|
|
||||||
/* Wakeup timer callback */
|
/* Wakeup timer callback */
|
||||||
#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1)
|
#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1)
|
||||||
hrtc->WakeUpTimerEventCallback(hrtc);
|
hrtc->WakeUpTimerEventCallback(hrtc);
|
||||||
#else
|
#else
|
||||||
HAL_RTCEx_WakeUpTimerEventCallback(hrtc);
|
HAL_RTCEx_WakeUpTimerEventCallback(hrtc);
|
||||||
#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */
|
#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */
|
||||||
|
|
||||||
/* Clear the Wakeup timer interrupt pending bit */
|
|
||||||
__HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(hrtc, RTC_FLAG_WUTF);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear the EXTI's line Flag for RTC WakeUpTimer */
|
|
||||||
__HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG();
|
|
||||||
|
|
||||||
/* Change RTC state */
|
/* Change RTC state */
|
||||||
hrtc->State = HAL_RTC_STATE_READY;
|
hrtc->State = HAL_RTC_STATE_READY;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -204,9 +204,9 @@ all interrupt callbacks are set to the corresponding weak functions:
|
||||||
/** @addtogroup TIM_Private_Functions
|
/** @addtogroup TIM_Private_Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
static void TIM_OC1_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config);
|
static void TIM_OC1_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config);
|
||||||
static void TIM_OC3_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config);
|
static void TIM_OC3_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config);
|
||||||
static void TIM_OC4_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config);
|
static void TIM_OC4_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config);
|
||||||
static void TIM_TI1_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter);
|
static void TIM_TI1_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter);
|
||||||
static void TIM_TI2_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICSelection,
|
static void TIM_TI2_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICSelection,
|
||||||
uint32_t TIM_ICFilter);
|
uint32_t TIM_ICFilter);
|
||||||
|
|
@ -222,7 +222,7 @@ static void TIM_DMADelayPulseCplt(DMA_HandleTypeDef *hdma);
|
||||||
static void TIM_DMATriggerCplt(DMA_HandleTypeDef *hdma);
|
static void TIM_DMATriggerCplt(DMA_HandleTypeDef *hdma);
|
||||||
static void TIM_DMATriggerHalfCplt(DMA_HandleTypeDef *hdma);
|
static void TIM_DMATriggerHalfCplt(DMA_HandleTypeDef *hdma);
|
||||||
static HAL_StatusTypeDef TIM_SlaveTimer_SetConfig(TIM_HandleTypeDef *htim,
|
static HAL_StatusTypeDef TIM_SlaveTimer_SetConfig(TIM_HandleTypeDef *htim,
|
||||||
TIM_SlaveConfigTypeDef *sSlaveConfig);
|
const TIM_SlaveConfigTypeDef *sSlaveConfig);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
@ -275,6 +275,7 @@ HAL_StatusTypeDef HAL_TIM_Base_Init(TIM_HandleTypeDef *htim)
|
||||||
assert_param(IS_TIM_INSTANCE(htim->Instance));
|
assert_param(IS_TIM_INSTANCE(htim->Instance));
|
||||||
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
|
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
|
||||||
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
|
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
|
||||||
|
assert_param(IS_TIM_PERIOD(htim, htim->Init.Period));
|
||||||
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
|
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
|
||||||
|
|
||||||
if (htim->State == HAL_TIM_STATE_RESET)
|
if (htim->State == HAL_TIM_STATE_RESET)
|
||||||
|
|
@ -522,7 +523,7 @@ HAL_StatusTypeDef HAL_TIM_Base_Stop_IT(TIM_HandleTypeDef *htim)
|
||||||
* @param Length The length of data to be transferred from memory to peripheral.
|
* @param Length The length of data to be transferred from memory to peripheral.
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIM_Base_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pData, uint16_t Length)
|
HAL_StatusTypeDef HAL_TIM_Base_Start_DMA(TIM_HandleTypeDef *htim, const uint32_t *pData, uint16_t Length)
|
||||||
{
|
{
|
||||||
uint32_t tmpsmcr;
|
uint32_t tmpsmcr;
|
||||||
|
|
||||||
|
|
@ -536,7 +537,7 @@ HAL_StatusTypeDef HAL_TIM_Base_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pDat
|
||||||
}
|
}
|
||||||
else if (htim->State == HAL_TIM_STATE_READY)
|
else if (htim->State == HAL_TIM_STATE_READY)
|
||||||
{
|
{
|
||||||
if ((pData == NULL) && (Length > 0U))
|
if ((pData == NULL) || (Length == 0U))
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -658,6 +659,7 @@ HAL_StatusTypeDef HAL_TIM_OC_Init(TIM_HandleTypeDef *htim)
|
||||||
assert_param(IS_TIM_INSTANCE(htim->Instance));
|
assert_param(IS_TIM_INSTANCE(htim->Instance));
|
||||||
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
|
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
|
||||||
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
|
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
|
||||||
|
assert_param(IS_TIM_PERIOD(htim, htim->Init.Period));
|
||||||
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
|
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
|
||||||
|
|
||||||
if (htim->State == HAL_TIM_STATE_RESET)
|
if (htim->State == HAL_TIM_STATE_RESET)
|
||||||
|
|
@ -1043,7 +1045,8 @@ HAL_StatusTypeDef HAL_TIM_OC_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel)
|
||||||
* @param Length The length of data to be transferred from memory to TIM peripheral
|
* @param Length The length of data to be transferred from memory to TIM peripheral
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIM_OC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length)
|
HAL_StatusTypeDef HAL_TIM_OC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, const uint32_t *pData,
|
||||||
|
uint16_t Length)
|
||||||
{
|
{
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
uint32_t tmpsmcr;
|
uint32_t tmpsmcr;
|
||||||
|
|
@ -1058,7 +1061,7 @@ HAL_StatusTypeDef HAL_TIM_OC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel
|
||||||
}
|
}
|
||||||
else if (TIM_CHANNEL_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_READY)
|
else if (TIM_CHANNEL_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_READY)
|
||||||
{
|
{
|
||||||
if ((pData == NULL) && (Length > 0U))
|
if ((pData == NULL) || (Length == 0U))
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -1321,6 +1324,7 @@ HAL_StatusTypeDef HAL_TIM_PWM_Init(TIM_HandleTypeDef *htim)
|
||||||
assert_param(IS_TIM_INSTANCE(htim->Instance));
|
assert_param(IS_TIM_INSTANCE(htim->Instance));
|
||||||
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
|
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
|
||||||
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
|
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
|
||||||
|
assert_param(IS_TIM_PERIOD(htim, htim->Init.Period));
|
||||||
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
|
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
|
||||||
|
|
||||||
if (htim->State == HAL_TIM_STATE_RESET)
|
if (htim->State == HAL_TIM_STATE_RESET)
|
||||||
|
|
@ -1706,7 +1710,8 @@ HAL_StatusTypeDef HAL_TIM_PWM_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel)
|
||||||
* @param Length The length of data to be transferred from memory to TIM peripheral
|
* @param Length The length of data to be transferred from memory to TIM peripheral
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIM_PWM_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length)
|
HAL_StatusTypeDef HAL_TIM_PWM_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, const uint32_t *pData,
|
||||||
|
uint16_t Length)
|
||||||
{
|
{
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
uint32_t tmpsmcr;
|
uint32_t tmpsmcr;
|
||||||
|
|
@ -1721,7 +1726,7 @@ HAL_StatusTypeDef HAL_TIM_PWM_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channe
|
||||||
}
|
}
|
||||||
else if (TIM_CHANNEL_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_READY)
|
else if (TIM_CHANNEL_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_READY)
|
||||||
{
|
{
|
||||||
if ((pData == NULL) && (Length > 0U))
|
if ((pData == NULL) || (Length == 0U))
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -1983,6 +1988,7 @@ HAL_StatusTypeDef HAL_TIM_IC_Init(TIM_HandleTypeDef *htim)
|
||||||
assert_param(IS_TIM_INSTANCE(htim->Instance));
|
assert_param(IS_TIM_INSTANCE(htim->Instance));
|
||||||
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
|
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
|
||||||
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
|
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
|
||||||
|
assert_param(IS_TIM_PERIOD(htim, htim->Init.Period));
|
||||||
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
|
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
|
||||||
|
|
||||||
if (htim->State == HAL_TIM_STATE_RESET)
|
if (htim->State == HAL_TIM_STATE_RESET)
|
||||||
|
|
@ -2376,7 +2382,7 @@ HAL_StatusTypeDef HAL_TIM_IC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel
|
||||||
else if ((channel_state == HAL_TIM_CHANNEL_STATE_READY)
|
else if ((channel_state == HAL_TIM_CHANNEL_STATE_READY)
|
||||||
&& (complementary_channel_state == HAL_TIM_CHANNEL_STATE_READY))
|
&& (complementary_channel_state == HAL_TIM_CHANNEL_STATE_READY))
|
||||||
{
|
{
|
||||||
if ((pData == NULL) && (Length > 0U))
|
if ((pData == NULL) || (Length == 0U))
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -2632,6 +2638,7 @@ HAL_StatusTypeDef HAL_TIM_OnePulse_Init(TIM_HandleTypeDef *htim, uint32_t OnePul
|
||||||
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
|
assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode));
|
||||||
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
|
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
|
||||||
assert_param(IS_TIM_OPM_MODE(OnePulseMode));
|
assert_param(IS_TIM_OPM_MODE(OnePulseMode));
|
||||||
|
assert_param(IS_TIM_PERIOD(htim, htim->Init.Period));
|
||||||
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
|
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
|
||||||
|
|
||||||
if (htim->State == HAL_TIM_STATE_RESET)
|
if (htim->State == HAL_TIM_STATE_RESET)
|
||||||
|
|
@ -3009,7 +3016,7 @@ HAL_StatusTypeDef HAL_TIM_OnePulse_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Out
|
||||||
* @param sConfig TIM Encoder Interface configuration structure
|
* @param sConfig TIM Encoder Interface configuration structure
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIM_Encoder_Init(TIM_HandleTypeDef *htim, TIM_Encoder_InitTypeDef *sConfig)
|
HAL_StatusTypeDef HAL_TIM_Encoder_Init(TIM_HandleTypeDef *htim, const TIM_Encoder_InitTypeDef *sConfig)
|
||||||
{
|
{
|
||||||
uint32_t tmpsmcr;
|
uint32_t tmpsmcr;
|
||||||
uint32_t tmpccmr1;
|
uint32_t tmpccmr1;
|
||||||
|
|
@ -3035,6 +3042,7 @@ HAL_StatusTypeDef HAL_TIM_Encoder_Init(TIM_HandleTypeDef *htim, TIM_Encoder_Ini
|
||||||
assert_param(IS_TIM_IC_PRESCALER(sConfig->IC2Prescaler));
|
assert_param(IS_TIM_IC_PRESCALER(sConfig->IC2Prescaler));
|
||||||
assert_param(IS_TIM_IC_FILTER(sConfig->IC1Filter));
|
assert_param(IS_TIM_IC_FILTER(sConfig->IC1Filter));
|
||||||
assert_param(IS_TIM_IC_FILTER(sConfig->IC2Filter));
|
assert_param(IS_TIM_IC_FILTER(sConfig->IC2Filter));
|
||||||
|
assert_param(IS_TIM_PERIOD(htim, htim->Init.Period));
|
||||||
|
|
||||||
if (htim->State == HAL_TIM_STATE_RESET)
|
if (htim->State == HAL_TIM_STATE_RESET)
|
||||||
{
|
{
|
||||||
|
|
@ -3544,7 +3552,7 @@ HAL_StatusTypeDef HAL_TIM_Encoder_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Ch
|
||||||
else if ((channel_1_state == HAL_TIM_CHANNEL_STATE_READY)
|
else if ((channel_1_state == HAL_TIM_CHANNEL_STATE_READY)
|
||||||
&& (complementary_channel_1_state == HAL_TIM_CHANNEL_STATE_READY))
|
&& (complementary_channel_1_state == HAL_TIM_CHANNEL_STATE_READY))
|
||||||
{
|
{
|
||||||
if ((pData1 == NULL) && (Length > 0U))
|
if ((pData1 == NULL) || (Length == 0U))
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -3569,7 +3577,7 @@ HAL_StatusTypeDef HAL_TIM_Encoder_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Ch
|
||||||
else if ((channel_2_state == HAL_TIM_CHANNEL_STATE_READY)
|
else if ((channel_2_state == HAL_TIM_CHANNEL_STATE_READY)
|
||||||
&& (complementary_channel_2_state == HAL_TIM_CHANNEL_STATE_READY))
|
&& (complementary_channel_2_state == HAL_TIM_CHANNEL_STATE_READY))
|
||||||
{
|
{
|
||||||
if ((pData2 == NULL) && (Length > 0U))
|
if ((pData2 == NULL) || (Length == 0U))
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -3598,7 +3606,7 @@ HAL_StatusTypeDef HAL_TIM_Encoder_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Ch
|
||||||
&& (complementary_channel_1_state == HAL_TIM_CHANNEL_STATE_READY)
|
&& (complementary_channel_1_state == HAL_TIM_CHANNEL_STATE_READY)
|
||||||
&& (complementary_channel_2_state == HAL_TIM_CHANNEL_STATE_READY))
|
&& (complementary_channel_2_state == HAL_TIM_CHANNEL_STATE_READY))
|
||||||
{
|
{
|
||||||
if ((((pData1 == NULL) || (pData2 == NULL))) && (Length > 0U))
|
if ((((pData1 == NULL) || (pData2 == NULL))) || (Length == 0U))
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -3814,13 +3822,16 @@ HAL_StatusTypeDef HAL_TIM_Encoder_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Cha
|
||||||
*/
|
*/
|
||||||
void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
|
void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
|
||||||
{
|
{
|
||||||
|
uint32_t itsource = htim->Instance->DIER;
|
||||||
|
uint32_t itflag = htim->Instance->SR;
|
||||||
|
|
||||||
/* Capture compare 1 event */
|
/* Capture compare 1 event */
|
||||||
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC1) != RESET)
|
if ((itflag & (TIM_FLAG_CC1)) == (TIM_FLAG_CC1))
|
||||||
{
|
{
|
||||||
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC1) != RESET)
|
if ((itsource & (TIM_IT_CC1)) == (TIM_IT_CC1))
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC1);
|
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC1);
|
||||||
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1;
|
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1;
|
||||||
|
|
||||||
/* Input capture event */
|
/* Input capture event */
|
||||||
|
|
@ -3848,11 +3859,11 @@ void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Capture compare 2 event */
|
/* Capture compare 2 event */
|
||||||
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC2) != RESET)
|
if ((itflag & (TIM_FLAG_CC2)) == (TIM_FLAG_CC2))
|
||||||
{
|
{
|
||||||
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC2) != RESET)
|
if ((itsource & (TIM_IT_CC2)) == (TIM_IT_CC2))
|
||||||
{
|
{
|
||||||
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC2);
|
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC2);
|
||||||
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2;
|
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2;
|
||||||
/* Input capture event */
|
/* Input capture event */
|
||||||
if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U)
|
if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U)
|
||||||
|
|
@ -3878,11 +3889,11 @@ void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Capture compare 3 event */
|
/* Capture compare 3 event */
|
||||||
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC3) != RESET)
|
if ((itflag & (TIM_FLAG_CC3)) == (TIM_FLAG_CC3))
|
||||||
{
|
{
|
||||||
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC3) != RESET)
|
if ((itsource & (TIM_IT_CC3)) == (TIM_IT_CC3))
|
||||||
{
|
{
|
||||||
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC3);
|
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC3);
|
||||||
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3;
|
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3;
|
||||||
/* Input capture event */
|
/* Input capture event */
|
||||||
if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U)
|
if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U)
|
||||||
|
|
@ -3908,11 +3919,11 @@ void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Capture compare 4 event */
|
/* Capture compare 4 event */
|
||||||
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC4) != RESET)
|
if ((itflag & (TIM_FLAG_CC4)) == (TIM_FLAG_CC4))
|
||||||
{
|
{
|
||||||
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC4) != RESET)
|
if ((itsource & (TIM_IT_CC4)) == (TIM_IT_CC4))
|
||||||
{
|
{
|
||||||
__HAL_TIM_CLEAR_IT(htim, TIM_IT_CC4);
|
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC4);
|
||||||
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4;
|
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4;
|
||||||
/* Input capture event */
|
/* Input capture event */
|
||||||
if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U)
|
if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U)
|
||||||
|
|
@ -3938,11 +3949,11 @@ void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* TIM Update event */
|
/* TIM Update event */
|
||||||
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_UPDATE) != RESET)
|
if ((itflag & (TIM_FLAG_UPDATE)) == (TIM_FLAG_UPDATE))
|
||||||
{
|
{
|
||||||
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_UPDATE) != RESET)
|
if ((itsource & (TIM_IT_UPDATE)) == (TIM_IT_UPDATE))
|
||||||
{
|
{
|
||||||
__HAL_TIM_CLEAR_IT(htim, TIM_IT_UPDATE);
|
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_UPDATE);
|
||||||
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
|
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
|
||||||
htim->PeriodElapsedCallback(htim);
|
htim->PeriodElapsedCallback(htim);
|
||||||
#else
|
#else
|
||||||
|
|
@ -3951,11 +3962,11 @@ void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* TIM Break input event */
|
/* TIM Break input event */
|
||||||
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK) != RESET)
|
if ((itflag & (TIM_FLAG_BREAK)) == (TIM_FLAG_BREAK))
|
||||||
{
|
{
|
||||||
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET)
|
if ((itsource & (TIM_IT_BREAK)) == (TIM_IT_BREAK))
|
||||||
{
|
{
|
||||||
__HAL_TIM_CLEAR_IT(htim, TIM_IT_BREAK);
|
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_BREAK);
|
||||||
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
|
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
|
||||||
htim->BreakCallback(htim);
|
htim->BreakCallback(htim);
|
||||||
#else
|
#else
|
||||||
|
|
@ -3964,11 +3975,11 @@ void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* TIM Trigger detection event */
|
/* TIM Trigger detection event */
|
||||||
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_TRIGGER) != RESET)
|
if ((itflag & (TIM_FLAG_TRIGGER)) == (TIM_FLAG_TRIGGER))
|
||||||
{
|
{
|
||||||
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_TRIGGER) != RESET)
|
if ((itsource & (TIM_IT_TRIGGER)) == (TIM_IT_TRIGGER))
|
||||||
{
|
{
|
||||||
__HAL_TIM_CLEAR_IT(htim, TIM_IT_TRIGGER);
|
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_TRIGGER);
|
||||||
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
|
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
|
||||||
htim->TriggerCallback(htim);
|
htim->TriggerCallback(htim);
|
||||||
#else
|
#else
|
||||||
|
|
@ -3977,11 +3988,11 @@ void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* TIM commutation event */
|
/* TIM commutation event */
|
||||||
if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_COM) != RESET)
|
if ((itflag & (TIM_FLAG_COM)) == (TIM_FLAG_COM))
|
||||||
{
|
{
|
||||||
if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_COM) != RESET)
|
if ((itsource & (TIM_IT_COM)) == (TIM_IT_COM))
|
||||||
{
|
{
|
||||||
__HAL_TIM_CLEAR_IT(htim, TIM_FLAG_COM);
|
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_COM);
|
||||||
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
|
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
|
||||||
htim->CommutationCallback(htim);
|
htim->CommutationCallback(htim);
|
||||||
#else
|
#else
|
||||||
|
|
@ -4028,7 +4039,7 @@ void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIM_OC_ConfigChannel(TIM_HandleTypeDef *htim,
|
HAL_StatusTypeDef HAL_TIM_OC_ConfigChannel(TIM_HandleTypeDef *htim,
|
||||||
TIM_OC_InitTypeDef *sConfig,
|
const TIM_OC_InitTypeDef *sConfig,
|
||||||
uint32_t Channel)
|
uint32_t Channel)
|
||||||
{
|
{
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
|
|
@ -4106,7 +4117,7 @@ HAL_StatusTypeDef HAL_TIM_OC_ConfigChannel(TIM_HandleTypeDef *htim,
|
||||||
* @arg TIM_CHANNEL_4: TIM Channel 4 selected
|
* @arg TIM_CHANNEL_4: TIM Channel 4 selected
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIM_IC_ConfigChannel(TIM_HandleTypeDef *htim, TIM_IC_InitTypeDef *sConfig, uint32_t Channel)
|
HAL_StatusTypeDef HAL_TIM_IC_ConfigChannel(TIM_HandleTypeDef *htim, const TIM_IC_InitTypeDef *sConfig, uint32_t Channel)
|
||||||
{
|
{
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
|
|
||||||
|
|
@ -4206,7 +4217,7 @@ HAL_StatusTypeDef HAL_TIM_IC_ConfigChannel(TIM_HandleTypeDef *htim, TIM_IC_InitT
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim,
|
HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim,
|
||||||
TIM_OC_InitTypeDef *sConfig,
|
const TIM_OC_InitTypeDef *sConfig,
|
||||||
uint32_t Channel)
|
uint32_t Channel)
|
||||||
{
|
{
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
|
|
@ -4468,7 +4479,8 @@ HAL_StatusTypeDef HAL_TIM_OnePulse_ConfigChannel(TIM_HandleTypeDef *htim, TIM_O
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
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, const uint32_t *BurstBuffer,
|
||||||
|
uint32_t BurstLength)
|
||||||
{
|
{
|
||||||
HAL_StatusTypeDef status;
|
HAL_StatusTypeDef status;
|
||||||
|
|
||||||
|
|
@ -4520,7 +4532,7 @@ HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStart(TIM_HandleTypeDef *htim, uint32_t
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIM_DMABurst_MultiWriteStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
|
HAL_StatusTypeDef HAL_TIM_DMABurst_MultiWriteStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
|
||||||
uint32_t BurstRequestSrc, uint32_t *BurstBuffer,
|
uint32_t BurstRequestSrc, const uint32_t *BurstBuffer,
|
||||||
uint32_t BurstLength, uint32_t DataLength)
|
uint32_t BurstLength, uint32_t DataLength)
|
||||||
{
|
{
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
|
|
@ -5160,7 +5172,7 @@ HAL_StatusTypeDef HAL_TIM_GenerateEvent(TIM_HandleTypeDef *htim, uint32_t EventS
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIM_ConfigOCrefClear(TIM_HandleTypeDef *htim,
|
HAL_StatusTypeDef HAL_TIM_ConfigOCrefClear(TIM_HandleTypeDef *htim,
|
||||||
TIM_ClearInputConfigTypeDef *sClearInputConfig,
|
const TIM_ClearInputConfigTypeDef *sClearInputConfig,
|
||||||
uint32_t Channel)
|
uint32_t Channel)
|
||||||
{
|
{
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
|
|
@ -5289,7 +5301,7 @@ HAL_StatusTypeDef HAL_TIM_ConfigOCrefClear(TIM_HandleTypeDef *htim,
|
||||||
* contains the clock source information for the TIM peripheral.
|
* contains the clock source information for the TIM peripheral.
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIM_ConfigClockSource(TIM_HandleTypeDef *htim, TIM_ClockConfigTypeDef *sClockSourceConfig)
|
HAL_StatusTypeDef HAL_TIM_ConfigClockSource(TIM_HandleTypeDef *htim, const TIM_ClockConfigTypeDef *sClockSourceConfig)
|
||||||
{
|
{
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
uint32_t tmpsmcr;
|
uint32_t tmpsmcr;
|
||||||
|
|
@ -5475,7 +5487,7 @@ HAL_StatusTypeDef HAL_TIM_ConfigTI1Input(TIM_HandleTypeDef *htim, uint32_t TI1_S
|
||||||
* (Disable, Reset, Gated, Trigger, External clock mode 1).
|
* (Disable, Reset, Gated, Trigger, External clock mode 1).
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro(TIM_HandleTypeDef *htim, TIM_SlaveConfigTypeDef *sSlaveConfig)
|
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro(TIM_HandleTypeDef *htim, const TIM_SlaveConfigTypeDef *sSlaveConfig)
|
||||||
{
|
{
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_TIM_SLAVE_INSTANCE(htim->Instance));
|
assert_param(IS_TIM_SLAVE_INSTANCE(htim->Instance));
|
||||||
|
|
@ -5516,7 +5528,7 @@ HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro(TIM_HandleTypeDef *htim, TIM_SlaveC
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro_IT(TIM_HandleTypeDef *htim,
|
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro_IT(TIM_HandleTypeDef *htim,
|
||||||
TIM_SlaveConfigTypeDef *sSlaveConfig)
|
const TIM_SlaveConfigTypeDef *sSlaveConfig)
|
||||||
{
|
{
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_TIM_SLAVE_INSTANCE(htim->Instance));
|
assert_param(IS_TIM_SLAVE_INSTANCE(htim->Instance));
|
||||||
|
|
@ -5558,7 +5570,7 @@ HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro_IT(TIM_HandleTypeDef *htim,
|
||||||
* @arg TIM_CHANNEL_4: TIM Channel 4 selected
|
* @arg TIM_CHANNEL_4: TIM Channel 4 selected
|
||||||
* @retval Captured value
|
* @retval Captured value
|
||||||
*/
|
*/
|
||||||
uint32_t HAL_TIM_ReadCapturedValue(TIM_HandleTypeDef *htim, uint32_t Channel)
|
uint32_t HAL_TIM_ReadCapturedValue(const TIM_HandleTypeDef *htim, uint32_t Channel)
|
||||||
{
|
{
|
||||||
uint32_t tmpreg = 0U;
|
uint32_t tmpreg = 0U;
|
||||||
|
|
||||||
|
|
@ -5832,8 +5844,6 @@ HAL_StatusTypeDef HAL_TIM_RegisterCallback(TIM_HandleTypeDef *htim, HAL_TIM_Call
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
/* Process locked */
|
|
||||||
__HAL_LOCK(htim);
|
|
||||||
|
|
||||||
if (htim->State == HAL_TIM_STATE_READY)
|
if (htim->State == HAL_TIM_STATE_READY)
|
||||||
{
|
{
|
||||||
|
|
@ -6025,9 +6035,6 @@ HAL_StatusTypeDef HAL_TIM_RegisterCallback(TIM_HandleTypeDef *htim, HAL_TIM_Call
|
||||||
status = HAL_ERROR;
|
status = HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Release Lock */
|
|
||||||
__HAL_UNLOCK(htim);
|
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -6070,9 +6077,6 @@ HAL_StatusTypeDef HAL_TIM_UnRegisterCallback(TIM_HandleTypeDef *htim, HAL_TIM_Ca
|
||||||
{
|
{
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
|
|
||||||
/* Process locked */
|
|
||||||
__HAL_LOCK(htim);
|
|
||||||
|
|
||||||
if (htim->State == HAL_TIM_STATE_READY)
|
if (htim->State == HAL_TIM_STATE_READY)
|
||||||
{
|
{
|
||||||
switch (CallbackID)
|
switch (CallbackID)
|
||||||
|
|
@ -6304,9 +6308,6 @@ HAL_StatusTypeDef HAL_TIM_UnRegisterCallback(TIM_HandleTypeDef *htim, HAL_TIM_Ca
|
||||||
status = HAL_ERROR;
|
status = HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Release Lock */
|
|
||||||
__HAL_UNLOCK(htim);
|
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
|
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
|
||||||
|
|
@ -6335,7 +6336,7 @@ HAL_StatusTypeDef HAL_TIM_UnRegisterCallback(TIM_HandleTypeDef *htim, HAL_TIM_Ca
|
||||||
* @param htim TIM Base handle
|
* @param htim TIM Base handle
|
||||||
* @retval HAL state
|
* @retval HAL state
|
||||||
*/
|
*/
|
||||||
HAL_TIM_StateTypeDef HAL_TIM_Base_GetState(TIM_HandleTypeDef *htim)
|
HAL_TIM_StateTypeDef HAL_TIM_Base_GetState(const TIM_HandleTypeDef *htim)
|
||||||
{
|
{
|
||||||
return htim->State;
|
return htim->State;
|
||||||
}
|
}
|
||||||
|
|
@ -6345,7 +6346,7 @@ HAL_TIM_StateTypeDef HAL_TIM_Base_GetState(TIM_HandleTypeDef *htim)
|
||||||
* @param htim TIM Output Compare handle
|
* @param htim TIM Output Compare handle
|
||||||
* @retval HAL state
|
* @retval HAL state
|
||||||
*/
|
*/
|
||||||
HAL_TIM_StateTypeDef HAL_TIM_OC_GetState(TIM_HandleTypeDef *htim)
|
HAL_TIM_StateTypeDef HAL_TIM_OC_GetState(const TIM_HandleTypeDef *htim)
|
||||||
{
|
{
|
||||||
return htim->State;
|
return htim->State;
|
||||||
}
|
}
|
||||||
|
|
@ -6355,7 +6356,7 @@ HAL_TIM_StateTypeDef HAL_TIM_OC_GetState(TIM_HandleTypeDef *htim)
|
||||||
* @param htim TIM handle
|
* @param htim TIM handle
|
||||||
* @retval HAL state
|
* @retval HAL state
|
||||||
*/
|
*/
|
||||||
HAL_TIM_StateTypeDef HAL_TIM_PWM_GetState(TIM_HandleTypeDef *htim)
|
HAL_TIM_StateTypeDef HAL_TIM_PWM_GetState(const TIM_HandleTypeDef *htim)
|
||||||
{
|
{
|
||||||
return htim->State;
|
return htim->State;
|
||||||
}
|
}
|
||||||
|
|
@ -6365,7 +6366,7 @@ HAL_TIM_StateTypeDef HAL_TIM_PWM_GetState(TIM_HandleTypeDef *htim)
|
||||||
* @param htim TIM IC handle
|
* @param htim TIM IC handle
|
||||||
* @retval HAL state
|
* @retval HAL state
|
||||||
*/
|
*/
|
||||||
HAL_TIM_StateTypeDef HAL_TIM_IC_GetState(TIM_HandleTypeDef *htim)
|
HAL_TIM_StateTypeDef HAL_TIM_IC_GetState(const TIM_HandleTypeDef *htim)
|
||||||
{
|
{
|
||||||
return htim->State;
|
return htim->State;
|
||||||
}
|
}
|
||||||
|
|
@ -6375,7 +6376,7 @@ HAL_TIM_StateTypeDef HAL_TIM_IC_GetState(TIM_HandleTypeDef *htim)
|
||||||
* @param htim TIM OPM handle
|
* @param htim TIM OPM handle
|
||||||
* @retval HAL state
|
* @retval HAL state
|
||||||
*/
|
*/
|
||||||
HAL_TIM_StateTypeDef HAL_TIM_OnePulse_GetState(TIM_HandleTypeDef *htim)
|
HAL_TIM_StateTypeDef HAL_TIM_OnePulse_GetState(const TIM_HandleTypeDef *htim)
|
||||||
{
|
{
|
||||||
return htim->State;
|
return htim->State;
|
||||||
}
|
}
|
||||||
|
|
@ -6385,7 +6386,7 @@ HAL_TIM_StateTypeDef HAL_TIM_OnePulse_GetState(TIM_HandleTypeDef *htim)
|
||||||
* @param htim TIM Encoder Interface handle
|
* @param htim TIM Encoder Interface handle
|
||||||
* @retval HAL state
|
* @retval HAL state
|
||||||
*/
|
*/
|
||||||
HAL_TIM_StateTypeDef HAL_TIM_Encoder_GetState(TIM_HandleTypeDef *htim)
|
HAL_TIM_StateTypeDef HAL_TIM_Encoder_GetState(const TIM_HandleTypeDef *htim)
|
||||||
{
|
{
|
||||||
return htim->State;
|
return htim->State;
|
||||||
}
|
}
|
||||||
|
|
@ -6395,7 +6396,7 @@ HAL_TIM_StateTypeDef HAL_TIM_Encoder_GetState(TIM_HandleTypeDef *htim)
|
||||||
* @param htim TIM handle
|
* @param htim TIM handle
|
||||||
* @retval Active channel
|
* @retval Active channel
|
||||||
*/
|
*/
|
||||||
HAL_TIM_ActiveChannel HAL_TIM_GetActiveChannel(TIM_HandleTypeDef *htim)
|
HAL_TIM_ActiveChannel HAL_TIM_GetActiveChannel(const TIM_HandleTypeDef *htim)
|
||||||
{
|
{
|
||||||
return htim->Channel;
|
return htim->Channel;
|
||||||
}
|
}
|
||||||
|
|
@ -6413,7 +6414,7 @@ HAL_TIM_ActiveChannel HAL_TIM_GetActiveChannel(TIM_HandleTypeDef *htim)
|
||||||
* @arg TIM_CHANNEL_6: TIM Channel 6
|
* @arg TIM_CHANNEL_6: TIM Channel 6
|
||||||
* @retval TIM Channel state
|
* @retval TIM Channel state
|
||||||
*/
|
*/
|
||||||
HAL_TIM_ChannelStateTypeDef HAL_TIM_GetChannelState(TIM_HandleTypeDef *htim, uint32_t Channel)
|
HAL_TIM_ChannelStateTypeDef HAL_TIM_GetChannelState(const TIM_HandleTypeDef *htim, uint32_t Channel)
|
||||||
{
|
{
|
||||||
HAL_TIM_ChannelStateTypeDef channel_state;
|
HAL_TIM_ChannelStateTypeDef channel_state;
|
||||||
|
|
||||||
|
|
@ -6430,7 +6431,7 @@ HAL_TIM_ChannelStateTypeDef HAL_TIM_GetChannelState(TIM_HandleTypeDef *htim, ui
|
||||||
* @param htim TIM handle
|
* @param htim TIM handle
|
||||||
* @retval DMA burst state
|
* @retval DMA burst state
|
||||||
*/
|
*/
|
||||||
HAL_TIM_DMABurstStateTypeDef HAL_TIM_DMABurstState(TIM_HandleTypeDef *htim)
|
HAL_TIM_DMABurstStateTypeDef HAL_TIM_DMABurstState(const TIM_HandleTypeDef *htim)
|
||||||
{
|
{
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_TIM_DMABURST_INSTANCE(htim->Instance));
|
assert_param(IS_TIM_DMABURST_INSTANCE(htim->Instance));
|
||||||
|
|
@ -6773,7 +6774,7 @@ static void TIM_DMATriggerHalfCplt(DMA_HandleTypeDef *hdma)
|
||||||
* @param Structure TIM Base configuration structure
|
* @param Structure TIM Base configuration structure
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void TIM_Base_SetConfig(TIM_TypeDef *TIMx, TIM_Base_InitTypeDef *Structure)
|
void TIM_Base_SetConfig(TIM_TypeDef *TIMx, const TIM_Base_InitTypeDef *Structure)
|
||||||
{
|
{
|
||||||
uint32_t tmpcr1;
|
uint32_t tmpcr1;
|
||||||
tmpcr1 = TIMx->CR1;
|
tmpcr1 = TIMx->CR1;
|
||||||
|
|
@ -6813,6 +6814,13 @@ void TIM_Base_SetConfig(TIM_TypeDef *TIMx, TIM_Base_InitTypeDef *Structure)
|
||||||
/* Generate an update event to reload the Prescaler
|
/* Generate an update event to reload the Prescaler
|
||||||
and the repetition counter (only for advanced timer) value immediately */
|
and the repetition counter (only for advanced timer) value immediately */
|
||||||
TIMx->EGR = TIM_EGR_UG;
|
TIMx->EGR = TIM_EGR_UG;
|
||||||
|
|
||||||
|
/* Check if the update flag is set after the Update Generation, if so clear the UIF flag */
|
||||||
|
if (HAL_IS_BIT_SET(TIMx->SR, TIM_FLAG_UPDATE))
|
||||||
|
{
|
||||||
|
/* Clear the update flag */
|
||||||
|
CLEAR_BIT(TIMx->SR, TIM_FLAG_UPDATE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6821,17 +6829,18 @@ void TIM_Base_SetConfig(TIM_TypeDef *TIMx, TIM_Base_InitTypeDef *Structure)
|
||||||
* @param OC_Config The output configuration structure
|
* @param OC_Config The output configuration structure
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
static void TIM_OC1_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
|
static void TIM_OC1_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
|
||||||
{
|
{
|
||||||
uint32_t tmpccmrx;
|
uint32_t tmpccmrx;
|
||||||
uint32_t tmpccer;
|
uint32_t tmpccer;
|
||||||
uint32_t tmpcr2;
|
uint32_t tmpcr2;
|
||||||
|
|
||||||
|
/* Get the TIMx CCER register value */
|
||||||
|
tmpccer = TIMx->CCER;
|
||||||
|
|
||||||
/* Disable the Channel 1: Reset the CC1E Bit */
|
/* Disable the Channel 1: Reset the CC1E Bit */
|
||||||
TIMx->CCER &= ~TIM_CCER_CC1E;
|
TIMx->CCER &= ~TIM_CCER_CC1E;
|
||||||
|
|
||||||
/* Get the TIMx CCER register value */
|
|
||||||
tmpccer = TIMx->CCER;
|
|
||||||
/* Get the TIMx CR2 register value */
|
/* Get the TIMx CR2 register value */
|
||||||
tmpcr2 = TIMx->CR2;
|
tmpcr2 = TIMx->CR2;
|
||||||
|
|
||||||
|
|
@ -6896,17 +6905,18 @@ static void TIM_OC1_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
|
||||||
* @param OC_Config The output configuration structure
|
* @param OC_Config The output configuration structure
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
|
void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
|
||||||
{
|
{
|
||||||
uint32_t tmpccmrx;
|
uint32_t tmpccmrx;
|
||||||
uint32_t tmpccer;
|
uint32_t tmpccer;
|
||||||
uint32_t tmpcr2;
|
uint32_t tmpcr2;
|
||||||
|
|
||||||
|
/* Get the TIMx CCER register value */
|
||||||
|
tmpccer = TIMx->CCER;
|
||||||
|
|
||||||
/* Disable the Channel 2: Reset the CC2E Bit */
|
/* Disable the Channel 2: Reset the CC2E Bit */
|
||||||
TIMx->CCER &= ~TIM_CCER_CC2E;
|
TIMx->CCER &= ~TIM_CCER_CC2E;
|
||||||
|
|
||||||
/* Get the TIMx CCER register value */
|
|
||||||
tmpccer = TIMx->CCER;
|
|
||||||
/* Get the TIMx CR2 register value */
|
/* Get the TIMx CR2 register value */
|
||||||
tmpcr2 = TIMx->CR2;
|
tmpcr2 = TIMx->CR2;
|
||||||
|
|
||||||
|
|
@ -6935,7 +6945,6 @@ void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
|
||||||
tmpccer |= (OC_Config->OCNPolarity << 4U);
|
tmpccer |= (OC_Config->OCNPolarity << 4U);
|
||||||
/* Reset the Output N State */
|
/* Reset the Output N State */
|
||||||
tmpccer &= ~TIM_CCER_CC2NE;
|
tmpccer &= ~TIM_CCER_CC2NE;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_TIM_BREAK_INSTANCE(TIMx))
|
if (IS_TIM_BREAK_INSTANCE(TIMx))
|
||||||
|
|
@ -6972,17 +6981,18 @@ void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
|
||||||
* @param OC_Config The output configuration structure
|
* @param OC_Config The output configuration structure
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
static void TIM_OC3_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
|
static void TIM_OC3_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
|
||||||
{
|
{
|
||||||
uint32_t tmpccmrx;
|
uint32_t tmpccmrx;
|
||||||
uint32_t tmpccer;
|
uint32_t tmpccer;
|
||||||
uint32_t tmpcr2;
|
uint32_t tmpcr2;
|
||||||
|
|
||||||
|
/* Get the TIMx CCER register value */
|
||||||
|
tmpccer = TIMx->CCER;
|
||||||
|
|
||||||
/* Disable the Channel 3: Reset the CC2E Bit */
|
/* Disable the Channel 3: Reset the CC2E Bit */
|
||||||
TIMx->CCER &= ~TIM_CCER_CC3E;
|
TIMx->CCER &= ~TIM_CCER_CC3E;
|
||||||
|
|
||||||
/* Get the TIMx CCER register value */
|
|
||||||
tmpccer = TIMx->CCER;
|
|
||||||
/* Get the TIMx CR2 register value */
|
/* Get the TIMx CR2 register value */
|
||||||
tmpcr2 = TIMx->CR2;
|
tmpcr2 = TIMx->CR2;
|
||||||
|
|
||||||
|
|
@ -7046,17 +7056,18 @@ static void TIM_OC3_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
|
||||||
* @param OC_Config The output configuration structure
|
* @param OC_Config The output configuration structure
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
static void TIM_OC4_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
|
static void TIM_OC4_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
|
||||||
{
|
{
|
||||||
uint32_t tmpccmrx;
|
uint32_t tmpccmrx;
|
||||||
uint32_t tmpccer;
|
uint32_t tmpccer;
|
||||||
uint32_t tmpcr2;
|
uint32_t tmpcr2;
|
||||||
|
|
||||||
|
/* Get the TIMx CCER register value */
|
||||||
|
tmpccer = TIMx->CCER;
|
||||||
|
|
||||||
/* Disable the Channel 4: Reset the CC4E Bit */
|
/* Disable the Channel 4: Reset the CC4E Bit */
|
||||||
TIMx->CCER &= ~TIM_CCER_CC4E;
|
TIMx->CCER &= ~TIM_CCER_CC4E;
|
||||||
|
|
||||||
/* Get the TIMx CCER register value */
|
|
||||||
tmpccer = TIMx->CCER;
|
|
||||||
/* Get the TIMx CR2 register value */
|
/* Get the TIMx CR2 register value */
|
||||||
tmpcr2 = TIMx->CR2;
|
tmpcr2 = TIMx->CR2;
|
||||||
|
|
||||||
|
|
@ -7107,7 +7118,7 @@ static void TIM_OC4_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config)
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
static HAL_StatusTypeDef TIM_SlaveTimer_SetConfig(TIM_HandleTypeDef *htim,
|
static HAL_StatusTypeDef TIM_SlaveTimer_SetConfig(TIM_HandleTypeDef *htim,
|
||||||
TIM_SlaveConfigTypeDef *sSlaveConfig)
|
const TIM_SlaveConfigTypeDef *sSlaveConfig)
|
||||||
{
|
{
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
uint32_t tmpsmcr;
|
uint32_t tmpsmcr;
|
||||||
|
|
@ -7247,9 +7258,9 @@ void TIM_TI1_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_
|
||||||
uint32_t tmpccer;
|
uint32_t tmpccer;
|
||||||
|
|
||||||
/* Disable the Channel 1: Reset the CC1E Bit */
|
/* Disable the Channel 1: Reset the CC1E Bit */
|
||||||
|
tmpccer = TIMx->CCER;
|
||||||
TIMx->CCER &= ~TIM_CCER_CC1E;
|
TIMx->CCER &= ~TIM_CCER_CC1E;
|
||||||
tmpccmr1 = TIMx->CCMR1;
|
tmpccmr1 = TIMx->CCMR1;
|
||||||
tmpccer = TIMx->CCER;
|
|
||||||
|
|
||||||
/* Select the Input */
|
/* Select the Input */
|
||||||
if (IS_TIM_CC2_INSTANCE(TIMx) != RESET)
|
if (IS_TIM_CC2_INSTANCE(TIMx) != RESET)
|
||||||
|
|
@ -7337,9 +7348,9 @@ static void TIM_TI2_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32
|
||||||
uint32_t tmpccer;
|
uint32_t tmpccer;
|
||||||
|
|
||||||
/* Disable the Channel 2: Reset the CC2E Bit */
|
/* Disable the Channel 2: Reset the CC2E Bit */
|
||||||
|
tmpccer = TIMx->CCER;
|
||||||
TIMx->CCER &= ~TIM_CCER_CC2E;
|
TIMx->CCER &= ~TIM_CCER_CC2E;
|
||||||
tmpccmr1 = TIMx->CCMR1;
|
tmpccmr1 = TIMx->CCMR1;
|
||||||
tmpccer = TIMx->CCER;
|
|
||||||
|
|
||||||
/* Select the Input */
|
/* Select the Input */
|
||||||
tmpccmr1 &= ~TIM_CCMR1_CC2S;
|
tmpccmr1 &= ~TIM_CCMR1_CC2S;
|
||||||
|
|
@ -7376,9 +7387,9 @@ static void TIM_TI2_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity,
|
||||||
uint32_t tmpccer;
|
uint32_t tmpccer;
|
||||||
|
|
||||||
/* Disable the Channel 2: Reset the CC2E Bit */
|
/* Disable the Channel 2: Reset the CC2E Bit */
|
||||||
|
tmpccer = TIMx->CCER;
|
||||||
TIMx->CCER &= ~TIM_CCER_CC2E;
|
TIMx->CCER &= ~TIM_CCER_CC2E;
|
||||||
tmpccmr1 = TIMx->CCMR1;
|
tmpccmr1 = TIMx->CCMR1;
|
||||||
tmpccer = TIMx->CCER;
|
|
||||||
|
|
||||||
/* Set the filter */
|
/* Set the filter */
|
||||||
tmpccmr1 &= ~TIM_CCMR1_IC2F;
|
tmpccmr1 &= ~TIM_CCMR1_IC2F;
|
||||||
|
|
@ -7420,9 +7431,9 @@ static void TIM_TI3_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32
|
||||||
uint32_t tmpccer;
|
uint32_t tmpccer;
|
||||||
|
|
||||||
/* Disable the Channel 3: Reset the CC3E Bit */
|
/* Disable the Channel 3: Reset the CC3E Bit */
|
||||||
|
tmpccer = TIMx->CCER;
|
||||||
TIMx->CCER &= ~TIM_CCER_CC3E;
|
TIMx->CCER &= ~TIM_CCER_CC3E;
|
||||||
tmpccmr2 = TIMx->CCMR2;
|
tmpccmr2 = TIMx->CCMR2;
|
||||||
tmpccer = TIMx->CCER;
|
|
||||||
|
|
||||||
/* Select the Input */
|
/* Select the Input */
|
||||||
tmpccmr2 &= ~TIM_CCMR2_CC3S;
|
tmpccmr2 &= ~TIM_CCMR2_CC3S;
|
||||||
|
|
@ -7468,9 +7479,9 @@ static void TIM_TI4_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32
|
||||||
uint32_t tmpccer;
|
uint32_t tmpccer;
|
||||||
|
|
||||||
/* Disable the Channel 4: Reset the CC4E Bit */
|
/* Disable the Channel 4: Reset the CC4E Bit */
|
||||||
|
tmpccer = TIMx->CCER;
|
||||||
TIMx->CCER &= ~TIM_CCER_CC4E;
|
TIMx->CCER &= ~TIM_CCER_CC4E;
|
||||||
tmpccmr2 = TIMx->CCMR2;
|
tmpccmr2 = TIMx->CCMR2;
|
||||||
tmpccer = TIMx->CCER;
|
|
||||||
|
|
||||||
/* Select the Input */
|
/* Select the Input */
|
||||||
tmpccmr2 &= ~TIM_CCMR2_CC4S;
|
tmpccmr2 &= ~TIM_CCMR2_CC4S;
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ static void TIM_CCxNChannelCmd(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Cha
|
||||||
* @param sConfig TIM Hall Sensor configuration structure
|
* @param sConfig TIM Hall Sensor configuration structure
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef *htim, TIM_HallSensor_InitTypeDef *sConfig)
|
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef *htim, const TIM_HallSensor_InitTypeDef *sConfig)
|
||||||
{
|
{
|
||||||
TIM_OC_InitTypeDef OC_Config;
|
TIM_OC_InitTypeDef OC_Config;
|
||||||
|
|
||||||
|
|
@ -151,6 +151,7 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef *htim, TIM_HallSen
|
||||||
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
|
assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision));
|
||||||
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
|
assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload));
|
||||||
assert_param(IS_TIM_IC_POLARITY(sConfig->IC1Polarity));
|
assert_param(IS_TIM_IC_POLARITY(sConfig->IC1Polarity));
|
||||||
|
assert_param(IS_TIM_PERIOD(htim, htim->Init.Period));
|
||||||
assert_param(IS_TIM_IC_PRESCALER(sConfig->IC1Prescaler));
|
assert_param(IS_TIM_IC_PRESCALER(sConfig->IC1Prescaler));
|
||||||
assert_param(IS_TIM_IC_FILTER(sConfig->IC1Filter));
|
assert_param(IS_TIM_IC_FILTER(sConfig->IC1Filter));
|
||||||
|
|
||||||
|
|
@ -501,7 +502,7 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef *htim, uint32
|
||||||
else if ((channel_1_state == HAL_TIM_CHANNEL_STATE_READY)
|
else if ((channel_1_state == HAL_TIM_CHANNEL_STATE_READY)
|
||||||
&& (complementary_channel_1_state == HAL_TIM_CHANNEL_STATE_READY))
|
&& (complementary_channel_1_state == HAL_TIM_CHANNEL_STATE_READY))
|
||||||
{
|
{
|
||||||
if ((pData == NULL) && (Length > 0U))
|
if ((pData == NULL) || (Length == 0U))
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -834,7 +835,7 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channe
|
||||||
|
|
||||||
/* Disable the TIM Break interrupt (only if no more channel is active) */
|
/* Disable the TIM Break interrupt (only if no more channel is active) */
|
||||||
tmpccer = htim->Instance->CCER;
|
tmpccer = htim->Instance->CCER;
|
||||||
if ((tmpccer & (TIM_CCER_CC1NE | TIM_CCER_CC2NE | TIM_CCER_CC3NE)) == (uint32_t)RESET)
|
if ((tmpccer & TIM_CCER_CCxNE_MASK) == (uint32_t)RESET)
|
||||||
{
|
{
|
||||||
__HAL_TIM_DISABLE_IT(htim, TIM_IT_BREAK);
|
__HAL_TIM_DISABLE_IT(htim, TIM_IT_BREAK);
|
||||||
}
|
}
|
||||||
|
|
@ -866,7 +867,8 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channe
|
||||||
* @param Length The length of data to be transferred from memory to TIM peripheral
|
* @param Length The length of data to be transferred from memory to TIM peripheral
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length)
|
HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, const uint32_t *pData,
|
||||||
|
uint16_t Length)
|
||||||
{
|
{
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
uint32_t tmpsmcr;
|
uint32_t tmpsmcr;
|
||||||
|
|
@ -881,7 +883,7 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Chan
|
||||||
}
|
}
|
||||||
else if (TIM_CHANNEL_N_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_READY)
|
else if (TIM_CHANNEL_N_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_READY)
|
||||||
{
|
{
|
||||||
if ((pData == NULL) && (Length > 0U))
|
if ((pData == NULL) || (Length == 0U))
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -1079,17 +1081,6 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Chann
|
||||||
(+) Stop the Complementary PWM and disable interrupts.
|
(+) Stop the Complementary PWM and disable interrupts.
|
||||||
(+) Start the Complementary PWM and enable DMA transfers.
|
(+) Start the Complementary PWM and enable DMA transfers.
|
||||||
(+) Stop the Complementary PWM and disable DMA transfers.
|
(+) Stop the Complementary PWM and disable DMA transfers.
|
||||||
(+) Start the Complementary Input Capture measurement.
|
|
||||||
(+) Stop the Complementary Input Capture.
|
|
||||||
(+) Start the Complementary Input Capture and enable interrupts.
|
|
||||||
(+) Stop the Complementary Input Capture and disable interrupts.
|
|
||||||
(+) Start the Complementary Input Capture and enable DMA transfers.
|
|
||||||
(+) Stop the Complementary Input Capture and disable DMA transfers.
|
|
||||||
(+) Start the Complementary One Pulse generation.
|
|
||||||
(+) Stop the Complementary One Pulse.
|
|
||||||
(+) Start the Complementary One Pulse and enable interrupts.
|
|
||||||
(+) Stop the Complementary One Pulse and disable interrupts.
|
|
||||||
|
|
||||||
@endverbatim
|
@endverbatim
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
@ -1315,7 +1306,7 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Chann
|
||||||
|
|
||||||
/* Disable the TIM Break interrupt (only if no more channel is active) */
|
/* Disable the TIM Break interrupt (only if no more channel is active) */
|
||||||
tmpccer = htim->Instance->CCER;
|
tmpccer = htim->Instance->CCER;
|
||||||
if ((tmpccer & (TIM_CCER_CC1NE | TIM_CCER_CC2NE | TIM_CCER_CC3NE)) == (uint32_t)RESET)
|
if ((tmpccer & TIM_CCER_CCxNE_MASK) == (uint32_t)RESET)
|
||||||
{
|
{
|
||||||
__HAL_TIM_DISABLE_IT(htim, TIM_IT_BREAK);
|
__HAL_TIM_DISABLE_IT(htim, TIM_IT_BREAK);
|
||||||
}
|
}
|
||||||
|
|
@ -1347,7 +1338,8 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Chann
|
||||||
* @param Length The length of data to be transferred from memory to TIM peripheral
|
* @param Length The length of data to be transferred from memory to TIM peripheral
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length)
|
HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, const uint32_t *pData,
|
||||||
|
uint16_t Length)
|
||||||
{
|
{
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
uint32_t tmpsmcr;
|
uint32_t tmpsmcr;
|
||||||
|
|
@ -1362,7 +1354,7 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Cha
|
||||||
}
|
}
|
||||||
else if (TIM_CHANNEL_N_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_READY)
|
else if (TIM_CHANNEL_N_STATE_GET(htim, Channel) == HAL_TIM_CHANNEL_STATE_READY)
|
||||||
{
|
{
|
||||||
if ((pData == NULL) && (Length > 0U))
|
if ((pData == NULL) || (Length == 0U))
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
@ -1960,7 +1952,7 @@ HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_DMA(TIM_HandleTypeDef *htim, uint3
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
|
HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
|
||||||
TIM_MasterConfigTypeDef *sMasterConfig)
|
const TIM_MasterConfigTypeDef *sMasterConfig)
|
||||||
{
|
{
|
||||||
uint32_t tmpcr2;
|
uint32_t tmpcr2;
|
||||||
uint32_t tmpsmcr;
|
uint32_t tmpsmcr;
|
||||||
|
|
@ -2021,7 +2013,7 @@ HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim,
|
HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim,
|
||||||
TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig)
|
const TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig)
|
||||||
{
|
{
|
||||||
/* Keep this variable initialized to 0 as it is used to configure BDTR register */
|
/* Keep this variable initialized to 0 as it is used to configure BDTR register */
|
||||||
uint32_t tmpbdtr = 0U;
|
uint32_t tmpbdtr = 0U;
|
||||||
|
|
@ -2098,7 +2090,6 @@ 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)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Check parameters */
|
/* Check parameters */
|
||||||
assert_param(IS_TIM_REMAP(htim->Instance, Remap));
|
assert_param(IS_TIM_REMAP(htim->Instance, Remap));
|
||||||
|
|
||||||
|
|
@ -2149,7 +2140,7 @@ HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Hall commutation changed callback in non-blocking mode
|
* @brief Commutation callback in non-blocking mode
|
||||||
* @param htim TIM handle
|
* @param htim TIM handle
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
|
|
@ -2163,7 +2154,7 @@ __weak void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim)
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @brief Hall commutation changed half complete callback in non-blocking mode
|
* @brief Commutation half complete callback in non-blocking mode
|
||||||
* @param htim TIM handle
|
* @param htim TIM handle
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
|
|
@ -2178,7 +2169,7 @@ __weak void HAL_TIMEx_CommutHalfCpltCallback(TIM_HandleTypeDef *htim)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Hall Break detection callback in non-blocking mode
|
* @brief Break detection callback in non-blocking mode
|
||||||
* @param htim TIM handle
|
* @param htim TIM handle
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
|
|
@ -2215,7 +2206,7 @@ __weak void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim)
|
||||||
* @param htim TIM Hall Sensor handle
|
* @param htim TIM Hall Sensor handle
|
||||||
* @retval HAL state
|
* @retval HAL state
|
||||||
*/
|
*/
|
||||||
HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef *htim)
|
HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(const TIM_HandleTypeDef *htim)
|
||||||
{
|
{
|
||||||
return htim->State;
|
return htim->State;
|
||||||
}
|
}
|
||||||
|
|
@ -2230,7 +2221,7 @@ HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef *htim)
|
||||||
* @arg TIM_CHANNEL_3: TIM Channel 3
|
* @arg TIM_CHANNEL_3: TIM Channel 3
|
||||||
* @retval TIM Complementary channel state
|
* @retval TIM Complementary channel state
|
||||||
*/
|
*/
|
||||||
HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(TIM_HandleTypeDef *htim, uint32_t ChannelN)
|
HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(const TIM_HandleTypeDef *htim, uint32_t ChannelN)
|
||||||
{
|
{
|
||||||
HAL_TIM_ChannelStateTypeDef channel_state;
|
HAL_TIM_ChannelStateTypeDef channel_state;
|
||||||
|
|
||||||
|
|
@ -2329,15 +2320,6 @@ static void TIM_DMADelayPulseNCplt(DMA_HandleTypeDef *hdma)
|
||||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_3, HAL_TIM_CHANNEL_STATE_READY);
|
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_3, HAL_TIM_CHANNEL_STATE_READY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (hdma == htim->hdma[TIM_DMA_ID_CC4])
|
|
||||||
{
|
|
||||||
htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4;
|
|
||||||
|
|
||||||
if (hdma->Init.Mode == DMA_NORMAL)
|
|
||||||
{
|
|
||||||
TIM_CHANNEL_N_STATE_SET(htim, TIM_CHANNEL_4, HAL_TIM_CHANNEL_STATE_READY);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* nothing to do */
|
/* nothing to do */
|
||||||
|
|
@ -2406,13 +2388,13 @@ static void TIM_CCxNChannelCmd(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Cha
|
||||||
{
|
{
|
||||||
uint32_t tmp;
|
uint32_t tmp;
|
||||||
|
|
||||||
tmp = TIM_CCER_CC1NE << (Channel & 0x1FU); /* 0x1FU = 31 bits max shift */
|
tmp = TIM_CCER_CC1NE << (Channel & 0xFU); /* 0xFU = 15 bits max shift */
|
||||||
|
|
||||||
/* Reset the CCxNE Bit */
|
/* Reset the CCxNE Bit */
|
||||||
TIMx->CCER &= ~tmp;
|
TIMx->CCER &= ~tmp;
|
||||||
|
|
||||||
/* Set or reset the CCxNE Bit */
|
/* Set or reset the CCxNE Bit */
|
||||||
TIMx->CCER |= (uint32_t)(ChannelNState << (Channel & 0x1FU)); /* 0x1FU = 31 bits max shift */
|
TIMx->CCER |= (uint32_t)(ChannelNState << (Channel & 0xFU)); /* 0xFU = 15 bits max shift */
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -165,6 +165,26 @@
|
||||||
<WinNumber>1</WinNumber>
|
<WinNumber>1</WinNumber>
|
||||||
<ItemText>hrtc,0x0A</ItemText>
|
<ItemText>hrtc,0x0A</ItemText>
|
||||||
</Ww>
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>3</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>hsd</ItemText>
|
||||||
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>4</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>ret</ItemText>
|
||||||
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>5</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>cardInfo,0x0A</ItemText>
|
||||||
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>6</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>read_buffer</ItemText>
|
||||||
|
</Ww>
|
||||||
</WatchWindow1>
|
</WatchWindow1>
|
||||||
<MemoryWindow1>
|
<MemoryWindow1>
|
||||||
<Mm>
|
<Mm>
|
||||||
|
|
@ -182,7 +202,7 @@
|
||||||
<periodic>1</periodic>
|
<periodic>1</periodic>
|
||||||
<aLwin>1</aLwin>
|
<aLwin>1</aLwin>
|
||||||
<aCover>0</aCover>
|
<aCover>0</aCover>
|
||||||
<aSer1>0</aSer1>
|
<aSer1>1</aSer1>
|
||||||
<aSer2>0</aSer2>
|
<aSer2>0</aSer2>
|
||||||
<aPa>0</aPa>
|
<aPa>0</aPa>
|
||||||
<viewmode>1</viewmode>
|
<viewmode>1</viewmode>
|
||||||
|
|
@ -248,7 +268,7 @@
|
||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>Application/User/Core</GroupName>
|
<GroupName>Application/User/Core</GroupName>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
|
|
@ -295,6 +315,18 @@
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<bDave2>0</bDave2>
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Core/Src/dma.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>dma.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>2</GroupNumber>
|
||||||
|
<FileNumber>6</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
<PathWithFileName>../Core/Src/rtc.c</PathWithFileName>
|
<PathWithFileName>../Core/Src/rtc.c</PathWithFileName>
|
||||||
<FilenameWithoutPath>rtc.c</FilenameWithoutPath>
|
<FilenameWithoutPath>rtc.c</FilenameWithoutPath>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
|
|
@ -302,7 +334,19 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>2</GroupNumber>
|
<GroupNumber>2</GroupNumber>
|
||||||
<FileNumber>6</FileNumber>
|
<FileNumber>7</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Core/Src/sdio.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>sdio.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>2</GroupNumber>
|
||||||
|
<FileNumber>8</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -314,7 +358,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>2</GroupNumber>
|
<GroupNumber>2</GroupNumber>
|
||||||
<FileNumber>7</FileNumber>
|
<FileNumber>9</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -326,7 +370,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>2</GroupNumber>
|
<GroupNumber>2</GroupNumber>
|
||||||
<FileNumber>8</FileNumber>
|
<FileNumber>10</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -344,30 +388,6 @@
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
|
||||||
<GroupNumber>3</GroupNumber>
|
|
||||||
<FileNumber>9</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>stm32f4xx_hal_rcc.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>3</GroupNumber>
|
|
||||||
<FileNumber>10</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>stm32f4xx_hal_rcc_ex.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>3</GroupNumber>
|
<GroupNumber>3</GroupNumber>
|
||||||
<FileNumber>11</FileNumber>
|
<FileNumber>11</FileNumber>
|
||||||
|
|
@ -375,162 +395,6 @@
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<bDave2>0</bDave2>
|
<bDave2>0</bDave2>
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>stm32f4xx_hal_flash.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>3</GroupNumber>
|
|
||||||
<FileNumber>12</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>stm32f4xx_hal_flash_ex.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>3</GroupNumber>
|
|
||||||
<FileNumber>13</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>stm32f4xx_hal_flash_ramfunc.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>3</GroupNumber>
|
|
||||||
<FileNumber>14</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>stm32f4xx_hal_gpio.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>3</GroupNumber>
|
|
||||||
<FileNumber>15</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>stm32f4xx_hal_dma_ex.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>3</GroupNumber>
|
|
||||||
<FileNumber>16</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>stm32f4xx_hal_dma.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>3</GroupNumber>
|
|
||||||
<FileNumber>17</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>stm32f4xx_hal_pwr.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>3</GroupNumber>
|
|
||||||
<FileNumber>18</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>stm32f4xx_hal_pwr_ex.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>3</GroupNumber>
|
|
||||||
<FileNumber>19</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>stm32f4xx_hal_cortex.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>3</GroupNumber>
|
|
||||||
<FileNumber>20</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>stm32f4xx_hal.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>3</GroupNumber>
|
|
||||||
<FileNumber>21</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>stm32f4xx_hal_exti.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>3</GroupNumber>
|
|
||||||
<FileNumber>22</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rtc.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>stm32f4xx_hal_rtc.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>3</GroupNumber>
|
|
||||||
<FileNumber>23</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rtc_ex.c</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>stm32f4xx_hal_rtc_ex.c</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>3</GroupNumber>
|
|
||||||
<FileNumber>24</FileNumber>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c</PathWithFileName>
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c</PathWithFileName>
|
||||||
<FilenameWithoutPath>stm32f4xx_hal_tim.c</FilenameWithoutPath>
|
<FilenameWithoutPath>stm32f4xx_hal_tim.c</FilenameWithoutPath>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
|
|
@ -538,7 +402,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>3</GroupNumber>
|
<GroupNumber>3</GroupNumber>
|
||||||
<FileNumber>25</FileNumber>
|
<FileNumber>12</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -548,6 +412,222 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<bShared>0</bShared>
|
<bShared>0</bShared>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>13</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_rcc.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>14</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_rcc_ex.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>15</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_flash.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>16</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_flash_ex.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>17</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_flash_ramfunc.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>18</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_gpio.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>19</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_dma_ex.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>20</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_dma.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>21</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_pwr.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>22</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_pwr_ex.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>23</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_cortex.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>24</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>25</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_exti.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>26</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rtc.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_rtc.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>27</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rtc_ex.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_rtc_ex.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>28</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_sdmmc.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_ll_sdmmc.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>29</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_sd.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_sd.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>30</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_mmc.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>stm32f4xx_hal_mmc.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
|
|
@ -558,7 +638,7 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>4</GroupNumber>
|
<GroupNumber>4</GroupNumber>
|
||||||
<FileNumber>26</FileNumber>
|
<FileNumber>31</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -578,7 +658,7 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>5</GroupNumber>
|
<GroupNumber>5</GroupNumber>
|
||||||
<FileNumber>27</FileNumber>
|
<FileNumber>32</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -590,7 +670,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>5</GroupNumber>
|
<GroupNumber>5</GroupNumber>
|
||||||
<FileNumber>28</FileNumber>
|
<FileNumber>33</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -602,7 +682,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>5</GroupNumber>
|
<GroupNumber>5</GroupNumber>
|
||||||
<FileNumber>29</FileNumber>
|
<FileNumber>34</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -614,7 +694,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>5</GroupNumber>
|
<GroupNumber>5</GroupNumber>
|
||||||
<FileNumber>30</FileNumber>
|
<FileNumber>35</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -626,7 +706,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>5</GroupNumber>
|
<GroupNumber>5</GroupNumber>
|
||||||
<FileNumber>31</FileNumber>
|
<FileNumber>36</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -638,7 +718,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>5</GroupNumber>
|
<GroupNumber>5</GroupNumber>
|
||||||
<FileNumber>32</FileNumber>
|
<FileNumber>37</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -650,7 +730,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>5</GroupNumber>
|
<GroupNumber>5</GroupNumber>
|
||||||
<FileNumber>33</FileNumber>
|
<FileNumber>38</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -662,7 +742,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>5</GroupNumber>
|
<GroupNumber>5</GroupNumber>
|
||||||
<FileNumber>34</FileNumber>
|
<FileNumber>39</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -674,7 +754,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>5</GroupNumber>
|
<GroupNumber>5</GroupNumber>
|
||||||
<FileNumber>35</FileNumber>
|
<FileNumber>40</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -686,7 +766,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>5</GroupNumber>
|
<GroupNumber>5</GroupNumber>
|
||||||
<FileNumber>36</FileNumber>
|
<FileNumber>41</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -706,7 +786,7 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>6</GroupNumber>
|
<GroupNumber>6</GroupNumber>
|
||||||
<FileNumber>37</FileNumber>
|
<FileNumber>42</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -726,7 +806,7 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>7</GroupNumber>
|
<GroupNumber>7</GroupNumber>
|
||||||
<FileNumber>38</FileNumber>
|
<FileNumber>43</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -738,7 +818,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>7</GroupNumber>
|
<GroupNumber>7</GroupNumber>
|
||||||
<FileNumber>39</FileNumber>
|
<FileNumber>44</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -758,7 +838,7 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>8</GroupNumber>
|
<GroupNumber>8</GroupNumber>
|
||||||
<FileNumber>40</FileNumber>
|
<FileNumber>45</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -770,7 +850,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>8</GroupNumber>
|
<GroupNumber>8</GroupNumber>
|
||||||
<FileNumber>41</FileNumber>
|
<FileNumber>46</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -782,7 +862,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>8</GroupNumber>
|
<GroupNumber>8</GroupNumber>
|
||||||
<FileNumber>42</FileNumber>
|
<FileNumber>47</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -802,7 +882,7 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>43</FileNumber>
|
<FileNumber>48</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -814,7 +894,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>44</FileNumber>
|
<FileNumber>49</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -826,7 +906,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>45</FileNumber>
|
<FileNumber>50</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -838,7 +918,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>46</FileNumber>
|
<FileNumber>51</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -850,7 +930,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>47</FileNumber>
|
<FileNumber>52</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -862,7 +942,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>48</FileNumber>
|
<FileNumber>53</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -874,7 +954,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>49</FileNumber>
|
<FileNumber>54</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -886,7 +966,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>50</FileNumber>
|
<FileNumber>55</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -898,7 +978,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>51</FileNumber>
|
<FileNumber>56</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -910,7 +990,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>52</FileNumber>
|
<FileNumber>57</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -922,7 +1002,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>53</FileNumber>
|
<FileNumber>58</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -934,7 +1014,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>54</FileNumber>
|
<FileNumber>59</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -946,7 +1026,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>55</FileNumber>
|
<FileNumber>60</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -958,7 +1038,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>9</GroupNumber>
|
<GroupNumber>9</GroupNumber>
|
||||||
<FileNumber>56</FileNumber>
|
<FileNumber>61</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -978,7 +1058,7 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>10</GroupNumber>
|
<GroupNumber>10</GroupNumber>
|
||||||
<FileNumber>57</FileNumber>
|
<FileNumber>62</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -990,7 +1070,7 @@
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>10</GroupNumber>
|
<GroupNumber>10</GroupNumber>
|
||||||
<FileNumber>58</FileNumber>
|
<FileNumber>63</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
</BeforeMake>
|
</BeforeMake>
|
||||||
<AfterMake>
|
<AfterMake>
|
||||||
<RunUserProg1>0</RunUserProg1>
|
<RunUserProg1>0</RunUserProg1>
|
||||||
<RunUserProg2>0</RunUserProg2>
|
<RunUserProg2>1</RunUserProg2>
|
||||||
<UserProg1Name></UserProg1Name>
|
<UserProg1Name></UserProg1Name>
|
||||||
<UserProg2Name></UserProg2Name>
|
<UserProg2Name></UserProg2Name>
|
||||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||||
|
|
@ -459,6 +459,62 @@
|
||||||
</FileArmAds>
|
</FileArmAds>
|
||||||
</FileOption>
|
</FileOption>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>dma.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>../Core/Src/dma.c</FilePath>
|
||||||
|
<FileOption>
|
||||||
|
<CommonProperty>
|
||||||
|
<UseCPPCompiler>2</UseCPPCompiler>
|
||||||
|
<RVCTCodeConst>0</RVCTCodeConst>
|
||||||
|
<RVCTZI>0</RVCTZI>
|
||||||
|
<RVCTOtherData>0</RVCTOtherData>
|
||||||
|
<ModuleSelection>0</ModuleSelection>
|
||||||
|
<IncludeInBuild>1</IncludeInBuild>
|
||||||
|
<AlwaysBuild>2</AlwaysBuild>
|
||||||
|
<GenerateAssemblyFile>2</GenerateAssemblyFile>
|
||||||
|
<AssembleAssemblyFile>2</AssembleAssemblyFile>
|
||||||
|
<PublicsOnly>2</PublicsOnly>
|
||||||
|
<StopOnExitCode>11</StopOnExitCode>
|
||||||
|
<CustomArgument></CustomArgument>
|
||||||
|
<IncludeLibraryModules></IncludeLibraryModules>
|
||||||
|
<ComprImg>1</ComprImg>
|
||||||
|
</CommonProperty>
|
||||||
|
<FileArmAds>
|
||||||
|
<Cads>
|
||||||
|
<interw>2</interw>
|
||||||
|
<Optim>0</Optim>
|
||||||
|
<oTime>2</oTime>
|
||||||
|
<SplitLS>2</SplitLS>
|
||||||
|
<OneElfS>2</OneElfS>
|
||||||
|
<Strict>2</Strict>
|
||||||
|
<EnumInt>2</EnumInt>
|
||||||
|
<PlainCh>2</PlainCh>
|
||||||
|
<Ropi>2</Ropi>
|
||||||
|
<Rwpi>2</Rwpi>
|
||||||
|
<wLevel>0</wLevel>
|
||||||
|
<uThumb>2</uThumb>
|
||||||
|
<uSurpInc>2</uSurpInc>
|
||||||
|
<uC99>2</uC99>
|
||||||
|
<uGnu>2</uGnu>
|
||||||
|
<useXO>2</useXO>
|
||||||
|
<v6Lang>0</v6Lang>
|
||||||
|
<v6LangP>0</v6LangP>
|
||||||
|
<vShortEn>2</vShortEn>
|
||||||
|
<vShortWch>2</vShortWch>
|
||||||
|
<v6Lto>2</v6Lto>
|
||||||
|
<v6WtE>2</v6WtE>
|
||||||
|
<v6Rtti>2</v6Rtti>
|
||||||
|
<VariousControls>
|
||||||
|
<MiscControls></MiscControls>
|
||||||
|
<Define></Define>
|
||||||
|
<Undefine></Undefine>
|
||||||
|
<IncludePath></IncludePath>
|
||||||
|
</VariousControls>
|
||||||
|
</Cads>
|
||||||
|
</FileArmAds>
|
||||||
|
</FileOption>
|
||||||
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>rtc.c</FileName>
|
<FileName>rtc.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
|
|
@ -515,6 +571,62 @@
|
||||||
</FileArmAds>
|
</FileArmAds>
|
||||||
</FileOption>
|
</FileOption>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>sdio.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>../Core/Src/sdio.c</FilePath>
|
||||||
|
<FileOption>
|
||||||
|
<CommonProperty>
|
||||||
|
<UseCPPCompiler>2</UseCPPCompiler>
|
||||||
|
<RVCTCodeConst>0</RVCTCodeConst>
|
||||||
|
<RVCTZI>0</RVCTZI>
|
||||||
|
<RVCTOtherData>0</RVCTOtherData>
|
||||||
|
<ModuleSelection>0</ModuleSelection>
|
||||||
|
<IncludeInBuild>1</IncludeInBuild>
|
||||||
|
<AlwaysBuild>2</AlwaysBuild>
|
||||||
|
<GenerateAssemblyFile>2</GenerateAssemblyFile>
|
||||||
|
<AssembleAssemblyFile>2</AssembleAssemblyFile>
|
||||||
|
<PublicsOnly>2</PublicsOnly>
|
||||||
|
<StopOnExitCode>11</StopOnExitCode>
|
||||||
|
<CustomArgument></CustomArgument>
|
||||||
|
<IncludeLibraryModules></IncludeLibraryModules>
|
||||||
|
<ComprImg>1</ComprImg>
|
||||||
|
</CommonProperty>
|
||||||
|
<FileArmAds>
|
||||||
|
<Cads>
|
||||||
|
<interw>2</interw>
|
||||||
|
<Optim>0</Optim>
|
||||||
|
<oTime>2</oTime>
|
||||||
|
<SplitLS>2</SplitLS>
|
||||||
|
<OneElfS>2</OneElfS>
|
||||||
|
<Strict>2</Strict>
|
||||||
|
<EnumInt>2</EnumInt>
|
||||||
|
<PlainCh>2</PlainCh>
|
||||||
|
<Ropi>2</Ropi>
|
||||||
|
<Rwpi>2</Rwpi>
|
||||||
|
<wLevel>0</wLevel>
|
||||||
|
<uThumb>2</uThumb>
|
||||||
|
<uSurpInc>2</uSurpInc>
|
||||||
|
<uC99>2</uC99>
|
||||||
|
<uGnu>2</uGnu>
|
||||||
|
<useXO>2</useXO>
|
||||||
|
<v6Lang>0</v6Lang>
|
||||||
|
<v6LangP>0</v6LangP>
|
||||||
|
<vShortEn>2</vShortEn>
|
||||||
|
<vShortWch>2</vShortWch>
|
||||||
|
<v6Lto>2</v6Lto>
|
||||||
|
<v6WtE>2</v6WtE>
|
||||||
|
<v6Rtti>2</v6Rtti>
|
||||||
|
<VariousControls>
|
||||||
|
<MiscControls></MiscControls>
|
||||||
|
<Define></Define>
|
||||||
|
<Undefine></Undefine>
|
||||||
|
<IncludePath></IncludePath>
|
||||||
|
</VariousControls>
|
||||||
|
</Cads>
|
||||||
|
</FileArmAds>
|
||||||
|
</FileOption>
|
||||||
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_it.c</FileName>
|
<FileName>stm32f4xx_it.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
|
|
@ -586,6 +698,16 @@
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>Drivers/STM32F4xx_HAL_Driver</GroupName>
|
<GroupName>Drivers/STM32F4xx_HAL_Driver</GroupName>
|
||||||
<Files>
|
<Files>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_tim.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_tim_ex.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.c</FilePath>
|
||||||
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_hal_rcc.c</FileName>
|
<FileName>stm32f4xx_hal_rcc.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
|
|
@ -764,14 +886,172 @@
|
||||||
</FileOption>
|
</FileOption>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_hal_tim.c</FileName>
|
<FileName>stm32f4xx_ll_sdmmc.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c</FilePath>
|
<FilePath>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_sdmmc.c</FilePath>
|
||||||
|
<FileOption>
|
||||||
|
<CommonProperty>
|
||||||
|
<UseCPPCompiler>2</UseCPPCompiler>
|
||||||
|
<RVCTCodeConst>0</RVCTCodeConst>
|
||||||
|
<RVCTZI>0</RVCTZI>
|
||||||
|
<RVCTOtherData>0</RVCTOtherData>
|
||||||
|
<ModuleSelection>0</ModuleSelection>
|
||||||
|
<IncludeInBuild>1</IncludeInBuild>
|
||||||
|
<AlwaysBuild>2</AlwaysBuild>
|
||||||
|
<GenerateAssemblyFile>2</GenerateAssemblyFile>
|
||||||
|
<AssembleAssemblyFile>2</AssembleAssemblyFile>
|
||||||
|
<PublicsOnly>2</PublicsOnly>
|
||||||
|
<StopOnExitCode>11</StopOnExitCode>
|
||||||
|
<CustomArgument></CustomArgument>
|
||||||
|
<IncludeLibraryModules></IncludeLibraryModules>
|
||||||
|
<ComprImg>1</ComprImg>
|
||||||
|
</CommonProperty>
|
||||||
|
<FileArmAds>
|
||||||
|
<Cads>
|
||||||
|
<interw>2</interw>
|
||||||
|
<Optim>0</Optim>
|
||||||
|
<oTime>2</oTime>
|
||||||
|
<SplitLS>2</SplitLS>
|
||||||
|
<OneElfS>2</OneElfS>
|
||||||
|
<Strict>2</Strict>
|
||||||
|
<EnumInt>2</EnumInt>
|
||||||
|
<PlainCh>2</PlainCh>
|
||||||
|
<Ropi>2</Ropi>
|
||||||
|
<Rwpi>2</Rwpi>
|
||||||
|
<wLevel>0</wLevel>
|
||||||
|
<uThumb>2</uThumb>
|
||||||
|
<uSurpInc>2</uSurpInc>
|
||||||
|
<uC99>2</uC99>
|
||||||
|
<uGnu>2</uGnu>
|
||||||
|
<useXO>2</useXO>
|
||||||
|
<v6Lang>0</v6Lang>
|
||||||
|
<v6LangP>0</v6LangP>
|
||||||
|
<vShortEn>2</vShortEn>
|
||||||
|
<vShortWch>2</vShortWch>
|
||||||
|
<v6Lto>2</v6Lto>
|
||||||
|
<v6WtE>2</v6WtE>
|
||||||
|
<v6Rtti>2</v6Rtti>
|
||||||
|
<VariousControls>
|
||||||
|
<MiscControls></MiscControls>
|
||||||
|
<Define></Define>
|
||||||
|
<Undefine></Undefine>
|
||||||
|
<IncludePath></IncludePath>
|
||||||
|
</VariousControls>
|
||||||
|
</Cads>
|
||||||
|
</FileArmAds>
|
||||||
|
</FileOption>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_hal_tim_ex.c</FileName>
|
<FileName>stm32f4xx_hal_sd.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.c</FilePath>
|
<FilePath>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_sd.c</FilePath>
|
||||||
|
<FileOption>
|
||||||
|
<CommonProperty>
|
||||||
|
<UseCPPCompiler>2</UseCPPCompiler>
|
||||||
|
<RVCTCodeConst>0</RVCTCodeConst>
|
||||||
|
<RVCTZI>0</RVCTZI>
|
||||||
|
<RVCTOtherData>0</RVCTOtherData>
|
||||||
|
<ModuleSelection>0</ModuleSelection>
|
||||||
|
<IncludeInBuild>1</IncludeInBuild>
|
||||||
|
<AlwaysBuild>2</AlwaysBuild>
|
||||||
|
<GenerateAssemblyFile>2</GenerateAssemblyFile>
|
||||||
|
<AssembleAssemblyFile>2</AssembleAssemblyFile>
|
||||||
|
<PublicsOnly>2</PublicsOnly>
|
||||||
|
<StopOnExitCode>11</StopOnExitCode>
|
||||||
|
<CustomArgument></CustomArgument>
|
||||||
|
<IncludeLibraryModules></IncludeLibraryModules>
|
||||||
|
<ComprImg>1</ComprImg>
|
||||||
|
</CommonProperty>
|
||||||
|
<FileArmAds>
|
||||||
|
<Cads>
|
||||||
|
<interw>2</interw>
|
||||||
|
<Optim>0</Optim>
|
||||||
|
<oTime>2</oTime>
|
||||||
|
<SplitLS>2</SplitLS>
|
||||||
|
<OneElfS>2</OneElfS>
|
||||||
|
<Strict>2</Strict>
|
||||||
|
<EnumInt>2</EnumInt>
|
||||||
|
<PlainCh>2</PlainCh>
|
||||||
|
<Ropi>2</Ropi>
|
||||||
|
<Rwpi>2</Rwpi>
|
||||||
|
<wLevel>0</wLevel>
|
||||||
|
<uThumb>2</uThumb>
|
||||||
|
<uSurpInc>2</uSurpInc>
|
||||||
|
<uC99>2</uC99>
|
||||||
|
<uGnu>2</uGnu>
|
||||||
|
<useXO>2</useXO>
|
||||||
|
<v6Lang>0</v6Lang>
|
||||||
|
<v6LangP>0</v6LangP>
|
||||||
|
<vShortEn>2</vShortEn>
|
||||||
|
<vShortWch>2</vShortWch>
|
||||||
|
<v6Lto>2</v6Lto>
|
||||||
|
<v6WtE>2</v6WtE>
|
||||||
|
<v6Rtti>2</v6Rtti>
|
||||||
|
<VariousControls>
|
||||||
|
<MiscControls></MiscControls>
|
||||||
|
<Define></Define>
|
||||||
|
<Undefine></Undefine>
|
||||||
|
<IncludePath></IncludePath>
|
||||||
|
</VariousControls>
|
||||||
|
</Cads>
|
||||||
|
</FileArmAds>
|
||||||
|
</FileOption>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_mmc.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_mmc.c</FilePath>
|
||||||
|
<FileOption>
|
||||||
|
<CommonProperty>
|
||||||
|
<UseCPPCompiler>2</UseCPPCompiler>
|
||||||
|
<RVCTCodeConst>0</RVCTCodeConst>
|
||||||
|
<RVCTZI>0</RVCTZI>
|
||||||
|
<RVCTOtherData>0</RVCTOtherData>
|
||||||
|
<ModuleSelection>0</ModuleSelection>
|
||||||
|
<IncludeInBuild>1</IncludeInBuild>
|
||||||
|
<AlwaysBuild>2</AlwaysBuild>
|
||||||
|
<GenerateAssemblyFile>2</GenerateAssemblyFile>
|
||||||
|
<AssembleAssemblyFile>2</AssembleAssemblyFile>
|
||||||
|
<PublicsOnly>2</PublicsOnly>
|
||||||
|
<StopOnExitCode>11</StopOnExitCode>
|
||||||
|
<CustomArgument></CustomArgument>
|
||||||
|
<IncludeLibraryModules></IncludeLibraryModules>
|
||||||
|
<ComprImg>1</ComprImg>
|
||||||
|
</CommonProperty>
|
||||||
|
<FileArmAds>
|
||||||
|
<Cads>
|
||||||
|
<interw>2</interw>
|
||||||
|
<Optim>0</Optim>
|
||||||
|
<oTime>2</oTime>
|
||||||
|
<SplitLS>2</SplitLS>
|
||||||
|
<OneElfS>2</OneElfS>
|
||||||
|
<Strict>2</Strict>
|
||||||
|
<EnumInt>2</EnumInt>
|
||||||
|
<PlainCh>2</PlainCh>
|
||||||
|
<Ropi>2</Ropi>
|
||||||
|
<Rwpi>2</Rwpi>
|
||||||
|
<wLevel>0</wLevel>
|
||||||
|
<uThumb>2</uThumb>
|
||||||
|
<uSurpInc>2</uSurpInc>
|
||||||
|
<uC99>2</uC99>
|
||||||
|
<uGnu>2</uGnu>
|
||||||
|
<useXO>2</useXO>
|
||||||
|
<v6Lang>0</v6Lang>
|
||||||
|
<v6LangP>0</v6LangP>
|
||||||
|
<vShortEn>2</vShortEn>
|
||||||
|
<vShortWch>2</vShortWch>
|
||||||
|
<v6Lto>2</v6Lto>
|
||||||
|
<v6WtE>2</v6WtE>
|
||||||
|
<v6Rtti>2</v6Rtti>
|
||||||
|
<VariousControls>
|
||||||
|
<MiscControls></MiscControls>
|
||||||
|
<Define></Define>
|
||||||
|
<Undefine></Undefine>
|
||||||
|
<IncludePath></IncludePath>
|
||||||
|
</VariousControls>
|
||||||
|
</Cads>
|
||||||
|
</FileArmAds>
|
||||||
|
</FileOption>
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
@ -1441,57 +1721,6 @@
|
||||||
<FileName>sd.c</FileName>
|
<FileName>sd.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\User\board\sd.c</FilePath>
|
<FilePath>..\User\board\sd.c</FilePath>
|
||||||
<FileOption>
|
|
||||||
<CommonProperty>
|
|
||||||
<UseCPPCompiler>2</UseCPPCompiler>
|
|
||||||
<RVCTCodeConst>0</RVCTCodeConst>
|
|
||||||
<RVCTZI>0</RVCTZI>
|
|
||||||
<RVCTOtherData>0</RVCTOtherData>
|
|
||||||
<ModuleSelection>0</ModuleSelection>
|
|
||||||
<IncludeInBuild>0</IncludeInBuild>
|
|
||||||
<AlwaysBuild>0</AlwaysBuild>
|
|
||||||
<GenerateAssemblyFile>2</GenerateAssemblyFile>
|
|
||||||
<AssembleAssemblyFile>2</AssembleAssemblyFile>
|
|
||||||
<PublicsOnly>2</PublicsOnly>
|
|
||||||
<StopOnExitCode>11</StopOnExitCode>
|
|
||||||
<CustomArgument></CustomArgument>
|
|
||||||
<IncludeLibraryModules></IncludeLibraryModules>
|
|
||||||
<ComprImg>1</ComprImg>
|
|
||||||
</CommonProperty>
|
|
||||||
<FileArmAds>
|
|
||||||
<Cads>
|
|
||||||
<interw>2</interw>
|
|
||||||
<Optim>0</Optim>
|
|
||||||
<oTime>2</oTime>
|
|
||||||
<SplitLS>2</SplitLS>
|
|
||||||
<OneElfS>2</OneElfS>
|
|
||||||
<Strict>2</Strict>
|
|
||||||
<EnumInt>2</EnumInt>
|
|
||||||
<PlainCh>2</PlainCh>
|
|
||||||
<Ropi>2</Ropi>
|
|
||||||
<Rwpi>2</Rwpi>
|
|
||||||
<wLevel>0</wLevel>
|
|
||||||
<uThumb>2</uThumb>
|
|
||||||
<uSurpInc>2</uSurpInc>
|
|
||||||
<uC99>2</uC99>
|
|
||||||
<uGnu>2</uGnu>
|
|
||||||
<useXO>2</useXO>
|
|
||||||
<v6Lang>0</v6Lang>
|
|
||||||
<v6LangP>0</v6LangP>
|
|
||||||
<vShortEn>2</vShortEn>
|
|
||||||
<vShortWch>2</vShortWch>
|
|
||||||
<v6Lto>2</v6Lto>
|
|
||||||
<v6WtE>2</v6WtE>
|
|
||||||
<v6Rtti>2</v6Rtti>
|
|
||||||
<VariousControls>
|
|
||||||
<MiscControls></MiscControls>
|
|
||||||
<Define></Define>
|
|
||||||
<Undefine></Undefine>
|
|
||||||
<IncludePath></IncludePath>
|
|
||||||
</VariousControls>
|
|
||||||
</Cads>
|
|
||||||
</FileArmAds>
|
|
||||||
</FileOption>
|
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -7,8 +7,11 @@ void business_task(void *pvParameters)
|
||||||
{
|
{
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
led_toggle(LED_USER);
|
|
||||||
rtc_update();
|
rtc_update();
|
||||||
|
if (sd_test() == TRUE)
|
||||||
|
{
|
||||||
|
led_toggle(LED_USER);
|
||||||
|
}
|
||||||
vTaskDelay(1000);
|
vTaskDelay(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -18,7 +21,7 @@ void app_init(void)
|
||||||
// 创建任务
|
// 创建任务
|
||||||
xTaskCreate((TaskFunction_t)business_task, // 任务入口函数
|
xTaskCreate((TaskFunction_t)business_task, // 任务入口函数
|
||||||
(const char *)"business_task", // 任务名字
|
(const char *)"business_task", // 任务名字
|
||||||
(uint16_t)configMINIMAL_STACK_SIZE, // 任务栈大小
|
(uint16_t)1024, // 任务栈大小
|
||||||
(void *)NULL, // 任务入口函数参数
|
(void *)NULL, // 任务入口函数参数
|
||||||
(UBaseType_t)1, // 任务优先级
|
(UBaseType_t)1, // 任务优先级
|
||||||
(TaskHandle_t *)&business_task_handle); // 任务句柄
|
(TaskHandle_t *)&business_task_handle); // 任务句柄
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "rtc.h"
|
#include "rtc.h"
|
||||||
|
|
||||||
board_t board;
|
board_t board;
|
||||||
|
|
||||||
void led_open(led_e led)
|
void led_open(led_e led)
|
||||||
|
|
@ -139,5 +140,9 @@ BOOL rtc_init(void)
|
||||||
void board_init(void)
|
void board_init(void)
|
||||||
{
|
{
|
||||||
rtc_init();
|
rtc_init();
|
||||||
// sd_test();
|
sd_init();
|
||||||
|
if (sd_test() == FALSE)
|
||||||
|
{
|
||||||
|
DBG_ASSERT(FALSE __DBG_LINE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef __BOARD_H__
|
#ifndef __BOARD_H__
|
||||||
#define __BOARD_H__
|
#define __BOARD_H__
|
||||||
#include "lib.h"
|
#include "lib.h"
|
||||||
|
#include "sd.h"
|
||||||
#define UART_RXSIZE (240u) // 接收240个字节
|
#define UART_RXSIZE (240u) // 接收240个字节
|
||||||
#define UART_TXSIZE (240u) // 发送240个字节
|
#define UART_TXSIZE (240u) // 发送240个字节
|
||||||
|
|
||||||
|
|
@ -39,6 +39,5 @@ void led_toggle(led_e led);
|
||||||
void rtc_update(void);
|
void rtc_update(void);
|
||||||
BOOL rtc_set_time(rtc_time_t time, uint8_t ampm);
|
BOOL rtc_set_time(rtc_time_t time, uint8_t ampm);
|
||||||
BOOL rtc_set_date(rtc_date_t date);
|
BOOL rtc_set_date(rtc_date_t date);
|
||||||
// float32 get_cpu_temperature(void);
|
|
||||||
// float32 get_cpu_voltage(void);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
136
User/board/sd.c
136
User/board/sd.c
|
|
@ -1,14 +1,14 @@
|
||||||
#include "sd.h"
|
#include "sd.h"
|
||||||
|
#include "sdio.h"
|
||||||
SD_HandleTypeDef _handle;
|
SD_HandleTypeDef _handle;
|
||||||
|
|
||||||
#define NUM_OF_BLOCKS 1
|
#define NUM_OF_BLOCKS 1
|
||||||
#define TEST_ADDRESS 0
|
#define TEST_ADDRESS 0
|
||||||
#define TEST_BLOCK_SIZE ((BLOCKSIZE * NUM_OF_BLOCKS) >> 2) // 定义数据大小,SD块大小为512字节,因为是32位的数组,所以这里除以4
|
#define TEST_BLOCK_SIZE ((BLOCKSIZE * NUM_OF_BLOCKS) >> 2) // 定义数据大小,SD块大小为512字节,因为是32位的数组,所以这里除以4
|
||||||
|
|
||||||
void sd_test(void)
|
BOOL sd_test(void)
|
||||||
{
|
{
|
||||||
BOOL ret = FALSE;
|
BOOL res = FALSE;
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
uint32_t write_buffer[TEST_BLOCK_SIZE];
|
uint32_t write_buffer[TEST_BLOCK_SIZE];
|
||||||
uint32_t read_buffer[TEST_BLOCK_SIZE];
|
uint32_t read_buffer[TEST_BLOCK_SIZE];
|
||||||
|
|
@ -17,10 +17,73 @@ void sd_test(void)
|
||||||
write_buffer[i] = i + 3;
|
write_buffer[i] = i + 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = sd_erase(TEST_ADDRESS, NUM_OF_BLOCKS);
|
res = sd_erase(TEST_ADDRESS, NUM_OF_BLOCKS);
|
||||||
DBG_ASSERT(ret == TRUE __DBG_LINE);
|
if (res == FALSE)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
while (sd_get_card_state() == FALSE)
|
while (sd_get_card_state() == FALSE)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
res = sd_write_blocks(write_buffer, TEST_ADDRESS, NUM_OF_BLOCKS); // 写入数据
|
||||||
|
if (res == FALSE)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
while (sd_get_card_state() == FALSE)
|
||||||
|
;
|
||||||
|
|
||||||
|
res = sd_read_blocks(read_buffer, TEST_ADDRESS, NUM_OF_BLOCKS); // 读取数据
|
||||||
|
if (res == FALSE)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
while (sd_get_card_state() == FALSE)
|
||||||
|
;
|
||||||
|
|
||||||
|
// 验证写入和读取的数据是否一致
|
||||||
|
for (i = 0; i < TEST_BLOCK_SIZE; i++)
|
||||||
|
{
|
||||||
|
if (read_buffer[i] != write_buffer[i])
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sd_info(void)
|
||||||
|
{
|
||||||
|
// SD卡信息结构体变量
|
||||||
|
HAL_SD_CardInfoTypeDef cardInfo;
|
||||||
|
HAL_StatusTypeDef res = HAL_SD_GetCardInfo(&_handle, &cardInfo);
|
||||||
|
if (res != HAL_OK)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sd_init(void)
|
||||||
|
{
|
||||||
|
// MX_SDIO_SD_Init有问题,这里重新初始化
|
||||||
|
_handle.Instance = SDIO;
|
||||||
|
_handle.Init.ClockEdge = SDIO_CLOCK_EDGE_RISING;
|
||||||
|
_handle.Init.ClockBypass = SDIO_CLOCK_BYPASS_DISABLE;
|
||||||
|
_handle.Init.ClockPowerSave = SDIO_CLOCK_POWER_SAVE_DISABLE;
|
||||||
|
_handle.Init.BusWide = SDIO_BUS_WIDE_1B; // CUBEMX生成默认是4B,此处改为1B
|
||||||
|
_handle.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_DISABLE;
|
||||||
|
_handle.Init.ClockDiv = 4;
|
||||||
|
|
||||||
|
if (HAL_SD_Init(&_handle) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_SD_ConfigWideBusOperation(&_handle, SDIO_BUS_WIDE_4B) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sd_info();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -32,7 +95,8 @@ void sd_test(void)
|
||||||
*/
|
*/
|
||||||
BOOL sd_get_card_state(void)
|
BOOL sd_get_card_state(void)
|
||||||
{
|
{
|
||||||
return ((HAL_SD_GetCardState(&_handle) == HAL_SD_CARD_TRANSFER) ? TRUE : FALSE);
|
HAL_SD_CardStateTypeDef state = HAL_SD_GetCardState(&_handle);
|
||||||
|
return (state == HAL_SD_CARD_TRANSFER) ? TRUE : FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -56,6 +120,30 @@ BOOL sd_erase(uint32_t start_address, uint32_t end_address)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL sd_write_blocks(uint32_t *data, uint32_t write_address, uint32_t blocks)
|
||||||
|
{
|
||||||
|
if (HAL_SD_WriteBlocks(&_handle, (uint8_t *)data, write_address, blocks, 1000) != HAL_OK)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL sd_read_blocks(uint32_t *data, uint32_t read_address, uint32_t blocks)
|
||||||
|
{
|
||||||
|
if (HAL_SD_ReadBlocks(&_handle, (uint8_t *)data, read_address, blocks, 1000) != HAL_OK)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 使用DMA方式从SD卡读取多个数据块
|
* @brief 使用DMA方式从SD卡读取多个数据块
|
||||||
*
|
*
|
||||||
|
|
@ -99,3 +187,39 @@ BOOL sd_write_blocks_dma(uint32_t *data, uint32_t write_address, uint32_t blocks
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief BSP Tx Transfer completed callbacks
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
__weak void BSP_SD_WriteCpltCallback(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief BSP Rx Transfer completed callbacks
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
__weak void BSP_SD_ReadCpltCallback(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Tx Transfer completed callbacks
|
||||||
|
* @param _handle: SD handle
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void HAL_SD_TxCpltCallback(SD_HandleTypeDef *_handle)
|
||||||
|
{
|
||||||
|
BSP_SD_WriteCpltCallback();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Rx Transfer completed callbacks
|
||||||
|
* @param _handle: SD handle
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void HAL_SD_RxCpltCallback(SD_HandleTypeDef *_handle)
|
||||||
|
{
|
||||||
|
BSP_SD_ReadCpltCallback();
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,13 @@
|
||||||
#define __SD_H
|
#define __SD_H
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
|
void sd_init(void);
|
||||||
BOOL sd_get_card_state(void);
|
BOOL sd_get_card_state(void);
|
||||||
BOOL sd_erase(uint32_t start_address, uint32_t end_address);
|
BOOL sd_erase(uint32_t start_address, uint32_t end_address);
|
||||||
|
BOOL sd_write_blocks(uint32_t *data, uint32_t write_address, uint32_t blocks);
|
||||||
|
BOOL sd_read_blocks(uint32_t *data, uint32_t read_address, uint32_t blocks);
|
||||||
BOOL sd_read_blocks_dma(uint32_t *data, uint32_t read_address, uint32_t blocks);
|
BOOL sd_read_blocks_dma(uint32_t *data, uint32_t read_address, uint32_t blocks);
|
||||||
BOOL sd_write_blocks_dma(uint32_t *data, uint32_t write_address, uint32_t blocks);
|
BOOL sd_write_blocks_dma(uint32_t *data, uint32_t write_address, uint32_t blocks);
|
||||||
|
|
||||||
void sd_test(void);
|
BOOL sd_test(void);
|
||||||
#endif // __SD_H
|
#endif // __SD_H
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,35 @@
|
||||||
CAD.formats=
|
CAD.formats=
|
||||||
CAD.pinconfig=
|
CAD.pinconfig=
|
||||||
CAD.provider=
|
CAD.provider=
|
||||||
|
Dma.Request0=SDIO_RX
|
||||||
|
Dma.Request1=SDIO_TX
|
||||||
|
Dma.RequestsNb=2
|
||||||
|
Dma.SDIO_RX.0.Direction=DMA_PERIPH_TO_MEMORY
|
||||||
|
Dma.SDIO_RX.0.FIFOMode=DMA_FIFOMODE_ENABLE
|
||||||
|
Dma.SDIO_RX.0.FIFOThreshold=DMA_FIFO_THRESHOLD_FULL
|
||||||
|
Dma.SDIO_RX.0.Instance=DMA2_Stream3
|
||||||
|
Dma.SDIO_RX.0.MemBurst=DMA_MBURST_INC4
|
||||||
|
Dma.SDIO_RX.0.MemDataAlignment=DMA_MDATAALIGN_WORD
|
||||||
|
Dma.SDIO_RX.0.MemInc=DMA_MINC_ENABLE
|
||||||
|
Dma.SDIO_RX.0.Mode=DMA_PFCTRL
|
||||||
|
Dma.SDIO_RX.0.PeriphBurst=DMA_PBURST_INC4
|
||||||
|
Dma.SDIO_RX.0.PeriphDataAlignment=DMA_PDATAALIGN_WORD
|
||||||
|
Dma.SDIO_RX.0.PeriphInc=DMA_PINC_DISABLE
|
||||||
|
Dma.SDIO_RX.0.Priority=DMA_PRIORITY_LOW
|
||||||
|
Dma.SDIO_RX.0.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode,FIFOThreshold,MemBurst,PeriphBurst
|
||||||
|
Dma.SDIO_TX.1.Direction=DMA_MEMORY_TO_PERIPH
|
||||||
|
Dma.SDIO_TX.1.FIFOMode=DMA_FIFOMODE_ENABLE
|
||||||
|
Dma.SDIO_TX.1.FIFOThreshold=DMA_FIFO_THRESHOLD_FULL
|
||||||
|
Dma.SDIO_TX.1.Instance=DMA2_Stream6
|
||||||
|
Dma.SDIO_TX.1.MemBurst=DMA_MBURST_INC4
|
||||||
|
Dma.SDIO_TX.1.MemDataAlignment=DMA_MDATAALIGN_WORD
|
||||||
|
Dma.SDIO_TX.1.MemInc=DMA_MINC_ENABLE
|
||||||
|
Dma.SDIO_TX.1.Mode=DMA_PFCTRL
|
||||||
|
Dma.SDIO_TX.1.PeriphBurst=DMA_PBURST_INC4
|
||||||
|
Dma.SDIO_TX.1.PeriphDataAlignment=DMA_PDATAALIGN_WORD
|
||||||
|
Dma.SDIO_TX.1.PeriphInc=DMA_PINC_DISABLE
|
||||||
|
Dma.SDIO_TX.1.Priority=DMA_PRIORITY_LOW
|
||||||
|
Dma.SDIO_TX.1.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode,FIFOThreshold,MemBurst,PeriphBurst
|
||||||
FREERTOS.IPParameters=Tasks01
|
FREERTOS.IPParameters=Tasks01
|
||||||
FREERTOS.Tasks01=defaultTask,0,128,StartDefaultTask,Default,NULL,Dynamic,NULL,NULL
|
FREERTOS.Tasks01=defaultTask,0,128,StartDefaultTask,Default,NULL,Dynamic,NULL,NULL
|
||||||
File.Version=6
|
File.Version=6
|
||||||
|
|
@ -9,32 +38,42 @@ GPIO.groupedBy=Group By Peripherals
|
||||||
KeepUserPlacement=false
|
KeepUserPlacement=false
|
||||||
Mcu.CPN=STM32F407ZGT6
|
Mcu.CPN=STM32F407ZGT6
|
||||||
Mcu.Family=STM32F4
|
Mcu.Family=STM32F4
|
||||||
Mcu.IP0=FREERTOS
|
Mcu.IP0=DMA
|
||||||
Mcu.IP1=NVIC
|
Mcu.IP1=FREERTOS
|
||||||
Mcu.IP2=RCC
|
Mcu.IP2=NVIC
|
||||||
Mcu.IP3=RTC
|
Mcu.IP3=RCC
|
||||||
Mcu.IP4=SYS
|
Mcu.IP4=RTC
|
||||||
Mcu.IPNb=5
|
Mcu.IP5=SDIO
|
||||||
|
Mcu.IP6=SYS
|
||||||
|
Mcu.IPNb=7
|
||||||
Mcu.Name=STM32F407Z(E-G)Tx
|
Mcu.Name=STM32F407Z(E-G)Tx
|
||||||
Mcu.Package=LQFP144
|
Mcu.Package=LQFP144
|
||||||
Mcu.Pin0=PC13-ANTI_TAMP
|
Mcu.Pin0=PC13-ANTI_TAMP
|
||||||
Mcu.Pin1=PC14-OSC32_IN
|
Mcu.Pin1=PC14-OSC32_IN
|
||||||
Mcu.Pin10=VP_SYS_VS_tim6
|
Mcu.Pin10=PC11
|
||||||
|
Mcu.Pin11=PC12
|
||||||
|
Mcu.Pin12=PD2
|
||||||
|
Mcu.Pin13=VP_FREERTOS_VS_CMSIS_V1
|
||||||
|
Mcu.Pin14=VP_RTC_VS_RTC_Activate
|
||||||
|
Mcu.Pin15=VP_RTC_VS_RTC_Calendar
|
||||||
|
Mcu.Pin16=VP_SYS_VS_tim6
|
||||||
Mcu.Pin2=PC15-OSC32_OUT
|
Mcu.Pin2=PC15-OSC32_OUT
|
||||||
Mcu.Pin3=PH0-OSC_IN
|
Mcu.Pin3=PH0-OSC_IN
|
||||||
Mcu.Pin4=PH1-OSC_OUT
|
Mcu.Pin4=PH1-OSC_OUT
|
||||||
Mcu.Pin5=PA13
|
Mcu.Pin5=PC8
|
||||||
Mcu.Pin6=PA14
|
Mcu.Pin6=PC9
|
||||||
Mcu.Pin7=VP_FREERTOS_VS_CMSIS_V1
|
Mcu.Pin7=PA13
|
||||||
Mcu.Pin8=VP_RTC_VS_RTC_Activate
|
Mcu.Pin8=PA14
|
||||||
Mcu.Pin9=VP_RTC_VS_RTC_Calendar
|
Mcu.Pin9=PC10
|
||||||
Mcu.PinsNb=11
|
Mcu.PinsNb=17
|
||||||
Mcu.ThirdPartyNb=0
|
Mcu.ThirdPartyNb=0
|
||||||
Mcu.UserConstants=
|
Mcu.UserConstants=
|
||||||
Mcu.UserName=STM32F407ZGTx
|
Mcu.UserName=STM32F407ZGTx
|
||||||
MxCube.Version=6.9.2
|
MxCube.Version=6.13.0
|
||||||
MxDb.Version=DB.6.0.92
|
MxDb.Version=DB.6.0.130
|
||||||
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
||||||
|
NVIC.DMA2_Stream3_IRQn=true\:15\:0\:true\:false\:true\:true\:false\:true\:true
|
||||||
|
NVIC.DMA2_Stream6_IRQn=true\:15\:0\:true\:false\:true\:true\:false\:true\:true
|
||||||
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
||||||
NVIC.ForceEnableDMAVector=true
|
NVIC.ForceEnableDMAVector=true
|
||||||
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
||||||
|
|
@ -55,6 +94,21 @@ PA13.Mode=Serial_Wire
|
||||||
PA13.Signal=SYS_JTMS-SWDIO
|
PA13.Signal=SYS_JTMS-SWDIO
|
||||||
PA14.Mode=Serial_Wire
|
PA14.Mode=Serial_Wire
|
||||||
PA14.Signal=SYS_JTCK-SWCLK
|
PA14.Signal=SYS_JTCK-SWCLK
|
||||||
|
PC10.GPIOParameters=GPIO_PuPd,GPIO_Speed_High_Default
|
||||||
|
PC10.GPIO_PuPd=GPIO_PULLUP
|
||||||
|
PC10.GPIO_Speed_High_Default=GPIO_SPEED_FREQ_HIGH
|
||||||
|
PC10.Mode=SD_4_bits_Wide_bus
|
||||||
|
PC10.Signal=SDIO_D2
|
||||||
|
PC11.GPIOParameters=GPIO_PuPd,GPIO_Speed_High_Default
|
||||||
|
PC11.GPIO_PuPd=GPIO_PULLUP
|
||||||
|
PC11.GPIO_Speed_High_Default=GPIO_SPEED_FREQ_HIGH
|
||||||
|
PC11.Mode=SD_4_bits_Wide_bus
|
||||||
|
PC11.Signal=SDIO_D3
|
||||||
|
PC12.GPIOParameters=GPIO_PuPd,GPIO_Speed_High_Default
|
||||||
|
PC12.GPIO_PuPd=GPIO_PULLUP
|
||||||
|
PC12.GPIO_Speed_High_Default=GPIO_SPEED_FREQ_HIGH
|
||||||
|
PC12.Mode=SD_4_bits_Wide_bus
|
||||||
|
PC12.Signal=SDIO_CK
|
||||||
PC13-ANTI_TAMP.GPIOParameters=GPIO_Label
|
PC13-ANTI_TAMP.GPIOParameters=GPIO_Label
|
||||||
PC13-ANTI_TAMP.GPIO_Label=LED_USER
|
PC13-ANTI_TAMP.GPIO_Label=LED_USER
|
||||||
PC13-ANTI_TAMP.Signal=GPIO_Output
|
PC13-ANTI_TAMP.Signal=GPIO_Output
|
||||||
|
|
@ -62,6 +116,21 @@ PC14-OSC32_IN.Mode=LSE-External-Oscillator
|
||||||
PC14-OSC32_IN.Signal=RCC_OSC32_IN
|
PC14-OSC32_IN.Signal=RCC_OSC32_IN
|
||||||
PC15-OSC32_OUT.Mode=LSE-External-Oscillator
|
PC15-OSC32_OUT.Mode=LSE-External-Oscillator
|
||||||
PC15-OSC32_OUT.Signal=RCC_OSC32_OUT
|
PC15-OSC32_OUT.Signal=RCC_OSC32_OUT
|
||||||
|
PC8.GPIOParameters=GPIO_PuPd,GPIO_Speed_High_Default
|
||||||
|
PC8.GPIO_PuPd=GPIO_PULLUP
|
||||||
|
PC8.GPIO_Speed_High_Default=GPIO_SPEED_FREQ_HIGH
|
||||||
|
PC8.Mode=SD_4_bits_Wide_bus
|
||||||
|
PC8.Signal=SDIO_D0
|
||||||
|
PC9.GPIOParameters=GPIO_PuPd,GPIO_Speed_High_Default
|
||||||
|
PC9.GPIO_PuPd=GPIO_PULLUP
|
||||||
|
PC9.GPIO_Speed_High_Default=GPIO_SPEED_FREQ_HIGH
|
||||||
|
PC9.Mode=SD_4_bits_Wide_bus
|
||||||
|
PC9.Signal=SDIO_D1
|
||||||
|
PD2.GPIOParameters=GPIO_PuPd,GPIO_Speed_High_Default
|
||||||
|
PD2.GPIO_PuPd=GPIO_PULLUP
|
||||||
|
PD2.GPIO_Speed_High_Default=GPIO_SPEED_FREQ_HIGH
|
||||||
|
PD2.Mode=SD_4_bits_Wide_bus
|
||||||
|
PD2.Signal=SDIO_CMD
|
||||||
PH0-OSC_IN.Mode=HSE-External-Oscillator
|
PH0-OSC_IN.Mode=HSE-External-Oscillator
|
||||||
PH0-OSC_IN.Signal=RCC_OSC_IN
|
PH0-OSC_IN.Signal=RCC_OSC_IN
|
||||||
PH1-OSC_OUT.Mode=HSE-External-Oscillator
|
PH1-OSC_OUT.Mode=HSE-External-Oscillator
|
||||||
|
|
@ -76,7 +145,7 @@ ProjectManager.CustomerFirmwarePackage=
|
||||||
ProjectManager.DefaultFWLocation=true
|
ProjectManager.DefaultFWLocation=true
|
||||||
ProjectManager.DeletePrevious=true
|
ProjectManager.DeletePrevious=true
|
||||||
ProjectManager.DeviceId=STM32F407ZGTx
|
ProjectManager.DeviceId=STM32F407ZGTx
|
||||||
ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.27.1
|
ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.28.1
|
||||||
ProjectManager.FreePins=true
|
ProjectManager.FreePins=true
|
||||||
ProjectManager.HalAssertFull=false
|
ProjectManager.HalAssertFull=false
|
||||||
ProjectManager.HeapSize=0x400
|
ProjectManager.HeapSize=0x400
|
||||||
|
|
@ -97,7 +166,7 @@ ProjectManager.ToolChainLocation=
|
||||||
ProjectManager.UAScriptAfterPath=
|
ProjectManager.UAScriptAfterPath=
|
||||||
ProjectManager.UAScriptBeforePath=
|
ProjectManager.UAScriptBeforePath=
|
||||||
ProjectManager.UnderRoot=false
|
ProjectManager.UnderRoot=false
|
||||||
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_RTC_Init-RTC-false-HAL-true
|
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_RTC_Init-RTC-false-HAL-true,5-MX_SDIO_SD_Init-SDIO-false-HAL-true
|
||||||
RCC.48MHZClocksFreq_Value=48000000
|
RCC.48MHZClocksFreq_Value=48000000
|
||||||
RCC.AHBFreq_Value=168000000
|
RCC.AHBFreq_Value=168000000
|
||||||
RCC.APB1CLKDivider=RCC_HCLK_DIV4
|
RCC.APB1CLKDivider=RCC_HCLK_DIV4
|
||||||
|
|
@ -133,6 +202,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
|
||||||
|
SDIO.ClockDiv=4
|
||||||
|
SDIO.IPParameters=ClockDiv
|
||||||
VP_FREERTOS_VS_CMSIS_V1.Mode=CMSIS_V1
|
VP_FREERTOS_VS_CMSIS_V1.Mode=CMSIS_V1
|
||||||
VP_FREERTOS_VS_CMSIS_V1.Signal=FREERTOS_VS_CMSIS_V1
|
VP_FREERTOS_VS_CMSIS_V1.Signal=FREERTOS_VS_CMSIS_V1
|
||||||
VP_RTC_VS_RTC_Activate.Mode=RTC_Enabled
|
VP_RTC_VS_RTC_Activate.Mode=RTC_Enabled
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue