stm32f7xx_ll_fmc.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef __STM32F7xx_LL_FMC_H
22 #define __STM32F7xx_LL_FMC_H
23 
24 #ifdef __cplusplus
25  extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32f7xx_hal_def.h"
30 
42 #define IS_FMC_NORSRAM_BANK(BANK) (((BANK) == FMC_NORSRAM_BANK1) || \
43  ((BANK) == FMC_NORSRAM_BANK2) || \
44  ((BANK) == FMC_NORSRAM_BANK3) || \
45  ((BANK) == FMC_NORSRAM_BANK4))
46 
47 #define IS_FMC_MUX(__MUX__) (((__MUX__) == FMC_DATA_ADDRESS_MUX_DISABLE) || \
48  ((__MUX__) == FMC_DATA_ADDRESS_MUX_ENABLE))
49 
50 #define IS_FMC_MEMORY(__MEMORY__) (((__MEMORY__) == FMC_MEMORY_TYPE_SRAM) || \
51  ((__MEMORY__) == FMC_MEMORY_TYPE_PSRAM)|| \
52  ((__MEMORY__) == FMC_MEMORY_TYPE_NOR))
53 
54 #define IS_FMC_NORSRAM_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_8) || \
55  ((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_16) || \
56  ((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_32))
57 
58 #define IS_FMC_ACCESS_MODE(__MODE__) (((__MODE__) == FMC_ACCESS_MODE_A) || \
59  ((__MODE__) == FMC_ACCESS_MODE_B) || \
60  ((__MODE__) == FMC_ACCESS_MODE_C) || \
61  ((__MODE__) == FMC_ACCESS_MODE_D))
62 
63 #define IS_FMC_NAND_BANK(BANK) ((BANK) == FMC_NAND_BANK3)
64 
65 #define IS_FMC_WAIT_FEATURE(FEATURE) (((FEATURE) == FMC_NAND_WAIT_FEATURE_DISABLE) || \
66  ((FEATURE) == FMC_NAND_WAIT_FEATURE_ENABLE))
67 
68 #define IS_FMC_NAND_MEMORY_WIDTH(WIDTH) (((WIDTH) == FMC_NAND_MEM_BUS_WIDTH_8) || \
69  ((WIDTH) == FMC_NAND_MEM_BUS_WIDTH_16))
70 
71 #define IS_FMC_ECC_STATE(STATE) (((STATE) == FMC_NAND_ECC_DISABLE) || \
72  ((STATE) == FMC_NAND_ECC_ENABLE))
73 
74 #define IS_FMC_ECCPAGE_SIZE(SIZE) (((SIZE) == FMC_NAND_ECC_PAGE_SIZE_256BYTE) || \
75  ((SIZE) == FMC_NAND_ECC_PAGE_SIZE_512BYTE) || \
76  ((SIZE) == FMC_NAND_ECC_PAGE_SIZE_1024BYTE) || \
77  ((SIZE) == FMC_NAND_ECC_PAGE_SIZE_2048BYTE) || \
78  ((SIZE) == FMC_NAND_ECC_PAGE_SIZE_4096BYTE) || \
79  ((SIZE) == FMC_NAND_ECC_PAGE_SIZE_8192BYTE))
80 
81 #define IS_FMC_SDMEMORY_WIDTH(WIDTH) (((WIDTH) == FMC_SDRAM_MEM_BUS_WIDTH_8) || \
82  ((WIDTH) == FMC_SDRAM_MEM_BUS_WIDTH_16) || \
83  ((WIDTH) == FMC_SDRAM_MEM_BUS_WIDTH_32))
84 
85 #define IS_FMC_WRITE_PROTECTION(__WRITE__) (((__WRITE__) == FMC_SDRAM_WRITE_PROTECTION_DISABLE) || \
86  ((__WRITE__) == FMC_SDRAM_WRITE_PROTECTION_ENABLE))
87 
88 #define IS_FMC_SDCLOCK_PERIOD(__PERIOD__) (((__PERIOD__) == FMC_SDRAM_CLOCK_DISABLE) || \
89  ((__PERIOD__) == FMC_SDRAM_CLOCK_PERIOD_2) || \
90  ((__PERIOD__) == FMC_SDRAM_CLOCK_PERIOD_3))
91 
92 #define IS_FMC_READ_BURST(__RBURST__) (((__RBURST__) == FMC_SDRAM_RBURST_DISABLE) || \
93  ((__RBURST__) == FMC_SDRAM_RBURST_ENABLE))
94 
95 #define IS_FMC_READPIPE_DELAY(__DELAY__) (((__DELAY__) == FMC_SDRAM_RPIPE_DELAY_0) || \
96  ((__DELAY__) == FMC_SDRAM_RPIPE_DELAY_1) || \
97  ((__DELAY__) == FMC_SDRAM_RPIPE_DELAY_2))
98 
99 #define IS_FMC_COMMAND_MODE(__COMMAND__) (((__COMMAND__) == FMC_SDRAM_CMD_NORMAL_MODE) || \
100  ((__COMMAND__) == FMC_SDRAM_CMD_CLK_ENABLE) || \
101  ((__COMMAND__) == FMC_SDRAM_CMD_PALL) || \
102  ((__COMMAND__) == FMC_SDRAM_CMD_AUTOREFRESH_MODE) || \
103  ((__COMMAND__) == FMC_SDRAM_CMD_LOAD_MODE) || \
104  ((__COMMAND__) == FMC_SDRAM_CMD_SELFREFRESH_MODE) || \
105  ((__COMMAND__) == FMC_SDRAM_CMD_POWERDOWN_MODE))
106 
107 #define IS_FMC_COMMAND_TARGET(__TARGET__) (((__TARGET__) == FMC_SDRAM_CMD_TARGET_BANK1) || \
108  ((__TARGET__) == FMC_SDRAM_CMD_TARGET_BANK2) || \
109  ((__TARGET__) == FMC_SDRAM_CMD_TARGET_BANK1_2))
110 
114 #define IS_FMC_TCLR_TIME(__TIME__) ((__TIME__) <= 255)
115 
122 #define IS_FMC_TAR_TIME(TIME) ((TIME) <= 255)
123 
130 #define IS_FMC_SETUP_TIME(TIME) ((TIME) <= 254)
131 
138 #define IS_FMC_WAIT_TIME(TIME) ((TIME) <= 254)
139 
146 #define IS_FMC_HOLD_TIME(TIME) ((TIME) <= 254)
147 
154 #define IS_FMC_HIZ_TIME(TIME) ((TIME) <= 254)
155 
159 #define IS_FMC_BURSTMODE(__STATE__) (((__STATE__) == FMC_BURST_ACCESS_MODE_DISABLE) || \
160  ((__STATE__) == FMC_BURST_ACCESS_MODE_ENABLE))
161 
162 #define IS_FMC_WAIT_POLARITY(__POLARITY__) (((__POLARITY__) == FMC_WAIT_SIGNAL_POLARITY_LOW) || \
163  ((__POLARITY__) == FMC_WAIT_SIGNAL_POLARITY_HIGH))
164 
165 #define IS_FMC_WAIT_SIGNAL_ACTIVE(__ACTIVE__) (((__ACTIVE__) == FMC_WAIT_TIMING_BEFORE_WS) || \
166  ((__ACTIVE__) == FMC_WAIT_TIMING_DURING_WS))
167 
168 #define IS_FMC_WRITE_OPERATION(__OPERATION__) (((__OPERATION__) == FMC_WRITE_OPERATION_DISABLE) || \
169  ((__OPERATION__) == FMC_WRITE_OPERATION_ENABLE))
170 
171 #define IS_FMC_WAITE_SIGNAL(__SIGNAL__) (((__SIGNAL__) == FMC_WAIT_SIGNAL_DISABLE) || \
172  ((__SIGNAL__) == FMC_WAIT_SIGNAL_ENABLE))
173 
174 #define IS_FMC_EXTENDED_MODE(__MODE__) (((__MODE__) == FMC_EXTENDED_MODE_DISABLE) || \
175  ((__MODE__) == FMC_EXTENDED_MODE_ENABLE))
176 
177 #define IS_FMC_ASYNWAIT(__STATE__) (((__STATE__) == FMC_ASYNCHRONOUS_WAIT_DISABLE) || \
178  ((__STATE__) == FMC_ASYNCHRONOUS_WAIT_ENABLE))
179 
183 #define IS_FMC_DATA_LATENCY(__LATENCY__) (((__LATENCY__) > 1) && ((__LATENCY__) <= 17))
184 
188 #define IS_FMC_WRITE_BURST(__BURST__) (((__BURST__) == FMC_WRITE_BURST_DISABLE) || \
189  ((__BURST__) == FMC_WRITE_BURST_ENABLE))
190 
191 #define IS_FMC_CONTINOUS_CLOCK(CCLOCK) (((CCLOCK) == FMC_CONTINUOUS_CLOCK_SYNC_ONLY) || \
192  ((CCLOCK) == FMC_CONTINUOUS_CLOCK_SYNC_ASYNC))
193 
194 
198 #define IS_FMC_ADDRESS_SETUP_TIME(__TIME__) ((__TIME__) <= 15)
199 
206 #define IS_FMC_ADDRESS_HOLD_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 15))
207 
214 #define IS_FMC_DATASETUP_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 255))
215 
222 #define IS_FMC_TURNAROUND_TIME(__TIME__) ((__TIME__) <= 15)
223 
230 #define IS_FMC_CLK_DIV(DIV) (((DIV) > 1) && ((DIV) <= 16))
231 
238 #define IS_FMC_LOADTOACTIVE_DELAY(__DELAY__) (((__DELAY__) > 0) && ((__DELAY__) <= 16))
239 
246 #define IS_FMC_EXITSELFREFRESH_DELAY(__DELAY__) (((__DELAY__) > 0) && ((__DELAY__) <= 16))
247 
254 #define IS_FMC_SELFREFRESH_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 16))
255 
262 #define IS_FMC_ROWCYCLE_DELAY(__DELAY__) (((__DELAY__) > 0) && ((__DELAY__) <= 16))
263 
270 #define IS_FMC_WRITE_RECOVERY_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 16))
271 
278 #define IS_FMC_RP_DELAY(__DELAY__) (((__DELAY__) > 0) && ((__DELAY__) <= 16))
279 
286 #define IS_FMC_RCD_DELAY(__DELAY__) (((__DELAY__) > 0) && ((__DELAY__) <= 16))
287 
294 #define IS_FMC_AUTOREFRESH_NUMBER(__NUMBER__) (((__NUMBER__) > 0) && ((__NUMBER__) <= 16))
295 
302 #define IS_FMC_MODE_REGISTER(__CONTENT__) ((__CONTENT__) <= 8191)
303 
310 #define IS_FMC_REFRESH_RATE(__RATE__) ((__RATE__) <= 8191)
311 
318 #define IS_FMC_NORSRAM_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NORSRAM_DEVICE)
319 
326 #define IS_FMC_NORSRAM_EXTENDED_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NORSRAM_EXTENDED_DEVICE)
327 
334 #define IS_FMC_NAND_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NAND_DEVICE)
335 
342 #define IS_FMC_SDRAM_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_SDRAM_DEVICE)
343 
347 #define IS_FMC_SDRAM_BANK(BANK) (((BANK) == FMC_SDRAM_BANK1) || \
348  ((BANK) == FMC_SDRAM_BANK2))
349 
350 #define IS_FMC_COLUMNBITS_NUMBER(COLUMN) (((COLUMN) == FMC_SDRAM_COLUMN_BITS_NUM_8) || \
351  ((COLUMN) == FMC_SDRAM_COLUMN_BITS_NUM_9) || \
352  ((COLUMN) == FMC_SDRAM_COLUMN_BITS_NUM_10) || \
353  ((COLUMN) == FMC_SDRAM_COLUMN_BITS_NUM_11))
354 
355 #define IS_FMC_ROWBITS_NUMBER(ROW) (((ROW) == FMC_SDRAM_ROW_BITS_NUM_11) || \
356  ((ROW) == FMC_SDRAM_ROW_BITS_NUM_12) || \
357  ((ROW) == FMC_SDRAM_ROW_BITS_NUM_13))
358 
359 #define IS_FMC_INTERNALBANK_NUMBER(NUMBER) (((NUMBER) == FMC_SDRAM_INTERN_BANKS_NUM_2) || \
360  ((NUMBER) == FMC_SDRAM_INTERN_BANKS_NUM_4))
361 
362 
363 #define IS_FMC_CAS_LATENCY(LATENCY) (((LATENCY) == FMC_SDRAM_CAS_LATENCY_1) || \
364  ((LATENCY) == FMC_SDRAM_CAS_LATENCY_2) || \
365  ((LATENCY) == FMC_SDRAM_CAS_LATENCY_3))
366 
367 #define IS_FMC_PAGESIZE(__SIZE__) (((__SIZE__) == FMC_PAGE_SIZE_NONE) || \
368  ((__SIZE__) == FMC_PAGE_SIZE_128) || \
369  ((__SIZE__) == FMC_PAGE_SIZE_256) || \
370  ((__SIZE__) == FMC_PAGE_SIZE_512) || \
371  ((__SIZE__) == FMC_PAGE_SIZE_1024))
372 
373 #define IS_FMC_WRITE_FIFO(__FIFO__) (((__FIFO__) == FMC_WRITE_FIFO_DISABLE) || \
374  ((__FIFO__) == FMC_WRITE_FIFO_ENABLE))
375 
379 /* Exported typedef ----------------------------------------------------------*/
383 #define FMC_NORSRAM_TypeDef FMC_Bank1_TypeDef
384 #define FMC_NORSRAM_EXTENDED_TypeDef FMC_Bank1E_TypeDef
385 #define FMC_NAND_TypeDef FMC_Bank3_TypeDef
386 #define FMC_SDRAM_TypeDef FMC_Bank5_6_TypeDef
387 
388 #define FMC_NORSRAM_DEVICE FMC_Bank1
389 #define FMC_NORSRAM_EXTENDED_DEVICE FMC_Bank1E
390 #define FMC_NAND_DEVICE FMC_Bank3
391 #define FMC_SDRAM_DEVICE FMC_Bank5_6
392 
396 typedef struct
397 {
398  uint32_t NSBank;
401  uint32_t DataAddressMux;
405  uint32_t MemoryType;
409  uint32_t MemoryDataWidth;
412  uint32_t BurstAccessMode;
420  uint32_t WaitSignalActive;
425  uint32_t WriteOperation;
428  uint32_t WaitSignal;
432  uint32_t ExtendedMode;
435  uint32_t AsynchronousWait;
439  uint32_t WriteBurst;
442  uint32_t ContinuousClock;
447  uint32_t WriteFifo;
452  uint32_t PageSize;
456 
460 typedef struct
461 {
462  uint32_t AddressSetupTime;
467  uint32_t AddressHoldTime;
472  uint32_t DataSetupTime;
483  uint32_t CLKDivision;
488  uint32_t DataLatency;
496  uint32_t AccessMode;
499 
503 typedef struct
504 {
505  uint32_t NandBank;
508  uint32_t Waitfeature;
511  uint32_t MemoryDataWidth;
514  uint32_t EccComputation;
517  uint32_t ECCPageSize;
520  uint32_t TCLRSetupTime;
524  uint32_t TARSetupTime;
528 
532 typedef struct
533 {
534  uint32_t SetupTime;
540  uint32_t WaitSetupTime;
546  uint32_t HoldSetupTime;
553  uint32_t HiZSetupTime;
559 
563 typedef struct
564 {
565  uint32_t SDBank;
568  uint32_t ColumnBitsNumber;
571  uint32_t RowBitsNumber;
574  uint32_t MemoryDataWidth;
580  uint32_t CASLatency;
583  uint32_t WriteProtection;
586  uint32_t SDClockPeriod;
590  uint32_t ReadBurst;
594  uint32_t ReadPipeDelay;
597 
601 typedef struct
602 {
603  uint32_t LoadToActiveDelay;
611  uint32_t SelfRefreshTime;
615  uint32_t RowCycleDelay;
620  uint32_t WriteRecoveryTime;
623  uint32_t RPDelay;
627  uint32_t RCDDelay;
631 
635 typedef struct
636 {
637  uint32_t CommandMode;
640  uint32_t CommandTarget;
643  uint32_t AutoRefreshNumber;
652 /* Exported constants --------------------------------------------------------*/
664 #define FMC_NORSRAM_BANK1 ((uint32_t)0x00000000U)
665 #define FMC_NORSRAM_BANK2 ((uint32_t)0x00000002U)
666 #define FMC_NORSRAM_BANK3 ((uint32_t)0x00000004U)
667 #define FMC_NORSRAM_BANK4 ((uint32_t)0x00000006U)
668 
675 #define FMC_DATA_ADDRESS_MUX_DISABLE ((uint32_t)0x00000000U)
676 #define FMC_DATA_ADDRESS_MUX_ENABLE ((uint32_t)0x00000002U)
677 
684 #define FMC_MEMORY_TYPE_SRAM ((uint32_t)0x00000000U)
685 #define FMC_MEMORY_TYPE_PSRAM ((uint32_t)0x00000004U)
686 #define FMC_MEMORY_TYPE_NOR ((uint32_t)0x00000008U)
687 
694 #define FMC_NORSRAM_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000U)
695 #define FMC_NORSRAM_MEM_BUS_WIDTH_16 ((uint32_t)0x00000010U)
696 #define FMC_NORSRAM_MEM_BUS_WIDTH_32 ((uint32_t)0x00000020U)
697 
704 #define FMC_NORSRAM_FLASH_ACCESS_ENABLE ((uint32_t)0x00000040U)
705 #define FMC_NORSRAM_FLASH_ACCESS_DISABLE ((uint32_t)0x00000000U)
706 
713 #define FMC_BURST_ACCESS_MODE_DISABLE ((uint32_t)0x00000000U)
714 #define FMC_BURST_ACCESS_MODE_ENABLE ((uint32_t)0x00000100U)
715 
722 #define FMC_WAIT_SIGNAL_POLARITY_LOW ((uint32_t)0x00000000U)
723 #define FMC_WAIT_SIGNAL_POLARITY_HIGH ((uint32_t)0x00000200U)
724 
731 #define FMC_WAIT_TIMING_BEFORE_WS ((uint32_t)0x00000000U)
732 #define FMC_WAIT_TIMING_DURING_WS ((uint32_t)0x00000800U)
733 
740 #define FMC_WRITE_OPERATION_DISABLE ((uint32_t)0x00000000U)
741 #define FMC_WRITE_OPERATION_ENABLE ((uint32_t)0x00001000U)
742 
749 #define FMC_WAIT_SIGNAL_DISABLE ((uint32_t)0x00000000U)
750 #define FMC_WAIT_SIGNAL_ENABLE ((uint32_t)0x00002000U)
751 
758 #define FMC_EXTENDED_MODE_DISABLE ((uint32_t)0x00000000U)
759 #define FMC_EXTENDED_MODE_ENABLE ((uint32_t)0x00004000U)
760 
767 #define FMC_ASYNCHRONOUS_WAIT_DISABLE ((uint32_t)0x00000000U)
768 #define FMC_ASYNCHRONOUS_WAIT_ENABLE ((uint32_t)0x00008000U)
769 
776 #define FMC_PAGE_SIZE_NONE ((uint32_t)0x00000000U)
777 #define FMC_PAGE_SIZE_128 ((uint32_t)FMC_BCR1_CPSIZE_0)
778 #define FMC_PAGE_SIZE_256 ((uint32_t)FMC_BCR1_CPSIZE_1)
779 #define FMC_PAGE_SIZE_512 ((uint32_t)(FMC_BCR1_CPSIZE_0 | FMC_BCR1_CPSIZE_1))
780 #define FMC_PAGE_SIZE_1024 ((uint32_t)FMC_BCR1_CPSIZE_2)
781 
788 #define FMC_WRITE_BURST_DISABLE ((uint32_t)0x00000000U)
789 #define FMC_WRITE_BURST_ENABLE ((uint32_t)0x00080000U)
790 
797 #define FMC_CONTINUOUS_CLOCK_SYNC_ONLY ((uint32_t)0x00000000U)
798 #define FMC_CONTINUOUS_CLOCK_SYNC_ASYNC ((uint32_t)0x00100000U)
799 
806 #define FMC_WRITE_FIFO_DISABLE ((uint32_t)FMC_BCR1_WFDIS)
807 #define FMC_WRITE_FIFO_ENABLE ((uint32_t)0x00000000U)
808 
815 #define FMC_ACCESS_MODE_A ((uint32_t)0x00000000U)
816 #define FMC_ACCESS_MODE_B ((uint32_t)0x10000000U)
817 #define FMC_ACCESS_MODE_C ((uint32_t)0x20000000U)
818 #define FMC_ACCESS_MODE_D ((uint32_t)0x30000000)
819 
833 #define FMC_NAND_BANK3 ((uint32_t)0x00000100U)
834 
841 #define FMC_NAND_WAIT_FEATURE_DISABLE ((uint32_t)0x00000000U)
842 #define FMC_NAND_WAIT_FEATURE_ENABLE ((uint32_t)0x00000002U)
843 
850 #define FMC_PCR_MEMORY_TYPE_NAND ((uint32_t)0x00000008U)
851 
858 #define FMC_NAND_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000U)
859 #define FMC_NAND_MEM_BUS_WIDTH_16 ((uint32_t)0x00000010U)
860 
867 #define FMC_NAND_ECC_DISABLE ((uint32_t)0x00000000U)
868 #define FMC_NAND_ECC_ENABLE ((uint32_t)0x00000040U)
869 
876 #define FMC_NAND_ECC_PAGE_SIZE_256BYTE ((uint32_t)0x00000000U)
877 #define FMC_NAND_ECC_PAGE_SIZE_512BYTE ((uint32_t)0x00020000U)
878 #define FMC_NAND_ECC_PAGE_SIZE_1024BYTE ((uint32_t)0x00040000U)
879 #define FMC_NAND_ECC_PAGE_SIZE_2048BYTE ((uint32_t)0x00060000U)
880 #define FMC_NAND_ECC_PAGE_SIZE_4096BYTE ((uint32_t)0x00080000U)
881 #define FMC_NAND_ECC_PAGE_SIZE_8192BYTE ((uint32_t)0x000A0000U)
882 
896 #define FMC_SDRAM_BANK1 ((uint32_t)0x00000000U)
897 #define FMC_SDRAM_BANK2 ((uint32_t)0x00000001U)
898 
905 #define FMC_SDRAM_COLUMN_BITS_NUM_8 ((uint32_t)0x00000000U)
906 #define FMC_SDRAM_COLUMN_BITS_NUM_9 ((uint32_t)0x00000001U)
907 #define FMC_SDRAM_COLUMN_BITS_NUM_10 ((uint32_t)0x00000002U)
908 #define FMC_SDRAM_COLUMN_BITS_NUM_11 ((uint32_t)0x00000003U)
909 
916 #define FMC_SDRAM_ROW_BITS_NUM_11 ((uint32_t)0x00000000U)
917 #define FMC_SDRAM_ROW_BITS_NUM_12 ((uint32_t)0x00000004U)
918 #define FMC_SDRAM_ROW_BITS_NUM_13 ((uint32_t)0x00000008U)
919 
926 #define FMC_SDRAM_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000U)
927 #define FMC_SDRAM_MEM_BUS_WIDTH_16 ((uint32_t)0x00000010U)
928 #define FMC_SDRAM_MEM_BUS_WIDTH_32 ((uint32_t)0x00000020U)
929 
936 #define FMC_SDRAM_INTERN_BANKS_NUM_2 ((uint32_t)0x00000000U)
937 #define FMC_SDRAM_INTERN_BANKS_NUM_4 ((uint32_t)0x00000040U)
938 
945 #define FMC_SDRAM_CAS_LATENCY_1 ((uint32_t)0x00000080U)
946 #define FMC_SDRAM_CAS_LATENCY_2 ((uint32_t)0x00000100U)
947 #define FMC_SDRAM_CAS_LATENCY_3 ((uint32_t)0x00000180)
948 
955 #define FMC_SDRAM_WRITE_PROTECTION_DISABLE ((uint32_t)0x00000000U)
956 #define FMC_SDRAM_WRITE_PROTECTION_ENABLE ((uint32_t)0x00000200U)
957 
964 #define FMC_SDRAM_CLOCK_DISABLE ((uint32_t)0x00000000U)
965 #define FMC_SDRAM_CLOCK_PERIOD_2 ((uint32_t)0x00000800U)
966 #define FMC_SDRAM_CLOCK_PERIOD_3 ((uint32_t)0x00000C00)
967 
974 #define FMC_SDRAM_RBURST_DISABLE ((uint32_t)0x00000000U)
975 #define FMC_SDRAM_RBURST_ENABLE ((uint32_t)0x00001000U)
976 
983 #define FMC_SDRAM_RPIPE_DELAY_0 ((uint32_t)0x00000000U)
984 #define FMC_SDRAM_RPIPE_DELAY_1 ((uint32_t)0x00002000U)
985 #define FMC_SDRAM_RPIPE_DELAY_2 ((uint32_t)0x00004000U)
986 
993 #define FMC_SDRAM_CMD_NORMAL_MODE ((uint32_t)0x00000000U)
994 #define FMC_SDRAM_CMD_CLK_ENABLE ((uint32_t)0x00000001U)
995 #define FMC_SDRAM_CMD_PALL ((uint32_t)0x00000002U)
996 #define FMC_SDRAM_CMD_AUTOREFRESH_MODE ((uint32_t)0x00000003U)
997 #define FMC_SDRAM_CMD_LOAD_MODE ((uint32_t)0x00000004U)
998 #define FMC_SDRAM_CMD_SELFREFRESH_MODE ((uint32_t)0x00000005U)
999 #define FMC_SDRAM_CMD_POWERDOWN_MODE ((uint32_t)0x00000006U)
1000 
1007 #define FMC_SDRAM_CMD_TARGET_BANK2 FMC_SDCMR_CTB2
1008 #define FMC_SDRAM_CMD_TARGET_BANK1 FMC_SDCMR_CTB1
1009 #define FMC_SDRAM_CMD_TARGET_BANK1_2 ((uint32_t)0x00000018U)
1010 
1017 #define FMC_SDRAM_NORMAL_MODE ((uint32_t)0x00000000U)
1018 #define FMC_SDRAM_SELF_REFRESH_MODE FMC_SDSR_MODES1_0
1019 #define FMC_SDRAM_POWER_DOWN_MODE FMC_SDSR_MODES1_1
1020 
1031 #define FMC_IT_RISING_EDGE ((uint32_t)0x00000008U)
1032 #define FMC_IT_LEVEL ((uint32_t)0x00000010U)
1033 #define FMC_IT_FALLING_EDGE ((uint32_t)0x00000020U)
1034 #define FMC_IT_REFRESH_ERROR ((uint32_t)0x00004000U)
1035 
1042 #define FMC_FLAG_RISING_EDGE ((uint32_t)0x00000001U)
1043 #define FMC_FLAG_LEVEL ((uint32_t)0x00000002U)
1044 #define FMC_FLAG_FALLING_EDGE ((uint32_t)0x00000004U)
1045 #define FMC_FLAG_FEMPT ((uint32_t)0x00000040U)
1046 #define FMC_SDRAM_FLAG_REFRESH_IT FMC_SDSR_RE
1047 #define FMC_SDRAM_FLAG_BUSY FMC_SDSR_BUSY
1048 #define FMC_SDRAM_FLAG_REFRESH_ERROR FMC_SDRTR_CRE
1049 
1060 /* Private macro -------------------------------------------------------------*/
1076 #define __FMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)] |= FMC_BCR1_MBKEN)
1077 
1084 #define __FMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)] &= ~FMC_BCR1_MBKEN)
1085 
1100 #define __FMC_NAND_ENABLE(__INSTANCE__) ((__INSTANCE__)->PCR |= FMC_PCR_PBKEN)
1101 
1107 #define __FMC_NAND_DISABLE(__INSTANCE__) ((__INSTANCE__)->PCR &= ~FMC_PCR_PBKEN)
1108 
1128 #define __FMC_NAND_ENABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->SR |= (__INTERRUPT__))
1129 
1140 #define __FMC_NAND_DISABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->SR &= ~(__INTERRUPT__))
1141 
1154 #define __FMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__INSTANCE__)->SR &(__FLAG__)) == (__FLAG__))
1155 
1167 #define __FMC_NAND_CLEAR_FLAG(__INSTANCE__, __FLAG__) ((__INSTANCE__)->SR &= ~(__FLAG__))
1168 
1177 #define __FMC_SDRAM_ENABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->SDRTR |= (__INTERRUPT__))
1178 
1187 #define __FMC_SDRAM_DISABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->SDRTR &= ~(__INTERRUPT__))
1188 
1199 #define __FMC_SDRAM_GET_FLAG(__INSTANCE__, __FLAG__) (((__INSTANCE__)->SDSR &(__FLAG__)) == (__FLAG__))
1200 
1209 #define __FMC_SDRAM_CLEAR_FLAG(__INSTANCE__, __FLAG__) ((__INSTANCE__)->SDRTR |= (__FLAG__))
1210 
1218 /* Private functions ---------------------------------------------------------*/
1258 HAL_StatusTypeDef FMC_NAND_DeInit(FMC_NAND_TypeDef *Device, uint32_t Bank);
1268 HAL_StatusTypeDef FMC_NAND_GetECC(FMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout);
1281 HAL_StatusTypeDef FMC_SDRAM_DeInit(FMC_SDRAM_TypeDef *Device, uint32_t Bank);
1282 
1294 HAL_StatusTypeDef FMC_SDRAM_SetAutoRefreshNumber(FMC_SDRAM_TypeDef *Device, uint32_t AutoRefreshNumber);
1295 uint32_t FMC_SDRAM_GetModeStatus(FMC_SDRAM_TypeDef *Device, uint32_t Bank);
1315 #ifdef __cplusplus
1316 }
1317 #endif
1318 
1319 #endif /* __STM32F7xx_LL_FMC_H */
1320 
1321 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
FMC_SDRAM_InitTypeDef
FMC SDRAM Configuration Structure definition
Definition: stm32f7xx_ll_fmc.h:563
FMC_NAND_InitTypeDef::TARSetupTime
uint32_t TARSetupTime
Definition: stm32f7xx_ll_fmc.h:524
FMC_SDRAM_TimingTypeDef
FMC SDRAM Timing parameters structure definition.
Definition: stm32f7xx_ll_fmc.h:601
Init
napi_value Init(napi_env env, napi_value exports)
Definition: porcupine/demo/c/pvrecorder/node/pv_recorder_napi.c:197
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:40
FMC_SDRAM_CommandTypeDef::CommandMode
uint32_t CommandMode
Definition: stm32f7xx_ll_fmc.h:637
Timing
static FMC_SDRAM_TimingTypeDef Timing
Definition: stm32f769i_discovery_sdram.c:124
FMC_SDRAM_InitTypeDef::ReadBurst
uint32_t ReadBurst
Definition: stm32f7xx_ll_fmc.h:590
FMC_NORSRAM_InitTypeDef::ContinuousClock
uint32_t ContinuousClock
Definition: stm32f7xx_ll_fmc.h:442
FMC_NAND_InitTypeDef::MemoryDataWidth
uint32_t MemoryDataWidth
Definition: stm32f7xx_ll_fmc.h:511
FMC_SDRAM_InitTypeDef::MemoryDataWidth
uint32_t MemoryDataWidth
Definition: stm32f7xx_ll_fmc.h:574
FMC_SDRAM_InitTypeDef::RowBitsNumber
uint32_t RowBitsNumber
Definition: stm32f7xx_ll_fmc.h:571
FMC_NORSRAM_InitTypeDef::AsynchronousWait
uint32_t AsynchronousWait
Definition: stm32f7xx_ll_fmc.h:435
FMC_NORSRAM_InitTypeDef::DataAddressMux
uint32_t DataAddressMux
Definition: stm32f7xx_ll_fmc.h:401
FMC_SDRAM_InitTypeDef::CASLatency
uint32_t CASLatency
Definition: stm32f7xx_ll_fmc.h:580
FMC_SDRAM_TimingTypeDef::RPDelay
uint32_t RPDelay
Definition: stm32f7xx_ll_fmc.h:623
FMC_NAND_InitTypeDef::EccComputation
uint32_t EccComputation
Definition: stm32f7xx_ll_fmc.h:514
FMC_SDRAM_TimingTypeDef::ExitSelfRefreshDelay
uint32_t ExitSelfRefreshDelay
Definition: stm32f7xx_ll_fmc.h:607
FMC_NORSRAM_TimingTypeDef::AddressHoldTime
uint32_t AddressHoldTime
Definition: stm32f7xx_ll_fmc.h:467
FMC_NAND_PCC_TimingTypeDef::WaitSetupTime
uint32_t WaitSetupTime
Definition: stm32f7xx_ll_fmc.h:540
FMC_SDRAM_CommandTypeDef::AutoRefreshNumber
uint32_t AutoRefreshNumber
Definition: stm32f7xx_ll_fmc.h:643
FMC_SDRAM_WriteProtection_Disable
HAL_StatusTypeDef FMC_SDRAM_WriteProtection_Disable(FMC_SDRAM_TypeDef *Device, uint32_t Bank)
FMC_SDRAM_SetAutoRefreshNumber
HAL_StatusTypeDef FMC_SDRAM_SetAutoRefreshNumber(FMC_SDRAM_TypeDef *Device, uint32_t AutoRefreshNumber)
FMC_SDRAM_InitTypeDef::SDClockPeriod
uint32_t SDClockPeriod
Definition: stm32f7xx_ll_fmc.h:586
FMC_NORSRAM_TypeDef
#define FMC_NORSRAM_TypeDef
Definition: stm32f7xx_ll_fmc.h:383
FMC_NAND_PCC_TimingTypeDef::SetupTime
uint32_t SetupTime
Definition: stm32f7xx_ll_fmc.h:534
FMC_NORSRAM_InitTypeDef::WriteFifo
uint32_t WriteFifo
Definition: stm32f7xx_ll_fmc.h:447
FMC_NORSRAM_TimingTypeDef::CLKDivision
uint32_t CLKDivision
Definition: stm32f7xx_ll_fmc.h:483
FMC_NAND_DeInit
HAL_StatusTypeDef FMC_NAND_DeInit(FMC_NAND_TypeDef *Device, uint32_t Bank)
FMC_SDRAM_TimingTypeDef::LoadToActiveDelay
uint32_t LoadToActiveDelay
Definition: stm32f7xx_ll_fmc.h:603
FMC_NORSRAM_TimingTypeDef
FMC NORSRAM Timing parameters structure definition
Definition: stm32f7xx_ll_fmc.h:460
FMC_NORSRAM_InitTypeDef::PageSize
uint32_t PageSize
Definition: stm32f7xx_ll_fmc.h:452
FMC_SDRAM_InitTypeDef::ReadPipeDelay
uint32_t ReadPipeDelay
Definition: stm32f7xx_ll_fmc.h:594
FMC_SDRAM_Timing_Init
HAL_StatusTypeDef FMC_SDRAM_Timing_Init(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_TimingTypeDef *Timing, uint32_t Bank)
FMC_NAND_InitTypeDef::TCLRSetupTime
uint32_t TCLRSetupTime
Definition: stm32f7xx_ll_fmc.h:520
FMC_SDRAM_TimingTypeDef::RowCycleDelay
uint32_t RowCycleDelay
Definition: stm32f7xx_ll_fmc.h:615
FMC_SDRAM_GetModeStatus
uint32_t FMC_SDRAM_GetModeStatus(FMC_SDRAM_TypeDef *Device, uint32_t Bank)
FMC_NORSRAM_DeInit
HAL_StatusTypeDef FMC_NORSRAM_DeInit(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank)
FMC_SDRAM_InitTypeDef::WriteProtection
uint32_t WriteProtection
Definition: stm32f7xx_ll_fmc.h:583
FMC_SDRAM_TimingTypeDef::WriteRecoveryTime
uint32_t WriteRecoveryTime
Definition: stm32f7xx_ll_fmc.h:620
FMC_NORSRAM_InitTypeDef::WaitSignalActive
uint32_t WaitSignalActive
Definition: stm32f7xx_ll_fmc.h:420
FMC_NORSRAM_Extended_Timing_Init
HAL_StatusTypeDef FMC_NORSRAM_Extended_Timing_Init(FMC_NORSRAM_EXTENDED_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode)
FMC_NAND_AttributeSpace_Timing_Init
HAL_StatusTypeDef FMC_NAND_AttributeSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank)
FMC_NAND_PCC_TimingTypeDef::HoldSetupTime
uint32_t HoldSetupTime
Definition: stm32f7xx_ll_fmc.h:546
FMC_SDRAM_TypeDef
#define FMC_SDRAM_TypeDef
Definition: stm32f7xx_ll_fmc.h:386
FMC_NAND_TypeDef
#define FMC_NAND_TypeDef
Definition: stm32f7xx_ll_fmc.h:385
FMC_NAND_PCC_TimingTypeDef
FMC NAND Timing parameters structure definition.
Definition: stm32f7xx_ll_fmc.h:532
FMC_NORSRAM_Init
HAL_StatusTypeDef FMC_NORSRAM_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_InitTypeDef *Init)
Command
static FMC_SDRAM_CommandTypeDef Command
Definition: stm32f769i_discovery_sdram.c:125
FMC_NORSRAM_InitTypeDef::WaitSignalPolarity
uint32_t WaitSignalPolarity
Definition: stm32f7xx_ll_fmc.h:416
FMC_NORSRAM_InitTypeDef::MemoryType
uint32_t MemoryType
Definition: stm32f7xx_ll_fmc.h:405
FMC_SDRAM_CommandTypeDef::CommandTarget
uint32_t CommandTarget
Definition: stm32f7xx_ll_fmc.h:640
FMC_NORSRAM_TimingTypeDef::AccessMode
uint32_t AccessMode
Definition: stm32f7xx_ll_fmc.h:496
FMC_SDRAM_DeInit
HAL_StatusTypeDef FMC_SDRAM_DeInit(FMC_SDRAM_TypeDef *Device, uint32_t Bank)
FMC_NORSRAM_InitTypeDef::BurstAccessMode
uint32_t BurstAccessMode
Definition: stm32f7xx_ll_fmc.h:412
FMC_SDRAM_InitTypeDef::SDBank
uint32_t SDBank
Definition: stm32f7xx_ll_fmc.h:565
FMC_NAND_ECC_Disable
HAL_StatusTypeDef FMC_NAND_ECC_Disable(FMC_NAND_TypeDef *Device, uint32_t Bank)
FMC_SDRAM_TimingTypeDef::SelfRefreshTime
uint32_t SelfRefreshTime
Definition: stm32f7xx_ll_fmc.h:611
FMC_NAND_InitTypeDef::Waitfeature
uint32_t Waitfeature
Definition: stm32f7xx_ll_fmc.h:508
FMC_SDRAM_Init
HAL_StatusTypeDef FMC_SDRAM_Init(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_InitTypeDef *Init)
FMC_NAND_GetECC
HAL_StatusTypeDef FMC_NAND_GetECC(FMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout)
FMC_NORSRAM_WriteOperation_Disable
HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Disable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank)
FMC_SDRAM_ProgramRefreshRate
HAL_StatusTypeDef FMC_SDRAM_ProgramRefreshRate(FMC_SDRAM_TypeDef *Device, uint32_t RefreshRate)
FMC_NAND_Init
HAL_StatusTypeDef FMC_NAND_Init(FMC_NAND_TypeDef *Device, FMC_NAND_InitTypeDef *Init)
FMC_NORSRAM_InitTypeDef::WriteOperation
uint32_t WriteOperation
Definition: stm32f7xx_ll_fmc.h:425
stm32f7xx_hal_def.h
This file contains HAL common defines, enumeration, macros and structures definitions.
FMC_NORSRAM_InitTypeDef
FMC NORSRAM Configuration Structure definition.
Definition: stm32f7xx_ll_fmc.h:396
FMC_NORSRAM_Timing_Init
HAL_StatusTypeDef FMC_NORSRAM_Timing_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank)
FMC_NAND_InitTypeDef::NandBank
uint32_t NandBank
Definition: stm32f7xx_ll_fmc.h:505
FMC_NORSRAM_EXTENDED_TypeDef
#define FMC_NORSRAM_EXTENDED_TypeDef
Definition: stm32f7xx_ll_fmc.h:384
FMC_NORSRAM_InitTypeDef::WriteBurst
uint32_t WriteBurst
Definition: stm32f7xx_ll_fmc.h:439
FMC_SDRAM_CommandTypeDef
SDRAM command parameters structure definition.
Definition: stm32f7xx_ll_fmc.h:635
FMC_NAND_InitTypeDef::ECCPageSize
uint32_t ECCPageSize
Definition: stm32f7xx_ll_fmc.h:517
FMC_NORSRAM_TimingTypeDef::DataLatency
uint32_t DataLatency
Definition: stm32f7xx_ll_fmc.h:488
FMC_SDRAM_TimingTypeDef::RCDDelay
uint32_t RCDDelay
Definition: stm32f7xx_ll_fmc.h:627
FMC_NAND_ECC_Enable
HAL_StatusTypeDef FMC_NAND_ECC_Enable(FMC_NAND_TypeDef *Device, uint32_t Bank)
FMC_SDRAM_CommandTypeDef::ModeRegisterDefinition
uint32_t ModeRegisterDefinition
Definition: stm32f7xx_ll_fmc.h:646
FMC_NORSRAM_TimingTypeDef::AddressSetupTime
uint32_t AddressSetupTime
Definition: stm32f7xx_ll_fmc.h:462
FMC_NAND_PCC_TimingTypeDef::HiZSetupTime
uint32_t HiZSetupTime
Definition: stm32f7xx_ll_fmc.h:553
FMC_NAND_InitTypeDef
FMC NAND Configuration Structure definition
Definition: stm32f7xx_ll_fmc.h:503
FMC_NORSRAM_InitTypeDef::NSBank
uint32_t NSBank
Definition: stm32f7xx_ll_fmc.h:398
FMC_SDRAM_InitTypeDef::ColumnBitsNumber
uint32_t ColumnBitsNumber
Definition: stm32f7xx_ll_fmc.h:568
FMC_NORSRAM_WriteOperation_Enable
HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Enable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank)
FMC_NORSRAM_TimingTypeDef::DataSetupTime
uint32_t DataSetupTime
Definition: stm32f7xx_ll_fmc.h:472
FMC_NAND_CommonSpace_Timing_Init
HAL_StatusTypeDef FMC_NAND_CommonSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank)
FMC_NORSRAM_TimingTypeDef::BusTurnAroundDuration
uint32_t BusTurnAroundDuration
Definition: stm32f7xx_ll_fmc.h:478
FMC_NORSRAM_InitTypeDef::MemoryDataWidth
uint32_t MemoryDataWidth
Definition: stm32f7xx_ll_fmc.h:409
FMC_NORSRAM_InitTypeDef::WaitSignal
uint32_t WaitSignal
Definition: stm32f7xx_ll_fmc.h:428
FMC_SDRAM_InitTypeDef::InternalBankNumber
uint32_t InternalBankNumber
Definition: stm32f7xx_ll_fmc.h:577
FMC_SDRAM_WriteProtection_Enable
HAL_StatusTypeDef FMC_SDRAM_WriteProtection_Enable(FMC_SDRAM_TypeDef *Device, uint32_t Bank)
FMC_SDRAM_SendCommand
HAL_StatusTypeDef FMC_SDRAM_SendCommand(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_CommandTypeDef *Command, uint32_t Timeout)
FMC_NORSRAM_InitTypeDef::ExtendedMode
uint32_t ExtendedMode
Definition: stm32f7xx_ll_fmc.h:432


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:53