STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
stm32f7xx_hal.c
Go to the documentation of this file.
1 
53 /* Includes ------------------------------------------------------------------*/
54 #include "stm32f7xx_hal.h"
55 
65 /* Private typedef -----------------------------------------------------------*/
66 /* Private define ------------------------------------------------------------*/
73 #define __STM32F7xx_HAL_VERSION_MAIN (0x01)
74 #define __STM32F7xx_HAL_VERSION_SUB1 (0x01)
75 #define __STM32F7xx_HAL_VERSION_SUB2 (0x00)
76 #define __STM32F7xx_HAL_VERSION_RC (0x00)
77 #define __STM32F7xx_HAL_VERSION ((__STM32F7xx_HAL_VERSION_MAIN << 24)\
78  |(__STM32F7xx_HAL_VERSION_SUB1 << 16)\
79  |(__STM32F7xx_HAL_VERSION_SUB2 << 8 )\
80  |(__STM32F7xx_HAL_VERSION_RC))
81 
82 #define IDCODE_DEVID_MASK ((uint32_t)0x00000FFF)
83 
87 /* Private macro -------------------------------------------------------------*/
88 /* Private variables ---------------------------------------------------------*/
92 __IO uint32_t uwTick;
97 /* Private function prototypes -----------------------------------------------*/
98 /* Private functions ---------------------------------------------------------*/
99 
155 {
156  /* Configure Flash prefetch and Instruction cache through ART accelerator */
157 #if (ART_ACCLERATOR_ENABLE != 0)
159 #endif /* ART_ACCLERATOR_ENABLE */
160 
161  /* Set Interrupt Group Priority */
163 
164  /* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */
166 
167  /* Init the low level hardware */
168  HAL_MspInit();
169 
170  /* Return function status */
171  return HAL_OK;
172 }
173 
180 {
181  /* Reset of all peripherals */
184 
187 
190 
193 
196 
197  /* De-Init the low level hardware */
198  HAL_MspDeInit();
199 
200  /* Return function status */
201  return HAL_OK;
202 }
203 
208 __weak void HAL_MspInit(void)
209 {
210  /* NOTE : This function Should not be modified, when the callback is needed,
211  the HAL_MspInit could be implemented in the user file
212  */
213 }
214 
219 __weak void HAL_MspDeInit(void)
220 {
221  /* NOTE : This function Should not be modified, when the callback is needed,
222  the HAL_MspDeInit could be implemented in the user file
223  */
224 }
225 
242 __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
243 {
244  /*Configure the SysTick to have interrupt in 1ms time basis*/
246 
247  /*Configure the SysTick IRQ priority */
248  HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority ,0);
249 
250  /* Return function status */
251  return HAL_OK;
252 }
253 
290 __weak void HAL_IncTick(void)
291 {
292  uwTick++;
293 }
294 
301 __weak uint32_t HAL_GetTick(void)
302 {
303  return uwTick;
304 }
305 
317 __weak void HAL_Delay(__IO uint32_t Delay)
318 {
319  uint32_t tickstart = 0;
320  tickstart = HAL_GetTick();
321  while((HAL_GetTick() - tickstart) < Delay)
322  {
323  }
324 }
325 
336 __weak void HAL_SuspendTick(void)
337 {
338  /* Disable SysTick Interrupt */
340 }
341 
352 __weak void HAL_ResumeTick(void)
353 {
354  /* Enable SysTick Interrupt */
356 }
357 
362 uint32_t HAL_GetHalVersion(void)
363 {
365 }
366 
371 uint32_t HAL_GetREVID(void)
372 {
373  return((DBGMCU->IDCODE) >> 16U);
374 }
375 
380 uint32_t HAL_GetDEVID(void)
381 {
382  return((DBGMCU->IDCODE) & IDCODE_DEVID_MASK);
383 }
384 
390 {
392 }
393 
399 {
401 }
402 
408 {
410 }
411 
417 {
419 }
420 
426 {
428 }
429 
435 {
437 }
438 
446 {
447  SYSCFG->CMPCR |= SYSCFG_CMPCR_CMP_PD;
448 }
449 
457 {
458  SYSCFG->CMPCR &= (uint32_t)~((uint32_t)SYSCFG_CMPCR_CMP_PD);
459 }
460 
470 {
471  SYSCFG->MEMRMP |= SYSCFG_MEMRMP_SWP_FMC_0;
472 }
473 
483 {
484 
485  SYSCFG->MEMRMP &= (uint32_t)~((uint32_t)SYSCFG_MEMRMP_SWP_FMC);
486 }
487 
488 #if defined (STM32F765xx) || defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) || defined (STM32F779xx)
489 
499 void HAL_EnableMemorySwappingBank(void)
500 {
502 }
503 
514 void HAL_DisableMemorySwappingBank(void)
515 {
517 }
518 #endif /* STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
519 
536 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
#define __HAL_RCC_AHB2_FORCE_RESET()
Force or release AHB2 peripheral reset.
#define CLEAR_BIT(REG, BIT)
Definition: stm32f7xx.h:180
void HAL_DisableCompensationCell(void)
Power-down the I/O Compensation Cell.
uint32_t HAL_GetHalVersion(void)
Returns the HAL revision.
void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
#define __HAL_RCC_APB2_FORCE_RESET()
void HAL_DBGMCU_DisableDBGStopMode(void)
Disable the Debug Module during STOP mode.
#define DBGMCU
Definition: stm32f745xx.h:1354
#define TICK_INT_PRIORITY
void HAL_Delay(__IO uint32_t Delay)
This function provides accurate delay (in milliseconds) based on variable incremented.
uint32_t SystemCoreClock
#define DBGMCU_CR_DBG_STANDBY
Definition: stm32f745xx.h:7623
#define DBGMCU_CR_DBG_SLEEP
Definition: stm32f745xx.h:7621
#define NVIC_PRIORITYGROUP_4
#define SysTick
Definition: core_cm0.h:588
#define __HAL_RCC_AHB3_RELEASE_RESET()
#define __HAL_FLASH_ART_ENABLE()
Enable the FLASH Adaptive Real-Time memory accelerator.
#define DBGMCU_CR_DBG_STOP
Definition: stm32f745xx.h:7622
uint32_t HAL_GetDEVID(void)
Returns the device identifier.
void HAL_DBGMCU_DisableDBGStandbyMode(void)
Disable the Debug Module during STANDBY mode.
#define SYSCFG_MEMRMP_SWP_FMC_0
Definition: stm32f745xx.h:6688
void HAL_DBGMCU_EnableDBGStopMode(void)
Enable the Debug Module during STOP mode.
uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb)
#define __IO
Definition: core_cm0.h:213
#define SYSCFG_CMPCR_CMP_PD
Definition: stm32f745xx.h:6956
#define __HAL_RCC_APB2_RELEASE_RESET()
void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
void HAL_DisableFMCMemorySwapping(void)
Disables the FMC Memory Mapping Swapping.
HAL_StatusTypeDef HAL_Init(void)
This function is used to initialize the HAL Library; it must be the first instruction to be executed ...
This file contains all the functions prototypes for the HAL module driver.
#define __HAL_RCC_AHB1_RELEASE_RESET()
__IO uint32_t uwTick
Definition: stm32f7xx_hal.c:92
void HAL_IncTick(void)
This function is called to increment a global variable "uwTick" used as application time base...
#define SYSCFG_MEMRMP_SWP_FB
Definition: stm32f765xx.h:7015
void HAL_EnableCompensationCell(void)
Enables the I/O Compensation Cell.
void HAL_MspInit(void)
Initializes the MSP.
void HAL_SuspendTick(void)
Suspend Tick increment.
HAL_StatusTypeDef HAL_DeInit(void)
This function de-Initializes common part of the HAL and stops the systick. This function is optional...
#define __HAL_RCC_AHB1_FORCE_RESET()
#define SET_BIT(REG, BIT)
Definition: stm32f7xx.h:178
#define __HAL_RCC_AHB2_RELEASE_RESET()
#define __HAL_RCC_APB1_FORCE_RESET()
void HAL_DBGMCU_EnableDBGSleepMode(void)
Enable the Debug Module during SLEEP mode.
#define __STM32F7xx_HAL_VERSION
Definition: stm32f7xx_hal.c:77
#define __HAL_RCC_AHB3_FORCE_RESET()
Force or release AHB3 peripheral reset.
void HAL_EnableFMCMemorySwapping(void)
Enables the FMC Memory Mapping Swapping.
#define __HAL_RCC_APB1_RELEASE_RESET()
void HAL_MspDeInit(void)
DeInitializes the MSP.
#define IDCODE_DEVID_MASK
Definition: stm32f7xx_hal.c:82
HAL_StatusTypeDef
HAL Status structures definition.
void HAL_DBGMCU_EnableDBGStandbyMode(void)
Enable the Debug Module during STANDBY mode.
void HAL_ResumeTick(void)
Resume Tick increment.
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.
void HAL_DBGMCU_DisableDBGSleepMode(void)
Disable the Debug Module during SLEEP mode.
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
This function configures the source of the time base. The time source is configured to have 1ms time ...
#define SysTick_CTRL_TICKINT_Msk
Definition: core_cm0.h:512
uint32_t HAL_GetREVID(void)
Returns the device revision identifier.
#define SYSCFG_MEMRMP_SWP_FMC
Definition: stm32f745xx.h:6687
#define SYSCFG
Definition: stm32f745xx.h:1300