STM32L4xx_HAL_Driver  1.14.0

Initialization and Configuration functions. More...

Functions

HAL_StatusTypeDef SDMMC_Init (SDMMC_TypeDef *SDMMCx, SDMMC_InitTypeDef Init)
 Initializes the SDMMC according to the specified parameters in the SDMMC_InitTypeDef and create the associated handle. More...
 

Detailed Description

Initialization and Configuration functions.

 ===============================================================================
              ##### Initialization/de-initialization functions #####
 ===============================================================================
    [..]  This section provides functions allowing to:

Function Documentation

◆ SDMMC_Init()

HAL_StatusTypeDef SDMMC_Init ( SDMMC_TypeDef *  SDMMCx,
SDMMC_InitTypeDef  Init 
)

Initializes the SDMMC according to the specified parameters in the SDMMC_InitTypeDef and create the associated handle.

Parameters
SDMMCxPointer to SDMMC register base
InitSDMMC initialization structure
Return values
HALstatus

Definition at line 220 of file stm32l4xx_ll_sdmmc.c.

221 {
222  uint32_t tmpreg = 0;
223 
224  /* Check the parameters */
225  assert_param(IS_SDMMC_ALL_INSTANCE(SDMMCx));
226  assert_param(IS_SDMMC_CLOCK_EDGE(Init.ClockEdge));
227 #if !defined(STM32L4R5xx) && !defined(STM32L4R7xx) && !defined(STM32L4R9xx) && !defined(STM32L4S5xx) && !defined(STM32L4S7xx) && !defined(STM32L4S9xx)
228  assert_param(IS_SDMMC_CLOCK_BYPASS(Init.ClockBypass));
229 #endif /* !STM32L4R5xx && !STM32L4R7xx && !STM32L4R9xx && !STM32L4S5xx && !STM32L4S7xx && !STM32L4S9xx */
230  assert_param(IS_SDMMC_CLOCK_POWER_SAVE(Init.ClockPowerSave));
231  assert_param(IS_SDMMC_BUS_WIDE(Init.BusWide));
232  assert_param(IS_SDMMC_HARDWARE_FLOW_CONTROL(Init.HardwareFlowControl));
233  assert_param(IS_SDMMC_CLKDIV(Init.ClockDiv));
234 
235  /* Set SDMMC configuration parameters */
236 #if !defined(STM32L4R5xx) && !defined(STM32L4R7xx) && !defined(STM32L4R9xx) && !defined(STM32L4S5xx) && !defined(STM32L4S7xx) && !defined(STM32L4S9xx)
237  tmpreg |= Init.ClockBypass;
238 #endif
239  tmpreg |= (Init.ClockEdge |\
240  Init.ClockPowerSave |\
241  Init.BusWide |\
242  Init.HardwareFlowControl |\
243  Init.ClockDiv
244  );
245 
246  /* Write to SDMMC CLKCR */
247  MODIFY_REG(SDMMCx->CLKCR, CLKCR_CLEAR_MASK, tmpreg);
248 
249  return HAL_OK;
250 }
WWDG_InitTypeDef Init
return HAL_OK
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))