F29H85x-SDK  1.02.00.00
 
emif.h
Go to the documentation of this file.
1//###########################################################################
2//
3// FILE: emif.h
4//
5// TITLE: C29x EMIF driver.
6//
7//###########################################################################
8// //
9// Copyright: Copyright (C) Texas Instruments Incorporated
10// All rights reserved not granted herein.
11//
12// Redistribution and use in source and binary forms, with or without
13// modification, are permitted provided that the following conditions
14// are met:
15//
16// Redistributions of source code must retain the above copyright
17// notice, this list of conditions and the following disclaimer.
18//
19// Redistributions in binary form must reproduce the above copyright
20// notice, this list of conditions and the following disclaimer in the
21// documentation and/or other materials provided with the
22// distribution.
23//
24// Neither the name of Texas Instruments Incorporated nor the names of
25// its contributors may be used to endorse or promote products derived
26// from this software without specific prior written permission.
27//
28// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39//
40
41//###########################################################################
42
43#ifndef EMIF_H
44#define EMIF_H
45
46//*****************************************************************************
47//
48// If building with a C++ compiler, make all of the definitions in this header
49// have a C binding.
50//
51//*****************************************************************************
52#ifdef __cplusplus
53extern "C"
54{
55#endif
56
57//*****************************************************************************
58//
61//
62//*****************************************************************************
63
64#include <stdbool.h>
65#include <stdint.h>
66#include "inc/hw_emif.h"
67#include "inc/hw_memmap.h"
68#include "inc/hw_types.h"
69#include "cpu.h"
70#include "debug.h"
71
72//*****************************************************************************
73//
74// Defines for the API.
75//
76//*****************************************************************************
77
78//*****************************************************************************
79//
80// Define to mask out the bits in the ASYNC_CSx_CR register that
81// aren't associated with async configuration.
82//
83//*****************************************************************************
84#define EMIF_ASYNC_CS_CR_MASK ((uint32_t)EMIF_ASYNC_CS2_CR_R_HOLD_M | \
85 (uint32_t)EMIF_ASYNC_CS2_CR_R_STROBE_M | \
86 (uint32_t)EMIF_ASYNC_CS2_CR_R_SETUP_M | \
87 (uint32_t)EMIF_ASYNC_CS2_CR_W_HOLD_M | \
88 (uint32_t)EMIF_ASYNC_CS2_CR_W_STROBE_M | \
89 (uint32_t)EMIF_ASYNC_CS2_CR_W_SETUP_M | \
90 (uint32_t)EMIF_ASYNC_CS2_CR_TA_M)
91
92//*****************************************************************************
93//
94// Define to mask out the bits in the INT_MSK register that aren't associated
95// with interrupts.
96//
97//*****************************************************************************
98#define EMIF_ASYNC_INT_MASK ((uint16_t)EMIF_INT_MSK_SET_AT_MASK_SET | \
99 (uint16_t)EMIF_INT_MSK_SET_LT_MASK_SET | \
100 (uint16_t)EMIF_INT_MSK_SET_WR_MASK_SET_M)
101
102//*****************************************************************************
103//
104// Defines to specify interrupt sources to EMIF_enableAsyncInterrupt() and
105// EMIF_disableAsyncInterrupt().Three interrupts are available for asynchronous
106// memory interface: Masked Asyncronous Timeout(AT) to indicate EMxWAIT signal
107// remains active even after maximum wait cycles are reached. Masked Line Trap
108// (LT) to indicate illegal memory access or invalid cache line size.
109// Masked Wait Rise(WR) to indicate rising edge on EMxWAIT is detected.
110//
111//*****************************************************************************
114#define EMIF_ASYNC_INT_AT EMIF_INT_MSK_SET_AT_MASK_SET
115
118#define EMIF_ASYNC_INT_LT EMIF_INT_MSK_SET_LT_MASK_SET
119
122#define EMIF_ASYNC_INT_WR EMIF_INT_MSK_SET_WR_MASK_SET_M
123
124//*****************************************************************************
125//
126// Define for key for EMIF1MSEL register that enables the register write.
127//
128//*****************************************************************************
129#define EMIF_MSEL_KEY 0x93A5CE70U
130
131//*****************************************************************************
132//
133// Define to mask out the bits in the SDRAM_CR register that aren't
134// associated with SDRAM configuration parameters.
135//
136//*****************************************************************************
137#define EMIF_SYNC_SDRAM_CR_MASK ((uint32_t)EMIF_SDRAM_CR_PAGESIGE_M | \
138 (uint32_t)EMIF_SDRAM_CR_IBANK_M | \
139 (uint32_t)EMIF_SDRAM_CR_BIT_11_9_LOCK | \
140 (uint32_t)EMIF_SDRAM_CR_CL_M | \
141 (uint32_t)EMIF_SDRAM_CR_NM | \
142 (uint32_t)EMIF_SDRAM_CR_SR)
143
144//*****************************************************************************
145//
146// Define to mask out the bits in the SDRAM_TR register that aren't
147// associated with SDRAM timings parameters.
148//
149//*****************************************************************************
150#define EMIF_SYNC_SDRAM_TR_MASK ((uint32_t)EMIF_SDRAM_TR_T_RRD_M | \
151 (uint32_t)EMIF_SDRAM_TR_T_RC_M | \
152 (uint32_t)EMIF_SDRAM_TR_T_RAS_M | \
153 (uint32_t)EMIF_SDRAM_TR_T_WR_M | \
154 (uint32_t)EMIF_SDRAM_TR_T_RCD_M | \
155 (uint32_t)EMIF_SDRAM_TR_T_RP_M | \
156 (uint32_t)EMIF_SDRAM_TR_T_RFC_M)
157
158//*****************************************************************************
159//
167//
168//*****************************************************************************
169typedef enum
170{
171 EMIF_ASYNC_CS2_OFFSET = EMIF_O_ASYNC_CS2_CR,
172 EMIF_ASYNC_CS3_OFFSET = EMIF_O_ASYNC_CS3_CR,
173 EMIF_ASYNC_CS4_OFFSET = EMIF_O_ASYNC_CS4_CR
175
176//*****************************************************************************
177//
180//
181//*****************************************************************************
188
189//*****************************************************************************
190//
192//
193//*****************************************************************************
194typedef enum
195{
197 EMIF_ASYNC_NORMAL_MODE = 0x00000000U
199
200//*****************************************************************************
201//
204//
205//*****************************************************************************
211
212//*****************************************************************************
213//
216//
217//*****************************************************************************
218typedef enum
219{
221 EMIF_SYNC_NARROW_MODE_FALSE = 0x00000000U
223
224//*****************************************************************************
225//
228//
229//*****************************************************************************
230typedef enum
231{
232 EMIF_SYNC_BANK_1 = 0x00000000U,
233 EMIF_SYNC_BANK_2 = 0x00000010U,
234 EMIF_SYNC_BANK_4 = 0x00000020U
236
237//*****************************************************************************
238//
241//
242//*****************************************************************************
243typedef enum
244{
245 EMIF_SYNC_CAS_LAT_2 = 0x00000500U,
246 EMIF_SYNC_CAS_LAT_3 = 0x00000700U
248
249//*****************************************************************************
250//
253//
254//*****************************************************************************
262
263//*****************************************************************************
264//
267//
268//*****************************************************************************
269typedef struct
270{
271 uint32_t rSetup;
272 uint32_t rStrobe;
273 uint32_t rHold;
274 uint32_t wSetup;
275 uint32_t wStrobe;
276 uint32_t wHold;
277 uint32_t turnArnd;
279
280//*****************************************************************************
281//
284//
285//*****************************************************************************
293
294//*****************************************************************************
295//
298//
299//*****************************************************************************
300typedef struct
301{
302 uint32_t tRfc;
303 uint32_t tRp;
304 uint32_t tRcd;
305 uint32_t tWr;
306 uint32_t tRas;
307 uint32_t tRc;
308 uint32_t tRrd;
310
311//*****************************************************************************
312//
313// Prototypes for the APIs.
314//
315//*****************************************************************************
316//*****************************************************************************
317//
327//
328//*****************************************************************************
329#ifdef DEBUG
330static inline bool
331EMIF_isBaseValid(uint32_t base)
332{
333 return(
334 (base == EMIF1_BASE)
335 );
336}
337#endif
338
339//*****************************************************************************
340//
341// Prototypes for Asynchronous Memory Interface
342//
343//*****************************************************************************
344//*****************************************************************************
345//
363//
364//*****************************************************************************
365static inline void
367 EMIF_AsyncMode mode)
368{
369 //
370 // Check the arguments.
371 //
372 ASSERT(EMIF_isBaseValid(base));
373
374 //
375 // Sets the async mode of operation.
376 //
377 HWREG(base + (uint32_t)offset) = (HWREG(base + (uint32_t)offset)
378 & ~((uint32_t)EMIF_ASYNC_CS2_CR_SS))
379 | (uint32_t)mode;
380}
381
382//*****************************************************************************
383//
397//
398//*****************************************************************************
399static inline void
401{
402 //
403 // Check the arguments.
404 //
405 ASSERT(EMIF_isBaseValid(base));
406
407 //
408 // Sets the bit that enables extended wait mode.
409 //
410 HWREG(base + (uint32_t)offset) = HWREG(base + (uint32_t)offset) |
411 EMIF_ASYNC_CS2_CR_EW;
412}
413
414//*****************************************************************************
415//
428//
429//*****************************************************************************
430static inline void
432 {
433 //
434 // Check the arguments.
435 //
436 ASSERT(EMIF_isBaseValid(base));
437
438 //
439 // Sets the bit that disables extended wait mode.
440 //
441 HWREG(base + (uint32_t)offset) = HWREG(base + (uint32_t)offset) &
442 ~((uint32_t)EMIF_ASYNC_CS2_CR_EW);
443}
444
445//*****************************************************************************
446//
458//
459//*****************************************************************************
460static inline void
462{
463 //
464 // Check the arguments.
465 //
466 ASSERT(EMIF_isBaseValid(base));
467
468 //
469 // Sets the polarity for async extended wait mode.
470 //
471 HWREG(base + EMIF_O_ASYNC_WCCR) = (HWREG(base + EMIF_O_ASYNC_WCCR)
472 & ~((uint32_t)EMIF_ASYNC_WCCR_WP0))
473 | (uint32_t)polarity;
474}
475
476//*****************************************************************************
477//
488//
489//*****************************************************************************
490static inline void
491EMIF_setAsyncMaximumWaitCycles(uint32_t base, uint16_t value)
492{
493 //
494 // Check the arguments.
495 //
496 ASSERT(EMIF_isBaseValid(base));
497 ASSERT(value <= (EMIF_ASYNC_WCCR_MAX_EXT_WAIT_M));
498
499 //
500 // Sets the bit that enables extended wait mode.
501 //
502 HWREGH(base + EMIF_O_ASYNC_WCCR) = (HWREGH(base + EMIF_O_ASYNC_WCCR)
503 & ~((uint16_t)EMIF_ASYNC_WCCR_MAX_EXT_WAIT_M))
504 | value;
505}
506
507//*****************************************************************************
508//
523//
524//*****************************************************************************
525static inline void
527 const EMIF_AsyncTimingParams *tParam)
528{
529 uint32_t temp;
530 //
531 // Check the arguments.
532 //
533 ASSERT(EMIF_isBaseValid(base));
534
535 //
536 // Sets the async memory timing parameters.
537 //
538 temp = (tParam->turnArnd << EMIF_ASYNC_CS2_CR_TA_S) |
539 (tParam->rHold << EMIF_ASYNC_CS2_CR_R_HOLD_S) |
540 (tParam->rStrobe << EMIF_ASYNC_CS2_CR_R_STROBE_S) |
541 (tParam->rSetup << EMIF_ASYNC_CS2_CR_R_SETUP_S) |
542 (tParam->wHold << EMIF_ASYNC_CS2_CR_W_HOLD_S) |
543 (tParam->wStrobe << EMIF_ASYNC_CS2_CR_W_STROBE_S) |
544 (tParam->wSetup << EMIF_ASYNC_CS2_CR_W_SETUP_S);
545
546 HWREG(base + (uint32_t)offset) = (HWREG(base + (uint32_t)offset) &
547 ~EMIF_ASYNC_CS_CR_MASK) | temp;
548}
549
550//*****************************************************************************
551//
568//
569//*****************************************************************************
570static inline void
573{
574 //
575 // Check the arguments.
576 //
577 ASSERT(EMIF_isBaseValid(base));
578
579 //
580 // Sets the async memory data bus width.
581 //
582 HWREGH(base + (uint32_t)offset) = (HWREGH(base + (uint32_t)offset)
583 & ~((uint16_t)EMIF_ASYNC_CS2_CR_ASIZE_M))
584 | (uint32_t)width;
585}
586
587//*****************************************************************************
588//
589// Prototypes for Interrupt Handling
590//
591//*****************************************************************************
592//*****************************************************************************
593//
606//
607//*****************************************************************************
608static inline void
609EMIF_enableAsyncInterrupt(uint32_t base, uint16_t intFlags)
610{
611 //
612 // Check the arguments.
613 //
614 ASSERT(EMIF_isBaseValid(base));
615 ASSERT(intFlags <= EMIF_ASYNC_INT_MASK);
616
617 //
618 // Sets the bits that enables async memory interrupts.
619 //
620 HWREGH(base + EMIF_O_INT_MSK_SET) = intFlags;
621}
622
623//*****************************************************************************
624//
637//
638//*****************************************************************************
639static inline void
640EMIF_disableAsyncInterrupt(uint32_t base, uint16_t intFlags)
641{
642 //
643 // Check the arguments.
644 //
645 ASSERT(EMIF_isBaseValid(base));
646 ASSERT(intFlags <= EMIF_ASYNC_INT_MASK);
647
648 //
649 // Sets the bits that disables async memory interrupts.
650 //
651 HWREGH(base + EMIF_O_INT_MSK_CLR) = intFlags;
652
653}
654
655//*****************************************************************************
656//
664//
665//*****************************************************************************
666static inline uint16_t
668{
669 //
670 // Check the arguments.
671 //
672 ASSERT(EMIF_isBaseValid(base));
673
674 //
675 // Gets the async memory interrupt status.
676 //
677 return(HWREGH(base + EMIF_O_INT_MSK) & EMIF_ASYNC_INT_MASK);
678}
679
680//*****************************************************************************
681//
694//
695//*****************************************************************************
696static inline void
697EMIF_clearAsyncInterruptStatus(uint32_t base, uint16_t intFlags)
698{
699 //
700 // Check the arguments.
701 //
702 ASSERT(EMIF_isBaseValid(base));
703 ASSERT(intFlags <= EMIF_ASYNC_INT_MASK);
704
705 //
706 // Sets the bit that clears desired async memory interrupts.
707 //
708 HWREGH(base + EMIF_O_INT_MSK) = intFlags;
709}
710
711//*****************************************************************************
712//
713// Prototypes for Synchronous Memory Interface
714//
715//*****************************************************************************
716//*****************************************************************************
717//
728//
729//*****************************************************************************
730static inline void
732{
733 uint32_t temp;
734 //
735 // Check the arguments.
736 //
737 ASSERT(EMIF_isBaseValid(base));
738
739 //
740 // Sets sync memory timing parameters.
741 //
742 temp = ((tParam->tRrd << EMIF_SDRAM_TR_T_RRD_S)
743 & EMIF_SDRAM_TR_T_RRD_M)
744 | ((tParam->tRc << EMIF_SDRAM_TR_T_RC_S)
745 & EMIF_SDRAM_TR_T_RC_M)
746 | ((tParam->tRas << EMIF_SDRAM_TR_T_RAS_S)
747 & EMIF_SDRAM_TR_T_RAS_M)
748 | ((tParam->tWr << EMIF_SDRAM_TR_T_WR_S)
749 & EMIF_SDRAM_TR_T_WR_M)
750 | ((tParam->tRcd << EMIF_SDRAM_TR_T_RCD_S)
751 & EMIF_SDRAM_TR_T_RCD_M)
752 | ((tParam->tRp << EMIF_SDRAM_TR_T_RP_S)
753 & EMIF_SDRAM_TR_T_RP_M)
754 | ((tParam->tRfc << EMIF_SDRAM_TR_T_RFC_S)
755 & EMIF_SDRAM_TR_T_RFC_M);
756
757 HWREG(base + EMIF_O_SDRAM_TR) = (HWREG(base + EMIF_O_SDRAM_TR) &
758 ~EMIF_SYNC_SDRAM_TR_MASK) | temp;
759}
760
761//*****************************************************************************
762//
774//
775//*****************************************************************************
776static inline void
777EMIF_setSyncSelfRefreshExitTmng(uint32_t base, uint16_t tXs)
778{
779 //
780 // Check the arguments.
781 //
782 ASSERT(EMIF_isBaseValid(base));
783 ASSERT(tXs <= EMIF_SDR_EXT_TMNG_T_XS_M);
784
785 //
786 // Sets the self refresh exit timing for sync memory.
787 //
788 HWREGH(base + EMIF_O_SDR_EXT_TMNG) = (HWREGH(base + EMIF_O_SDR_EXT_TMNG)
789 & ~((uint16_t)EMIF_SDR_EXT_TMNG_T_XS_M))
790 | tXs;
791}
792
793//*****************************************************************************
794//
806//
807//*****************************************************************************
808static inline void
809EMIF_setSyncRefreshRate(uint32_t base, uint16_t refRate)
810{
811 //
812 // Check the arguments.
813 //
814 ASSERT(EMIF_isBaseValid(base));
815 ASSERT(refRate <= EMIF_SDRAM_RCR_REFRESH_RATE_M);
816
817 //
818 // Sets the sync memory refresh rate.
819 //
820 HWREGH(base + EMIF_O_SDRAM_RCR) = (HWREGH(base + EMIF_O_SDRAM_RCR)
821 & (~(uint16_t)EMIF_SDRAM_RCR_REFRESH_RATE_M))
822 | refRate;
823}
824
825//*****************************************************************************
826//
837//
838//*****************************************************************************
839static inline void
840EMIF_setSyncMemoryConfig(uint32_t base, const EMIF_SyncConfig *config)
841{
842 uint32_t temp;
843 //
844 // Check the arguments.
845 //
846 ASSERT(EMIF_isBaseValid(base));
847
848 //
849 // Sets the sync memory configuration bits.
850 //
851 temp = ((uint32_t)config->casLatency | (uint32_t)config->iBank |
852 (uint32_t)config->narrowMode | (uint32_t)config->pageSize);
853
854 HWREG(base + EMIF_O_SDRAM_CR) = (HWREG(base + EMIF_O_SDRAM_CR) &
855 ~EMIF_SYNC_SDRAM_CR_MASK) | temp;
856}
857
858//*****************************************************************************
859//
860// Prototypes for EMIF Low Power Modes
861//
862//*****************************************************************************
863//*****************************************************************************
864//
872//
873//*****************************************************************************
874static inline void
876{
877 //
878 // Check the arguments.
879 //
880 ASSERT(EMIF_isBaseValid(base));
881
882 //
883 // Sets the bits that enables sync memory self refresh mode.
884 //
885 HWREG(base + EMIF_O_SDRAM_CR) |= EMIF_SDRAM_CR_SR;
886}
887
888//*****************************************************************************
889//
897//
898//*****************************************************************************
899static inline void
901{
902 //
903 // Check the arguments.
904 //
905 ASSERT(EMIF_isBaseValid(base));
906
907 //
908 // Sets the bits that disables sync memory self refresh mode.
909 //
910 HWREG(base + EMIF_O_SDRAM_CR) &= ~((uint32_t)EMIF_SDRAM_CR_SR);
911}
912
913//*****************************************************************************
914//
923//
924//*****************************************************************************
925static inline void
927{
928 //
929 // Check the arguments.
930 //
931 ASSERT(EMIF_isBaseValid(base));
932
933 //
934 // Sets the bits that enables sync memory power down mode.
935 //
936 HWREG(base + EMIF_O_SDRAM_CR) |= EMIF_SDRAM_CR_PD;
937}
938
939//*****************************************************************************
940//
949//
950//*****************************************************************************
951static inline void
953{
954 //
955 // Check the arguments.
956 //
957 ASSERT(EMIF_isBaseValid(base));
958
959 //
960 // Sets the bits that disables sync memory power down mode.
961 //
962 HWREG(base + EMIF_O_SDRAM_CR) &= ~((uint32_t)EMIF_SDRAM_CR_PD);
963}
964
965//*****************************************************************************
966//
975//
976//*****************************************************************************
977static inline void
979{
980 //
981 // Check the arguments.
982 //
983 ASSERT(EMIF_isBaseValid(base));
984
985 //
986 // Sets the bits that enables refresh in power down mode.
987 //
988 HWREG(base + EMIF_O_SDRAM_CR) |= EMIF_SDRAM_CR_PDWR;
989}
990
991//*****************************************************************************
992//
1001//
1002//*****************************************************************************
1003static inline void
1005{
1006 //
1007 // Check the arguments.
1008 //
1009 ASSERT(EMIF_isBaseValid(base));
1010
1011 //
1012 // Sets the bits that disables refresh in power down mode.
1013 //
1014 HWREG(base + EMIF_O_SDRAM_CR) &= ~((uint32_t)EMIF_SDRAM_CR_PDWR);
1015}
1016
1017//*****************************************************************************
1018//
1027//
1028//*****************************************************************************
1029static inline uint32_t
1031{
1032 //
1033 // Check the arguments.
1034 //
1035 ASSERT(EMIF_isBaseValid(base));
1036
1037 //
1038 // Gets total accesses to sync memory.
1039 //
1040 return(HWREG(base + EMIF_O_TOTAL_SDRAM_AR));
1041}
1042
1043//*****************************************************************************
1044//
1053//
1054//*****************************************************************************
1055static inline uint32_t
1057{
1058 //
1059 // Check the arguments.
1060 //
1061 ASSERT(EMIF_isBaseValid(base));
1062
1063 //
1064 // Gets total accesses to sync memory which requires activate command.
1065 //
1066 return(HWREG(base + EMIF_O_TOTAL_SDRAM_ACTR));
1067}
1068
1069//*****************************************************************************
1070//
1071// Close the Doxygen group.
1073//
1074//*****************************************************************************
1075
1076//*****************************************************************************
1077//
1078// Mark the end of the C bindings section for C++ compilers.
1079//
1080//*****************************************************************************
1081#ifdef __cplusplus
1082}
1083#endif
1084
1085#endif // EMIF_H
static void EMIF_disableSyncRefreshInPowerDown(uint32_t base)
Definition emif.h:1004
static void EMIF_disableSyncSelfRefresh(uint32_t base)
Definition emif.h:900
#define EMIF_ASYNC_INT_MASK
Definition emif.h:98
static void EMIF_enableAsyncExtendedWait(uint32_t base, EMIF_AsyncCSOffset offset)
Definition emif.h:400
EMIF_SyncCASLatency
Definition emif.h:244
static void EMIF_disableSyncPowerDown(uint32_t base)
Definition emif.h:952
static void EMIF_setAsyncTimingParams(uint32_t base, EMIF_AsyncCSOffset offset, const EMIF_AsyncTimingParams *tParam)
Definition emif.h:526
EMIF_AsyncMode
Values that can be passed to EMIF_setAsyncMode() as the mode parameter.
Definition emif.h:195
static uint32_t EMIF_getSyncTotalActivateAccesses(uint32_t base)
Definition emif.h:1056
static void EMIF_enableSyncPowerDown(uint32_t base)
Definition emif.h:926
EMIF_SyncBank
Definition emif.h:231
static void EMIF_setAsyncDataBusWidth(uint32_t base, EMIF_AsyncCSOffset offset, EMIF_AsyncDataWidth width)
Definition emif.h:571
static void EMIF_setSyncSelfRefreshExitTmng(uint32_t base, uint16_t tXs)
Definition emif.h:777
static void EMIF_setSyncRefreshRate(uint32_t base, uint16_t refRate)
Definition emif.h:809
static void EMIF_setSyncMemoryConfig(uint32_t base, const EMIF_SyncConfig *config)
Definition emif.h:840
static void EMIF_setAsyncMaximumWaitCycles(uint32_t base, uint16_t value)
Definition emif.h:491
static void EMIF_disableAsyncExtendedWait(uint32_t base, EMIF_AsyncCSOffset offset)
Definition emif.h:431
static void EMIF_setAsyncMode(uint32_t base, EMIF_AsyncCSOffset offset, EMIF_AsyncMode mode)
Definition emif.h:366
EMIF_SyncNarrowMode
Definition emif.h:219
static void EMIF_disableAsyncInterrupt(uint32_t base, uint16_t intFlags)
Definition emif.h:640
EMIF_SyncPageSize
Definition emif.h:256
static void EMIF_setSyncTimingParams(uint32_t base, const EMIF_SyncTimingParams *tParam)
Definition emif.h:731
static void EMIF_clearAsyncInterruptStatus(uint32_t base, uint16_t intFlags)
Definition emif.h:697
EMIF_AsyncDataWidth
Definition emif.h:183
static void EMIF_setAsyncWaitPolarity(uint32_t base, EMIF_AsyncWaitPolarity polarity)
Definition emif.h:461
static uint32_t EMIF_getSyncTotalAccesses(uint32_t base)
Definition emif.h:1030
static bool EMIF_isBaseValid(uint32_t base)
Definition emif.h:331
EMIF_AsyncWaitPolarity
Definition emif.h:207
static void EMIF_enableSyncSelfRefresh(uint32_t base)
Definition emif.h:875
static uint16_t EMIF_getAsyncInterruptStatus(uint32_t base)
Definition emif.h:667
static void EMIF_enableSyncRefreshInPowerDown(uint32_t base)
Definition emif.h:978
EMIF_AsyncCSOffset
Definition emif.h:170
static void EMIF_enableAsyncInterrupt(uint32_t base, uint16_t intFlags)
Definition emif.h:609
@ EMIF_SYNC_CAS_LAT_2
SDRAM with CAS Latency 2.
Definition emif.h:245
@ EMIF_SYNC_CAS_LAT_3
SDRAM with CAS Latency 3.
Definition emif.h:246
@ EMIF_ASYNC_STROBE_MODE
Enables ASRAM/FLASH strobe mode.
Definition emif.h:196
@ EMIF_ASYNC_NORMAL_MODE
Disables ASRAM/FLASH strobe mode.
Definition emif.h:197
@ EMIF_SYNC_BANK_1
1 Bank SDRAM device
Definition emif.h:232
@ EMIF_SYNC_BANK_2
2 Bank SDRAM device
Definition emif.h:233
@ EMIF_SYNC_BANK_4
4 Bank SDRAM device
Definition emif.h:234
@ EMIF_SYNC_NARROW_MODE_TRUE
MemBusWidth=SystemBusWidth/2.
Definition emif.h:220
@ EMIF_SYNC_NARROW_MODE_FALSE
MemBusWidth=SystemBusWidth.
Definition emif.h:221
@ EMIF_SYNC_COLUMN_WIDTH_11
2048-word pages in SDRAM
Definition emif.h:260
@ EMIF_SYNC_COLUMN_WIDTH_9
512-word pages in SDRAM
Definition emif.h:258
@ EMIF_SYNC_COLUMN_WIDTH_10
1024-word pages in SDRAM
Definition emif.h:259
@ EMIF_SYNC_COLUMN_WIDTH_8
256-word pages in SDRAM
Definition emif.h:257
@ EMIF_ASYNC_DATA_WIDTH_8
ASRAM/FLASH with 8 bit data bus.
Definition emif.h:184
@ EMIF_ASYNC_DATA_WIDTH_16
ASRAM/FLASH with 16 bit data bus.
Definition emif.h:185
@ EMIF_ASYNC_DATA_WIDTH_32
ASRAM/FLASH with 32 bit data bus.
Definition emif.h:186
@ EMIF_ASYNC_WAIT_POLARITY_HIGH
EMxWAIT pin polarity is high.
Definition emif.h:209
@ EMIF_ASYNC_WAIT_POLARITY_LOW
EMxWAIT pin polarity is low.
Definition emif.h:208
@ EMIF_ASYNC_CS3_OFFSET
Async chip select 3 offset.
Definition emif.h:172
@ EMIF_ASYNC_CS4_OFFSET
Async chip select 4 offset.
Definition emif.h:173
@ EMIF_ASYNC_CS2_OFFSET
Async chip select 2 offset.
Definition emif.h:171
Definition emif.h:270
uint32_t turnArnd
TurnAround Cycles.
Definition emif.h:277
uint32_t wStrobe
Write Strobe Cycles.
Definition emif.h:275
uint32_t rHold
Read Hold Cycles.
Definition emif.h:273
uint32_t rSetup
Read Setup Cycles.
Definition emif.h:271
uint32_t wHold
Write Hold Cycles.
Definition emif.h:276
uint32_t rStrobe
Read Strobe Cycles.
Definition emif.h:272
uint32_t wSetup
Write Setup Cycles.
Definition emif.h:274
Definition emif.h:287
EMIF_SyncBank iBank
Banks available in SDRAM device.
Definition emif.h:289
EMIF_SyncNarrowMode narrowMode
Read Setup Cycles.
Definition emif.h:288
EMIF_SyncCASLatency casLatency
CAS Latency for SDRAM device.
Definition emif.h:290
EMIF_SyncPageSize pageSize
Pagesize of SDRAM device.
Definition emif.h:291
Definition emif.h:301
uint32_t tRc
Read cycle time.
Definition emif.h:307
uint32_t tRfc
Auto refresh time.
Definition emif.h:302
uint32_t tRcd
RAS to CAS delay.
Definition emif.h:304
uint32_t tRp
Row precharge time.
Definition emif.h:303
uint32_t tRas
Row active time.
Definition emif.h:306
uint32_t tRrd
Row active to row active delay.
Definition emif.h:308
uint32_t tWr
Write recovery time.
Definition emif.h:305