STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
stm32f7xx_ll_fmc.c
Go to the documentation of this file.
1 
76 /* Includes ------------------------------------------------------------------*/
77 #include "stm32f7xx_hal.h"
78 
88 #if defined (HAL_SRAM_MODULE_ENABLED) || defined(HAL_NOR_MODULE_ENABLED) || defined(HAL_NAND_MODULE_ENABLED) || defined(HAL_SDRAM_MODULE_ENABLED)
89 
90 /* Private typedef -----------------------------------------------------------*/
91 /* Private define ------------------------------------------------------------*/
92 /* Private macro -------------------------------------------------------------*/
93 /* Private variables ---------------------------------------------------------*/
94 /* Private function prototypes -----------------------------------------------*/
95 /* Exported functions --------------------------------------------------------*/
96 
151 {
152  uint32_t tmpr = 0;
153 
154  /* Check the parameters */
171 
172  /* Get the BTCR register value */
173  tmpr = Device->BTCR[Init->NSBank];
174 
175  /* Clear MBKEN, MUXEN, MTYP, MWID, FACCEN, BURSTEN, WAITPOL, WAITCFG, WREN,
176  WAITEN, EXTMOD, ASYNCWAIT, CBURSTRW and CCLKEN bits */
177  tmpr &= ((uint32_t)~(FMC_BCR1_MBKEN | FMC_BCR1_MUXEN | FMC_BCR1_MTYP | \
182 
183  /* Set NORSRAM device control parameters */
184  tmpr |= (uint32_t)(Init->DataAddressMux |\
185  Init->MemoryType |\
186  Init->MemoryDataWidth |\
187  Init->BurstAccessMode |\
188  Init->WaitSignalPolarity |\
189  Init->WaitSignalActive |\
190  Init->WriteOperation |\
191  Init->WaitSignal |\
192  Init->ExtendedMode |\
193  Init->AsynchronousWait |\
194  Init->WriteBurst |\
195  Init->ContinuousClock |\
196  Init->PageSize |\
197  Init->WriteFifo);
198 
199  if(Init->MemoryType == FMC_MEMORY_TYPE_NOR)
200  {
201  tmpr |= (uint32_t)FMC_NORSRAM_FLASH_ACCESS_ENABLE;
202  }
203 
204  Device->BTCR[Init->NSBank] = tmpr;
205 
206  /* Configure synchronous mode when Continuous clock is enabled for bank2..4 */
208  {
209  Device->BTCR[FMC_NORSRAM_BANK1] |= (uint32_t)(Init->ContinuousClock);
210  }
211  if(Init->NSBank != FMC_NORSRAM_BANK1)
212  {
213  Device->BTCR[FMC_NORSRAM_BANK1] |= (uint32_t)(Init->WriteFifo);
214  }
215 
216  return HAL_OK;
217 }
218 
219 
228 {
229  /* Check the parameters */
233 
234  /* Disable the FMC_NORSRAM device */
235  __FMC_NORSRAM_DISABLE(Device, Bank);
236 
237  /* De-initialize the FMC_NORSRAM device */
238  /* FMC_NORSRAM_BANK1 */
239  if(Bank == FMC_NORSRAM_BANK1)
240  {
241  Device->BTCR[Bank] = 0x000030DB;
242  }
243  /* FMC_NORSRAM_BANK2, FMC_NORSRAM_BANK3 or FMC_NORSRAM_BANK4 */
244  else
245  {
246  Device->BTCR[Bank] = 0x000030D2;
247  }
248 
249  Device->BTCR[Bank + 1] = 0x0FFFFFFF;
250  ExDevice->BWTR[Bank] = 0x0FFFFFFF;
251 
252  return HAL_OK;
253 }
254 
255 
265 {
266  uint32_t tmpr = 0;
267 
268  /* Check the parameters */
278 
279  /* Get the BTCR register value */
280  tmpr = Device->BTCR[Bank + 1];
281 
282  /* Clear ADDSET, ADDHLD, DATAST, BUSTURN, CLKDIV, DATLAT and ACCMOD bits */
283  tmpr &= ((uint32_t)~(FMC_BTR1_ADDSET | FMC_BTR1_ADDHLD | FMC_BTR1_DATAST | \
285  FMC_BTR1_ACCMOD));
286 
287  /* Set FMC_NORSRAM device timing parameters */
288  tmpr |= (uint32_t)(Timing->AddressSetupTime |\
289  ((Timing->AddressHoldTime) << 4) |\
290  ((Timing->DataSetupTime) << 8) |\
291  ((Timing->BusTurnAroundDuration) << 16) |\
292  (((Timing->CLKDivision)-1) << 20) |\
293  (((Timing->DataLatency)-2) << 24) |\
294  (Timing->AccessMode)
295  );
296 
297  Device->BTCR[Bank + 1] = tmpr;
298 
299  /* Configure Clock division value (in NORSRAM bank 1) when continuous clock is enabled */
301  {
302  tmpr = (uint32_t)(Device->BTCR[FMC_NORSRAM_BANK1 + 1] & ~(((uint32_t)0x0F) << 20));
303  tmpr |= (uint32_t)(((Timing->CLKDivision)-1) << 20);
304  Device->BTCR[FMC_NORSRAM_BANK1 + 1] = tmpr;
305  }
306 
307  return HAL_OK;
308 }
309 
319 {
320  uint32_t tmpr = 0;
321 
322  /* Check the parameters */
323  assert_param(IS_FMC_EXTENDED_MODE(ExtendedMode));
324 
325  /* Set NORSRAM device timing register for write configuration, if extended mode is used */
326  if(ExtendedMode == FMC_EXTENDED_MODE_ENABLE)
327  {
328  /* Check the parameters */
338 
339  /* Get the BWTR register value */
340  tmpr = Device->BWTR[Bank];
341 
342  /* Clear ADDSET, ADDHLD, DATAST, BUSTURN, CLKDIV, DATLAT and ACCMOD bits */
343  tmpr &= ((uint32_t)~(FMC_BWTR1_ADDSET | FMC_BWTR1_ADDHLD | FMC_BWTR1_DATAST | \
345 
346  tmpr |= (uint32_t)(Timing->AddressSetupTime |\
347  ((Timing->AddressHoldTime) << 4) |\
348  ((Timing->DataSetupTime) << 8) |\
349  ((Timing->BusTurnAroundDuration) << 16) |\
350  (Timing->AccessMode));
351 
352  Device->BWTR[Bank] = tmpr;
353  }
354  else
355  {
356  Device->BWTR[Bank] = 0x0FFFFFFF;
357  }
358 
359  return HAL_OK;
360 }
387 {
388  /* Check the parameters */
391 
392  /* Enable write operation */
393  Device->BTCR[Bank] |= FMC_WRITE_OPERATION_ENABLE;
394 
395  return HAL_OK;
396 }
397 
405 {
406  /* Check the parameters */
409 
410  /* Disable write operation */
411  Device->BTCR[Bank] &= ~FMC_WRITE_OPERATION_ENABLE;
412 
413  return HAL_OK;
414 }
415 
474 {
475  uint32_t tmpr = 0;
476 
477  /* Check the parameters */
486 
487  /* Get the NAND bank 3 register value */
488  tmpr = Device->PCR;
489 
490  /* Clear PWAITEN, PBKEN, PTYP, PWID, ECCEN, TCLR, TAR and ECCPS bits */
491  tmpr &= ((uint32_t)~(FMC_PCR_PWAITEN | FMC_PCR_PBKEN | FMC_PCR_PTYP | \
494  /* Set NAND device control parameters */
495  tmpr |= (uint32_t)(Init->Waitfeature |\
497  Init->MemoryDataWidth |\
498  Init->EccComputation |\
499  Init->ECCPageSize |\
500  ((Init->TCLRSetupTime) << 9) |\
501  ((Init->TARSetupTime) << 13));
502 
503  /* NAND bank 3 registers configuration */
504  Device->PCR = tmpr;
505 
506  return HAL_OK;
507 
508 }
509 
519 {
520  uint32_t tmpr = 0;
521 
522  /* Check the parameters */
529 
530  /* Get the NAND bank 3 register value */
531  tmpr = Device->PMEM;
532 
533  /* Clear MEMSETx, MEMWAITx, MEMHOLDx and MEMHIZx bits */
534  tmpr &= ((uint32_t)~(FMC_PMEM_MEMSET3 | FMC_PMEM_MEMWAIT3 | FMC_PMEM_MEMHOLD3 | \
535  FMC_PMEM_MEMHIZ3));
536  /* Set FMC_NAND device timing parameters */
537  tmpr |= (uint32_t)(Timing->SetupTime |\
538  ((Timing->WaitSetupTime) << 8) |\
539  ((Timing->HoldSetupTime) << 16) |\
540  ((Timing->HiZSetupTime) << 24)
541  );
542 
543  /* NAND bank 3 registers configuration */
544  Device->PMEM = tmpr;
545 
546  return HAL_OK;
547 }
548 
558 {
559  uint32_t tmpr = 0;
560 
561  /* Check the parameters */
568 
569  /* Get the NAND bank 3 register value */
570  tmpr = Device->PATT;
571 
572  /* Clear ATTSETx, ATTWAITx, ATTHOLDx and ATTHIZx bits */
573  tmpr &= ((uint32_t)~(FMC_PATT_ATTSET3 | FMC_PATT_ATTWAIT3 | FMC_PATT_ATTHOLD3 | \
575  /* Set FMC_NAND device timing parameters */
576  tmpr |= (uint32_t)(Timing->SetupTime |\
577  ((Timing->WaitSetupTime) << 8) |\
578  ((Timing->HoldSetupTime) << 16) |\
579  ((Timing->HiZSetupTime) << 24));
580 
581  /* NAND bank 3 registers configuration */
582  Device->PATT = tmpr;
583 
584  return HAL_OK;
585 }
586 
593 HAL_StatusTypeDef FMC_NAND_DeInit(FMC_NAND_TypeDef *Device, uint32_t Bank)
594 {
595  /* Check the parameters */
598 
599  /* Disable the NAND Bank */
600  __FMC_NAND_DISABLE(Device);
601 
602  /* Set the FMC_NAND_BANK3 registers to their reset values */
603  Device->PCR = 0x00000018U;
604  Device->SR = 0x00000040U;
605  Device->PMEM = 0xFCFCFCFCU;
606  Device->PATT = 0xFCFCFCFCU;
607 
608  return HAL_OK;
609 }
610 
638 {
639  /* Check the parameters */
642 
643  /* Enable ECC feature */
644  Device->PCR |= FMC_PCR_ECCEN;
645 
646  return HAL_OK;
647 }
648 
649 
657 {
658  /* Check the parameters */
661 
662  /* Disable ECC feature */
663  Device->PCR &= ~FMC_PCR_ECCEN;
664 
665  return HAL_OK;
666 }
667 
676 HAL_StatusTypeDef FMC_NAND_GetECC(FMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout)
677 {
678  uint32_t tickstart = 0;
679 
680  /* Check the parameters */
683 
684  /* Get tick */
685  tickstart = HAL_GetTick();
686 
687  /* Wait until FIFO is empty */
688  while(__FMC_NAND_GET_FLAG(Device, Bank, FMC_FLAG_FEMPT) == RESET)
689  {
690  /* Check for the Timeout */
691  if(Timeout != HAL_MAX_DELAY)
692  {
693  if((Timeout == 0)||((HAL_GetTick() - tickstart ) > Timeout))
694  {
695  return HAL_TIMEOUT;
696  }
697  }
698  }
699 
700  /* Get the ECCR register value */
701  *ECCval = (uint32_t)Device->ECCR;
702 
703  return HAL_OK;
704 }
705 
761 {
762  uint32_t tmpr1 = 0;
763  uint32_t tmpr2 = 0;
764 
765  /* Check the parameters */
777 
778  /* Set SDRAM bank configuration parameters */
779  if (Init->SDBank != FMC_SDRAM_BANK2)
780  {
781  tmpr1 = Device->SDCR[FMC_SDRAM_BANK1];
782 
783  /* Clear NC, NR, MWID, NB, CAS, WP, SDCLK, RBURST, and RPIPE bits */
784  tmpr1 &= ((uint32_t)~(FMC_SDCR1_NC | FMC_SDCR1_NR | FMC_SDCR1_MWID | \
787 
788  tmpr1 |= (uint32_t)(Init->ColumnBitsNumber |\
789  Init->RowBitsNumber |\
790  Init->MemoryDataWidth |\
791  Init->InternalBankNumber |\
792  Init->CASLatency |\
793  Init->WriteProtection |\
794  Init->SDClockPeriod |\
795  Init->ReadBurst |\
796  Init->ReadPipeDelay
797  );
798  Device->SDCR[FMC_SDRAM_BANK1] = tmpr1;
799  }
800  else /* FMC_Bank2_SDRAM */
801  {
802  tmpr1 = Device->SDCR[FMC_SDRAM_BANK1];
803 
804  /* Clear SDCLK, RBURST, and RPIPE bits */
805  tmpr1 &= ((uint32_t)~(FMC_SDCR1_SDCLK | FMC_SDCR1_RBURST | FMC_SDCR1_RPIPE));
806 
807  tmpr1 |= (uint32_t)(Init->SDClockPeriod |\
808  Init->ReadBurst |\
809  Init->ReadPipeDelay);
810 
811  tmpr2 = Device->SDCR[FMC_SDRAM_BANK2];
812 
813  /* Clear NC, NR, MWID, NB, CAS, WP, SDCLK, RBURST, and RPIPE bits */
814  tmpr2 &= ((uint32_t)~(FMC_SDCR1_NC | FMC_SDCR1_NR | FMC_SDCR1_MWID | \
817 
818  tmpr2 |= (uint32_t)(Init->ColumnBitsNumber |\
819  Init->RowBitsNumber |\
820  Init->MemoryDataWidth |\
821  Init->InternalBankNumber |\
822  Init->CASLatency |\
823  Init->WriteProtection);
824 
825  Device->SDCR[FMC_SDRAM_BANK1] = tmpr1;
826  Device->SDCR[FMC_SDRAM_BANK2] = tmpr2;
827  }
828 
829  return HAL_OK;
830 }
831 
832 
842 {
843  uint32_t tmpr1 = 0;
844  uint32_t tmpr2 = 0;
845 
846  /* Check the parameters */
856 
857  /* Set SDRAM device timing parameters */
858  if (Bank != FMC_SDRAM_BANK2)
859  {
860  tmpr1 = Device->SDTR[FMC_SDRAM_BANK1];
861 
862  /* Clear TMRD, TXSR, TRAS, TRC, TWR, TRP and TRCD bits */
863  tmpr1 &= ((uint32_t)~(FMC_SDTR1_TMRD | FMC_SDTR1_TXSR | FMC_SDTR1_TRAS | \
865  FMC_SDTR1_TRCD));
866 
867  tmpr1 |= (uint32_t)(((Timing->LoadToActiveDelay)-1) |\
868  (((Timing->ExitSelfRefreshDelay)-1) << 4) |\
869  (((Timing->SelfRefreshTime)-1) << 8) |\
870  (((Timing->RowCycleDelay)-1) << 12) |\
871  (((Timing->WriteRecoveryTime)-1) <<16) |\
872  (((Timing->RPDelay)-1) << 20) |\
873  (((Timing->RCDDelay)-1) << 24));
874  Device->SDTR[FMC_SDRAM_BANK1] = tmpr1;
875  }
876  else /* FMC_Bank2_SDRAM */
877  {
878  tmpr1 = Device->SDTR[FMC_SDRAM_BANK1];
879 
880  /* Clear TRC and TRP bits */
881  tmpr1 &= ((uint32_t)~(FMC_SDTR1_TRC | FMC_SDTR1_TRP));
882 
883  tmpr1 |= (uint32_t)((((Timing->RowCycleDelay)-1) << 12) |\
884  (((Timing->RPDelay)-1) << 20));
885 
886  tmpr2 = Device->SDTR[FMC_SDRAM_BANK2];
887 
888  /* Clear TMRD, TXSR, TRAS, TRC, TWR, TRP and TRCD bits */
889  tmpr2 &= ((uint32_t)~(FMC_SDTR1_TMRD | FMC_SDTR1_TXSR | FMC_SDTR1_TRAS | \
891  FMC_SDTR1_TRCD));
892 
893  tmpr2 |= (uint32_t)(((Timing->LoadToActiveDelay)-1) |\
894  (((Timing->ExitSelfRefreshDelay)-1) << 4) |\
895  (((Timing->SelfRefreshTime)-1) << 8) |\
896  (((Timing->WriteRecoveryTime)-1) <<16) |\
897  (((Timing->RCDDelay)-1) << 24));
898 
899  Device->SDTR[FMC_SDRAM_BANK1] = tmpr1;
900  Device->SDTR[FMC_SDRAM_BANK2] = tmpr2;
901  }
902 
903  return HAL_OK;
904 }
905 
912 {
913  /* Check the parameters */
916 
917  /* De-initialize the SDRAM device */
918  Device->SDCR[Bank] = 0x000002D0;
919  Device->SDTR[Bank] = 0x0FFFFFFF;
920  Device->SDCMR = 0x00000000;
921  Device->SDRTR = 0x00000000;
922  Device->SDSR = 0x00000000;
923 
924  return HAL_OK;
925 }
926 
953 {
954  /* Check the parameters */
957 
958  /* Enable write protection */
959  Device->SDCR[Bank] |= FMC_SDRAM_WRITE_PROTECTION_ENABLE;
960 
961  return HAL_OK;
962 }
963 
970 {
971  /* Check the parameters */
974 
975  /* Disable write protection */
976  Device->SDCR[Bank] &= ~FMC_SDRAM_WRITE_PROTECTION_ENABLE;
977 
978  return HAL_OK;
979 }
980 
990 {
991  __IO uint32_t tmpr = 0;
992  uint32_t tickstart = 0;
993 
994  /* Check the parameters */
1000 
1001  /* Set command register */
1002  tmpr = (uint32_t)((Command->CommandMode) |\
1003  (Command->CommandTarget) |\
1004  (((Command->AutoRefreshNumber)-1) << 5) |\
1005  ((Command->ModeRegisterDefinition) << 9)
1006  );
1007 
1008  Device->SDCMR = tmpr;
1009 
1010  /* Get tick */
1011  tickstart = HAL_GetTick();
1012 
1013  /* wait until command is send */
1014  while(HAL_IS_BIT_SET(Device->SDSR, FMC_SDSR_BUSY))
1015  {
1016  /* Check for the Timeout */
1017  if(Timeout != HAL_MAX_DELAY)
1018  {
1019  if((Timeout == 0)||((HAL_GetTick() - tickstart ) > Timeout))
1020  {
1021  return HAL_TIMEOUT;
1022  }
1023  }
1024  }
1025 
1026  return HAL_OK;
1027 }
1028 
1036 {
1037  /* Check the parameters */
1039  assert_param(IS_FMC_REFRESH_RATE(RefreshRate));
1040 
1041  /* Set the refresh rate in command register */
1042  Device->SDRTR |= (RefreshRate<<1);
1043 
1044  return HAL_OK;
1045 }
1046 
1053 HAL_StatusTypeDef FMC_SDRAM_SetAutoRefreshNumber(FMC_SDRAM_TypeDef *Device, uint32_t AutoRefreshNumber)
1054 {
1055  /* Check the parameters */
1057  assert_param(IS_FMC_AUTOREFRESH_NUMBER(AutoRefreshNumber));
1058 
1059  /* Set the Auto-refresh number in command register */
1060  Device->SDCMR |= (AutoRefreshNumber << 5);
1061 
1062  return HAL_OK;
1063 }
1064 
1074 uint32_t FMC_SDRAM_GetModeStatus(FMC_SDRAM_TypeDef *Device, uint32_t Bank)
1075 {
1076  uint32_t tmpreg = 0;
1077 
1078  /* Check the parameters */
1081 
1082  /* Get the corresponding bank mode */
1083  if(Bank == FMC_SDRAM_BANK1)
1084  {
1085  tmpreg = (uint32_t)(Device->SDSR & FMC_SDSR_MODES1);
1086  }
1087  else
1088  {
1089  tmpreg = ((uint32_t)(Device->SDSR & FMC_SDSR_MODES2) >> 2);
1090  }
1091 
1092  /* Return the mode status */
1093  return tmpreg;
1094 }
1095 
1107 #endif /* HAL_SRAM_MODULE_ENABLED || HAL_NOR_MODULE_ENABLED || HAL_NAND_MODULE_ENABLED || HAL_SDRAM_MODULE_ENABLED */
1108 
1117 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
#define IS_FMC_WAIT_SIGNAL_ACTIVE(__ACTIVE__)
#define FMC_SDTR1_TWR
Definition: stm32f745xx.h:4477
#define FMC_SDCR1_NC
Definition: stm32f745xx.h:4412
#define FMC_NORSRAM_EXTENDED_TypeDef
#define IS_FMC_HIZ_TIME(TIME)
#define FMC_BCR1_MTYP
Definition: stm32f745xx.h:3933
#define FMC_SDTR1_TXSR
Definition: stm32f745xx.h:4463
FMC NAND Timing parameters structure definition.
#define IS_FMC_ROWBITS_NUMBER(ROW)
#define FMC_SDRAM_WRITE_PROTECTION_ENABLE
#define FMC_SDCR1_SDCLK
Definition: stm32f745xx.h:4426
HAL_StatusTypeDef FMC_NORSRAM_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_InitTypeDef *Init)
#define FMC_SDTR1_TRC
Definition: stm32f745xx.h:4473
#define FMC_SDCR1_RPIPE
Definition: stm32f745xx.h:4430
#define FMC_NORSRAM_BANK1
#define FMC_PATT_ATTHIZ3
Definition: stm32f745xx.h:4398
#define IS_FMC_ADDRESS_SETUP_TIME(__TIME__)
#define FMC_PCR_PTYP
Definition: stm32f745xx.h:4303
#define FMC_NAND_TypeDef
#define FMC_BTR1_ADDSET
Definition: stm32f745xx.h:4029
#define FMC_PCR_PWID
Definition: stm32f745xx.h:4304
#define FMC_SDTR1_TRAS
Definition: stm32f745xx.h:4468
#define IS_FMC_SDRAM_BANK(BANK)
#define FMC_SDSR_MODES2
Definition: stm32f745xx.h:4547
#define IS_FMC_MEMORY(__MEMORY__)
#define IS_FMC_TCLR_TIME(__TIME__)
#define assert_param(expr)
Include module&#39;s header file.
FMC SDRAM Timing parameters structure definition.
#define IS_FMC_READPIPE_DELAY(__DELAY__)
#define FMC_BCR1_CBURSTRW
Definition: stm32f745xx.h:3952
#define FMC_BTR1_ADDHLD
Definition: stm32f745xx.h:4034
#define IS_FMC_NAND_DEVICE(__INSTANCE__)
#define IS_FMC_COMMAND_MODE(__COMMAND__)
#define FMC_PMEM_MEMWAIT3
Definition: stm32f745xx.h:4342
HAL_StatusTypeDef FMC_NAND_DeInit(FMC_NAND_TypeDef *Device, uint32_t Bank)
#define FMC_FLAG_FEMPT
#define FMC_BCR1_MWID
Definition: stm32f745xx.h:3936
#define IS_FMC_CAS_LATENCY(LATENCY)
#define FMC_PCR_TAR
Definition: stm32f745xx.h:4313
#define FMC_BWTR1_ADDSET
Definition: stm32f745xx.h:4185
#define IS_FMC_NAND_MEMORY_WIDTH(WIDTH)
#define FMC_NORSRAM_TypeDef
#define FMC_BCR1_EXTMOD
Definition: stm32f745xx.h:3946
#define IS_FMC_DATA_LATENCY(__LATENCY__)
#define FMC_BCR1_WAITPOL
Definition: stm32f745xx.h:3941
#define FMC_SDCR1_NR
Definition: stm32f745xx.h:4415
#define FMC_PATT_ATTSET3
Definition: stm32f745xx.h:4371
#define IS_FMC_ECCPAGE_SIZE(SIZE)
#define FMC_PCR_PWAITEN
Definition: stm32f745xx.h:4301
#define FMC_SDCR1_NB
Definition: stm32f745xx.h:4421
#define FMC_BWTR1_BUSTURN
Definition: stm32f745xx.h:4204
#define FMC_PMEM_MEMSET3
Definition: stm32f745xx.h:4333
#define FMC_PCR_PBKEN
Definition: stm32f745xx.h:4302
#define FMC_BCR1_MUXEN
Definition: stm32f745xx.h:3932
#define IS_FMC_WAIT_POLARITY(__POLARITY__)
#define FMC_BCR1_WFDIS
Definition: stm32f745xx.h:3954
#define IS_FMC_PAGESIZE(__SIZE__)
HAL_StatusTypeDef FMC_SDRAM_WriteProtection_Disable(FMC_SDRAM_TypeDef *Device, uint32_t Bank)
#define IS_FMC_READ_BURST(__RBURST__)
uint32_t FMC_SDRAM_GetModeStatus(FMC_SDRAM_TypeDef *Device, uint32_t Bank)
HAL_StatusTypeDef FMC_SDRAM_ProgramRefreshRate(FMC_SDRAM_TypeDef *Device, uint32_t RefreshRate)
#define IS_FMC_ASYNWAIT(__STATE__)
#define IS_FMC_TURNAROUND_TIME(__TIME__)
#define FMC_BCR1_BURSTEN
Definition: stm32f745xx.h:3940
HAL_StatusTypeDef FMC_SDRAM_SetAutoRefreshNumber(FMC_SDRAM_TypeDef *Device, uint32_t AutoRefreshNumber)
#define FMC_SDTR1_TRP
Definition: stm32f745xx.h:4481
#define FMC_SDSR_BUSY
Definition: stm32f745xx.h:4550
#define IS_FMC_WAIT_FEATURE(FEATURE)
#define IS_FMC_LOADTOACTIVE_DELAY(__DELAY__)
#define IS_FMC_RCD_DELAY(__DELAY__)
#define __FMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__)
Get flag status of the NAND device.
#define IS_FMC_COMMAND_TARGET(__TARGET__)
#define FMC_NORSRAM_FLASH_ACCESS_ENABLE
#define FMC_PCR_ECCPS
Definition: stm32f745xx.h:4318
#define IS_FMC_DATASETUP_TIME(__TIME__)
#define IS_FMC_WRITE_OPERATION(__OPERATION__)
#define IS_FMC_ACCESS_MODE(__MODE__)
FMC NORSRAM Timing parameters structure definition.
#define __FMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__)
Disable the NORSRAM device access.
#define IS_FMC_NORSRAM_EXTENDED_DEVICE(__INSTANCE__)
#define FMC_BWTR1_ACCMOD
Definition: stm32f745xx.h:4209
#define IS_FMC_NORSRAM_BANK(BANK)
#define FMC_PATT_ATTWAIT3
Definition: stm32f745xx.h:4380
#define FMC_SDCR1_MWID
Definition: stm32f745xx.h:4418
SDRAM command parameters structure definition.
#define HAL_MAX_DELAY
#define FMC_PCR_MEMORY_TYPE_NAND
HAL_StatusTypeDef FMC_SDRAM_Timing_Init(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_TimingTypeDef *Timing, uint32_t Bank)
#define IS_FMC_INTERNALBANK_NUMBER(NUMBER)
#define IS_FMC_ECC_STATE(STATE)
#define __IO
Definition: core_cm0.h:213
#define FMC_SDRAM_BANK1
#define IS_FMC_NAND_BANK(BANK)
#define IS_FMC_SDRAM_DEVICE(__INSTANCE__)
HAL_StatusTypeDef FMC_SDRAM_Init(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_InitTypeDef *Init)
HAL_StatusTypeDef FMC_SDRAM_SendCommand(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_CommandTypeDef *Command, uint32_t Timeout)
HAL_StatusTypeDef FMC_NORSRAM_Timing_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank)
#define FMC_SDCR1_CAS
Definition: stm32f745xx.h:4422
#define IS_FMC_REFRESH_RATE(__RATE__)
#define IS_FMC_EXTENDED_MODE(__MODE__)
This file contains all the functions prototypes for the HAL module driver.
#define FMC_BCR1_CCLKEN
Definition: stm32f745xx.h:3953
#define IS_FMC_TAR_TIME(TIME)
#define FMC_BCR1_WREN
Definition: stm32f745xx.h:3944
#define FMC_BCR1_MBKEN
Definition: stm32f745xx.h:3931
HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Disable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank)
#define FMC_SDTR1_TRCD
Definition: stm32f745xx.h:4485
#define IS_FMC_SDCLOCK_PERIOD(__PERIOD__)
FMC SDRAM Configuration Structure definition.
#define FMC_BTR1_DATAST
Definition: stm32f745xx.h:4039
#define FMC_BTR1_CLKDIV
Definition: stm32f745xx.h:4053
#define FMC_BCR1_ASYNCWAIT
Definition: stm32f745xx.h:3947
#define IS_FMC_NORSRAM_MEMORY_WIDTH(__WIDTH__)
#define IS_FMC_WRITE_BURST(__BURST__)
#define IS_FMC_HOLD_TIME(TIME)
HAL_StatusTypeDef FMC_NAND_AttributeSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank)
#define FMC_CONTINUOUS_CLOCK_SYNC_ASYNC
#define IS_FMC_WAITE_SIGNAL(__SIGNAL__)
#define IS_FMC_SETUP_TIME(TIME)
#define IS_FMC_EXITSELFREFRESH_DELAY(__DELAY__)
HAL_StatusTypeDef FMC_NAND_GetECC(FMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout)
HAL_StatusTypeDef FMC_NAND_ECC_Enable(FMC_NAND_TypeDef *Device, uint32_t Bank)
#define FMC_BWTR1_DATAST
Definition: stm32f745xx.h:4195
#define FMC_SDCR1_RBURST
Definition: stm32f745xx.h:4429
#define IS_FMC_SELFREFRESH_TIME(__TIME__)
FMC NORSRAM Configuration Structure definition.
#define IS_FMC_MODE_REGISTER(__CONTENT__)
HAL_StatusTypeDef FMC_SDRAM_WriteProtection_Enable(FMC_SDRAM_TypeDef *Device, uint32_t Bank)
#define FMC_EXTENDED_MODE_ENABLE
#define FMC_BCR1_FACCEN
Definition: stm32f745xx.h:3939
HAL_StatusTypeDef FMC_NAND_ECC_Disable(FMC_NAND_TypeDef *Device, uint32_t Bank)
#define FMC_SDSR_MODES1
Definition: stm32f745xx.h:4544
#define FMC_BCR1_WAITCFG
Definition: stm32f745xx.h:3943
#define HAL_IS_BIT_SET(REG, BIT)
#define FMC_SDRAM_TypeDef
#define FMC_PCR_ECCEN
Definition: stm32f745xx.h:4307
#define IS_FMC_CLK_DIV(DIV)
#define FMC_SDRAM_BANK2
#define IS_FMC_BURSTMODE(__STATE__)
#define IS_FMC_ADDRESS_HOLD_TIME(__TIME__)
#define FMC_BTR1_DATLAT
Definition: stm32f745xx.h:4058
HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Enable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank)
HAL_StatusTypeDef FMC_NORSRAM_Extended_Timing_Init(FMC_NORSRAM_EXTENDED_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode)
#define FMC_BTR1_ACCMOD
Definition: stm32f745xx.h:4063
#define FMC_SDTR1_TMRD
Definition: stm32f745xx.h:4458
#define FMC_PATT_ATTHOLD3
Definition: stm32f745xx.h:4389
#define __FMC_NAND_DISABLE(__INSTANCE__)
Disable the NAND device access.
#define IS_FMC_MUX(__MUX__)
HAL_StatusTypeDef FMC_NAND_CommonSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank)
HAL_StatusTypeDef FMC_NORSRAM_DeInit(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank)
#define IS_FMC_RP_DELAY(__DELAY__)
#define IS_FMC_NORSRAM_DEVICE(__INSTANCE__)
#define FMC_WRITE_OPERATION_ENABLE
#define FMC_PMEM_MEMHIZ3
Definition: stm32f745xx.h:4360
#define FMC_SDCR1_WP
Definition: stm32f745xx.h:4425
#define IS_FMC_WAIT_TIME(TIME)
#define IS_FMC_COLUMNBITS_NUMBER(COLUMN)
#define IS_FMC_WRITE_RECOVERY_TIME(__TIME__)
HAL_StatusTypeDef
HAL Status structures definition.
#define FMC_BCR1_CPSIZE
Definition: stm32f745xx.h:3948
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.
HAL_StatusTypeDef FMC_NAND_Init(FMC_NAND_TypeDef *Device, FMC_NAND_InitTypeDef *Init)
#define FMC_BTR1_BUSTURN
Definition: stm32f745xx.h:4048
#define IS_FMC_WRITE_PROTECTION(__WRITE__)
HAL_StatusTypeDef FMC_SDRAM_DeInit(FMC_SDRAM_TypeDef *Device, uint32_t Bank)
#define IS_FMC_CONTINOUS_CLOCK(CCLOCK)
#define FMC_MEMORY_TYPE_NOR
#define IS_FMC_ROWCYCLE_DELAY(__DELAY__)
#define FMC_PCR_TCLR
Definition: stm32f745xx.h:4308
#define FMC_BCR1_WAITEN
Definition: stm32f745xx.h:3945
#define IS_FMC_WRITE_FIFO(__FIFO__)
#define FMC_BWTR1_ADDHLD
Definition: stm32f745xx.h:4190
FMC NAND Configuration Structure definition.
#define IS_FMC_AUTOREFRESH_NUMBER(__NUMBER__)
#define IS_FMC_SDMEMORY_WIDTH(WIDTH)
#define FMC_PMEM_MEMHOLD3
Definition: stm32f745xx.h:4351