Frederick Huang / mbed-STM32L452

Dependents:   STM32L452_Nucleo_ticker

Fork of mbed-dev by mbed official

Revision:
168:9672193075cf
Parent:
161:2cc1468da177
diff -r e84263d55307 -r 9672193075cf targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_nand.c
--- a/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_nand.c	Wed Jun 21 17:46:44 2017 +0100
+++ b/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_nand.c	Thu Jul 06 15:42:05 2017 +0100
@@ -2,8 +2,8 @@
   ******************************************************************************
   * @file    stm32f7xx_hal_nand.c
   * @author  MCD Application Team
-  * @version V1.2.0
-  * @date    30-December-2016
+  * @version V1.2.2
+  * @date    14-April-2017
   * @brief   NAND HAL module driver.
   *          This file provides a generic firmware to drive NAND memories mounted 
   *          as external device.
@@ -58,7 +58,7 @@
   ******************************************************************************
   * @attention
   *
-  * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
+  * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
   *
   * Redistribution and use in source and binary forms, with or without modification,
   * are permitted provided that the following conditions are met:
@@ -427,7 +427,7 @@
   hnand->Config.BlockSize          = pDeviceConfig->BlockSize;
   hnand->Config.BlockNbr           = pDeviceConfig->BlockNbr;
   hnand->Config.PlaneSize          = pDeviceConfig->PlaneSize;
-  hnand->Config.PlaneNbr           = pDeviceConfig->BlockNbr;
+  hnand->Config.PlaneNbr           = pDeviceConfig->PlaneNbr;
   hnand->Config.ExtraCommandEnable = pDeviceConfig->ExtraCommandEnable;
   
   return HAL_OK;
@@ -1663,7 +1663,7 @@
       pAddress->Block = 0;
       pAddress->Plane++;
 
-      if(pAddress->Plane == (hnand->Config.PlaneSize/ hnand->Config.BlockNbr))
+      if(pAddress->Plane == (hnand->Config.PlaneNbr))
       {
         status = NAND_INVALID_ADDRESS;
       }