STM32L4xx_HAL_Driver  1.14.0
Peripheral Control functions

management functions More...

Functions

HAL_StatusTypeDef HAL_NAND_ECC_Enable (NAND_HandleTypeDef *hnand)
 Enable dynamically NAND ECC feature. More...
 
HAL_StatusTypeDef HAL_NAND_ECC_Disable (NAND_HandleTypeDef *hnand)
 Disable dynamically NAND ECC feature. More...
 
HAL_StatusTypeDef HAL_NAND_GetECC (NAND_HandleTypeDef *hnand, uint32_t *ECCval, uint32_t Timeout)
 Get NAND ECC value. More...
 

Detailed Description

management functions

  ==============================================================================
                         ##### NAND Control functions #####
  ==============================================================================
  [..]
    This subsection provides a set of functions allowing to control dynamically
    the NAND interface.

Function Documentation

◆ HAL_NAND_ECC_Disable()

HAL_StatusTypeDef HAL_NAND_ECC_Disable ( NAND_HandleTypeDef hnand)

Disable dynamically NAND ECC feature.

Parameters
hnandpointer to a NAND_HandleTypeDef structure that contains the configuration information for NAND module.
Return values
HALstatus

Definition at line 1709 of file stm32l4xx_hal_nand.c.

1710 {
1711  /* Check the NAND controller state */
1712  if(hnand->State == HAL_NAND_STATE_BUSY)
1713  {
1714  return HAL_BUSY;
1715  }
1716 
1717  /* Update the NAND state */
1718  hnand->State = HAL_NAND_STATE_BUSY;
1719 
1720  /* Disable ECC feature */
1721  FMC_NAND_ECC_Disable(hnand->Instance, hnand->Init.NandBank);
1722 
1723  /* Update the NAND state */
1724  hnand->State = HAL_NAND_STATE_READY;
1725 
1726  return HAL_OK;
1727 }
__IO HAL_NAND_StateTypeDef State
HAL_StatusTypeDef FMC_NAND_ECC_Disable(FMC_NAND_TypeDef *Device, uint32_t Bank)
Disables dynamically FMC_NAND ECC feature.
FMC_NAND_InitTypeDef Init
return HAL_OK
FMC_NAND_TypeDef * Instance

◆ HAL_NAND_ECC_Enable()

HAL_StatusTypeDef HAL_NAND_ECC_Enable ( NAND_HandleTypeDef hnand)

Enable dynamically NAND ECC feature.

Parameters
hnandpointer to a NAND_HandleTypeDef structure that contains the configuration information for NAND module.
Return values
HALstatus

Definition at line 1683 of file stm32l4xx_hal_nand.c.

1684 {
1685  /* Check the NAND controller state */
1686  if(hnand->State == HAL_NAND_STATE_BUSY)
1687  {
1688  return HAL_BUSY;
1689  }
1690 
1691  /* Update the NAND state */
1692  hnand->State = HAL_NAND_STATE_BUSY;
1693 
1694  /* Enable ECC feature */
1695  FMC_NAND_ECC_Enable(hnand->Instance, hnand->Init.NandBank);
1696 
1697  /* Update the NAND state */
1698  hnand->State = HAL_NAND_STATE_READY;
1699 
1700  return HAL_OK;
1701 }
__IO HAL_NAND_StateTypeDef State
FMC_NAND_InitTypeDef Init
return HAL_OK
HAL_StatusTypeDef FMC_NAND_ECC_Enable(FMC_NAND_TypeDef *Device, uint32_t Bank)
Enables dynamically FMC_NAND ECC feature.
FMC_NAND_TypeDef * Instance

◆ HAL_NAND_GetECC()

HAL_StatusTypeDef HAL_NAND_GetECC ( NAND_HandleTypeDef hnand,
uint32_t *  ECCval,
uint32_t  Timeout 
)

Get NAND ECC value.

Parameters
hnandpointer to a NAND_HandleTypeDef structure that contains the configuration information for NAND module.
ECCvalpointer to ECC value
Timeoutmaximum timeout to wait
Return values
HALstatus

Definition at line 1737 of file stm32l4xx_hal_nand.c.

1738 {
1739  HAL_StatusTypeDef status = HAL_OK;
1740 
1741  /* Check the NAND controller state */
1742  if(hnand->State == HAL_NAND_STATE_BUSY)
1743  {
1744  return HAL_BUSY;
1745  }
1746 
1747  /* Update the NAND state */
1748  hnand->State = HAL_NAND_STATE_BUSY;
1749 
1750  /* Get NAND ECC value */
1751  status = FMC_NAND_GetECC(hnand->Instance, ECCval, hnand->Init.NandBank, Timeout);
1752 
1753  /* Update the NAND state */
1754  hnand->State = HAL_NAND_STATE_READY;
1755 
1756  return status;
1757 }
__IO HAL_NAND_StateTypeDef State
FMC_NAND_InitTypeDef Init
HAL_StatusTypeDef FMC_NAND_GetECC(FMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout)
Disables dynamically FMC_NAND ECC feature.
return HAL_OK
FMC_NAND_TypeDef * Instance