RTEMS 6.1-rc2
Loading...
Searching...
No Matches
fsl_semc.h
1/*
2 * Copyright 2017-2022 NXP
3 * All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7#ifndef _FSL_SEMC_H_
8#define _FSL_SEMC_H_
9
10#include "fsl_common.h"
11
17/*******************************************************************************
18 * Definitions
19 ******************************************************************************/
20
24#define FSL_SEMC_DRIVER_VERSION (MAKE_VERSION(2, 4, 3))
28enum
29{
43};
44
46typedef enum _semc_mem_type
47{
54
57{
61
63typedef enum _semc_sdram_cs
64{
70
72typedef enum _semc_sram_cs
73{
74#if defined(FSL_FEATURE_SEMC_SUPPORT_SRAM_COUNT) && (FSL_FEATURE_SEMC_SUPPORT_SRAM_COUNT == 0x04U)
75 kSEMC_SRAM_CS0 = 0,
76 kSEMC_SRAM_CS1,
77 kSEMC_SRAM_CS2,
78 kSEMC_SRAM_CS3
79#else
81#endif /* FSL_FEATURE_SEMC_SUPPORT_SRAM_COUNT */
83
86{
90
93{
94 kSEMC_IPCmdDoneInterrupt = SEMC_INTEN_IPCMDDONEEN_MASK,
95 kSEMC_IPCmdErrInterrupt = SEMC_INTEN_IPCMDERREN_MASK,
96 kSEMC_AXICmdErrInterrupt = SEMC_INTEN_AXICMDERREN_MASK,
97 kSEMC_AXIBusErrInterrupt = SEMC_INTEN_AXIBUSERREN_MASK
99
102{
108
111{
116
119{
124
127{
132#if defined(FSL_FEATURE_SEMC_SDRAM_SUPPORT_COLUMN_ADDRESS_8BIT) && (FSL_FEATURE_SEMC_SDRAM_SUPPORT_COLUMN_ADDRESS_8BIT)
133 kSEMC_SdramColunm_8bit,
134#endif /* FSL_FEATURE_SEMC_SDRAM_SUPPORT_COLUMN_ADDRESS_8BIT */
136
139{
142#if defined(FSL_FEATURE_SEMC_ERRATA_050577) && (FSL_FEATURE_SEMC_ERRATA_050577 == 0x01U)
144#else
149#endif /* FSL_FEATURE_SEMC_ERRATA_050577 */
151
154{
164
167{
176
179{
192
195{
204
207{
220
223{
232
234typedef enum _semc_iomux_pin
235{
236 kSEMC_MUXA8 = SEMC_IOCR_MUX_A8_SHIFT,
237 kSEMC_MUXCSX0 = SEMC_IOCR_MUX_CSX0_SHIFT,
238 kSEMC_MUXCSX1 = SEMC_IOCR_MUX_CSX1_SHIFT,
239 kSEMC_MUXCSX2 = SEMC_IOCR_MUX_CSX2_SHIFT,
240 kSEMC_MUXCSX3 = SEMC_IOCR_MUX_CSX3_SHIFT,
241 kSEMC_MUXRDY = SEMC_IOCR_MUX_RDY_SHIFT
243
246{
248 kSEMC_NORA27_MUXCSX3 = SEMC_IOCR_MUX_CSX3_SHIFT,
249 kSEMC_NORA27_MUXRDY = SEMC_IOCR_MUX_RDY_SHIFT
251
253typedef enum _semc_port_size
254{
257#if defined(FSL_FEATURE_SEMC_SUPPORT_SDRAM_PS_BITWIDTH) && (FSL_FEATURE_SEMC_SUPPORT_SDRAM_PS_BITWIDTH == 0x02U)
258 kSEMC_PortSize32Bit
259#endif /* FSL_FEATURE_SEMC_SUPPORT_SDRAM_PS_BITWIDTH */
261
263typedef enum _semc_addr_mode
264{
269
271typedef enum _semc_dqs_mode
272{
276
279{
283
285typedef enum _semc_sync_mode
286{
290
293{
297
300{
304
307{
315
318{
330
333{
341
344{
348
351{
357
360{
370
383typedef struct _semc_sdram_config
384{
386 uint32_t address;
387 uint32_t memsize_kbytes;
396 uint8_t tCkeOff_Ns;
400 uint8_t tAct2Act_Ns;
406#if defined(FSL_FEATURE_SEMC_HAS_DELAY_CHAIN_CONTROL) && (FSL_FEATURE_SEMC_HAS_DELAY_CHAIN_CONTROL)
407 uint8_t delayChain;
409#endif /* FSL_FEATURE_SEMC_HAS_DELAY_CHAIN_CONTROL */
411
414{
415 uint8_t tCeSetup_Ns;
416 uint8_t tCeHold_Ns;
418 uint8_t tWeLow_Ns;
419 uint8_t tWeHigh_Ns;
420 uint8_t tReLow_Ns;
421 uint8_t tReHigh_Ns;
429
431typedef struct _semc_nand_config
432{
434 uint32_t axiAddress;
436 uint32_t ipgAddress;
446
448typedef struct _semc_nor_config
449{
452 uint32_t address;
453 uint32_t memsize_kbytes;
461 uint8_t tCeSetup_Ns;
462 uint8_t tCeHold_Ns;
465 uint8_t tAddrHold_Ns;
466 uint8_t tWeLow_Ns;
467 uint8_t tWeHigh_Ns;
468 uint8_t tReLow_Ns;
469 uint8_t tReHigh_Ns;
472#if defined(FSL_FEATURE_SEMC_HAS_NOR_WDS_TIME) && (FSL_FEATURE_SEMC_HAS_NOR_WDS_TIME)
473 uint8_t tWriteSetup_Ns;
474#endif
475#if defined(FSL_FEATURE_SEMC_HAS_NOR_WDH_TIME) && (FSL_FEATURE_SEMC_HAS_NOR_WDH_TIME)
476 uint8_t tWriteHold_Ns;
477#endif
478#if defined(FSL_FEATURE_SEMC_HAS_NOR_LC_TIME) && (FSL_FEATURE_SEMC_HAS_NOR_LC_TIME)
479 uint8_t latencyCount;
480#endif
481#if defined(FSL_FEATURE_SEMC_HAS_NOR_RD_TIME) && (FSL_FEATURE_SEMC_HAS_NOR_RD_TIME)
482 uint8_t readCycle;
483#endif
484#if defined(FSL_FEATURE_SEMC_HAS_DELAY_CHAIN_CONTROL) && (FSL_FEATURE_SEMC_HAS_DELAY_CHAIN_CONTROL)
485 uint8_t delayChain;
487#endif /* FSL_FEATURE_SEMC_HAS_DELAY_CHAIN_CONTROL */
489
491typedef struct _semc_sram_config
492{
495 uint32_t address;
496 uint32_t memsize_kbytes;
502#if defined(SEMC_SRAMCR4_SYNCEN_MASK) && (SEMC_SRAMCR4_SYNCEN_MASK)
503 semc_sync_mode_t syncMode;
504#endif /* SEMC_SRAMCR4_SYNCEN_MASK */
505#if defined(SEMC_SRAMCR0_WAITEN_MASK) && (SEMC_SRAMCR0_WAITEN_MASK)
506 bool waitEnable;
507#endif /* SEMC_SRAMCR0_WAITEN_MASK */
508#if defined(SEMC_SRAMCR0_WAITSP_MASK) && (SEMC_SRAMCR0_WAITSP_MASK)
509 uint8_t waitSample;
510#endif /* SEMC_SRAMCR0_WAITSP_MASK */
511#if defined(SEMC_SRAMCR4_ADVH_MASK) && (SEMC_SRAMCR4_ADVH_MASK)
512 semc_adv_level_control_t advLevelCtrl;
513#endif /* SEMC_SRAMCR4_ADVH_MASK */
514 uint8_t tCeSetup_Ns;
515 uint8_t tCeHold_Ns;
517#if defined(FSL_FEATURE_SEMC_HAS_SRAM_RDH_TIME) && (FSL_FEATURE_SEMC_HAS_SRAM_RDH_TIME)
518 uint8_t readHoldTime_Ns;
519#endif /* FSL_FEATURE_SEMC_HAS_SRAM_RDH_TIME */
521 uint8_t tAddrHold_Ns;
522 uint8_t tWeLow_Ns;
523 uint8_t tWeHigh_Ns;
524 uint8_t tReLow_Ns;
525 uint8_t tReHigh_Ns;
528#if defined(FSL_FEATURE_SEMC_HAS_SRAM_WDS_TIME) && (FSL_FEATURE_SEMC_HAS_SRAM_WDS_TIME)
529 uint8_t tWriteSetup_Ns;
530#endif
531#if defined(FSL_FEATURE_SEMC_HAS_SRAM_WDH_TIME) && (FSL_FEATURE_SEMC_HAS_SRAM_WDH_TIME)
532 uint8_t tWriteHold_Ns;
533#endif
534#if defined(FSL_FEATURE_SEMC_HAS_SRAM_LC_TIME) && (FSL_FEATURE_SEMC_HAS_SRAM_LC_TIME)
535 uint8_t latencyCount;
536#endif
537#if defined(FSL_FEATURE_SEMC_HAS_SRAM_RD_TIME) && (FSL_FEATURE_SEMC_HAS_SRAM_RD_TIME)
538 uint8_t readCycle;
539#endif
540#if defined(FSL_FEATURE_SEMC_HAS_DELAY_CHAIN_CONTROL) && (FSL_FEATURE_SEMC_HAS_DELAY_CHAIN_CONTROL)
541 uint8_t delayChain;
543#endif /* FSL_FEATURE_SEMC_HAS_DELAY_CHAIN_CONTROL */
545
547typedef struct _semc_dbi_config
548{
550 uint32_t address;
551 uint32_t memsize_kbytes;
555 uint8_t tCsxSetup_Ns;
556 uint8_t tCsxHold_Ns;
557 uint8_t tWexLow_Ns;
558 uint8_t tWexHigh_Ns;
559 uint8_t tRdxLow_Ns;
560 uint8_t tRdxHigh_Ns;
563
566{
567 uint32_t qos : 4;
568 uint32_t aging : 4;
569 uint32_t slaveHitSwith : 8;
570 uint32_t slaveHitNoswitch : 8;
572
575{
577 uint32_t queueaValue;
579
582{
583 uint32_t qos : 4;
584 uint32_t aging : 4;
585 uint32_t slaveHitSwith : 8;
586 uint32_t weightPagehit : 8;
587 uint32_t bankRotation : 8;
589
592{
594 uint32_t queuebValue;
596
599{
605
614typedef struct _semc_config_t
615{
621
622/*******************************************************************************
623 * API
624 ******************************************************************************/
625
626#if defined(__cplusplus)
627extern "C" {
628#endif
629
650
659void SEMC_Init(SEMC_Type *base, semc_config_t *configure);
660
672void SEMC_Deinit(SEMC_Type *base);
673
674/* @} */
675
690
699
707status_t SEMC_ConfigureNOR(SEMC_Type *base, semc_nor_config_t *config, uint32_t clkSrc_Hz);
708
720 uint32_t clkSrc_Hz);
721
730
738status_t SEMC_ConfigureDBI(SEMC_Type *base, semc_dbi_config_t *config, uint32_t clkSrc_Hz);
739
740/* @} */
741
761static inline void SEMC_EnableInterrupts(SEMC_Type *base, uint32_t mask)
762{
763 base->INTEN |= mask;
764}
765
780static inline void SEMC_DisableInterrupts(SEMC_Type *base, uint32_t mask)
781{
782 base->INTEN &= ~mask;
783}
784
795static inline bool SEMC_GetStatusFlag(SEMC_Type *base)
796{
797 return (base->INTR != 0x00U) ? true : false;
798}
799
808static inline void SEMC_ClearStatusFlags(SEMC_Type *base, uint32_t mask)
809{
810 base->INTR |= mask;
811}
812
813/* @} */
814
826static inline bool SEMC_IsInIdle(SEMC_Type *base)
827{
828 return ((base->STS0 & SEMC_STS0_IDLE_MASK) != 0x00U) ? true : false;
829}
830
846 SEMC_Type *base, semc_mem_type_t memType, uint32_t address, uint32_t command, uint32_t write, uint32_t *read);
847
858static inline uint16_t SEMC_BuildNandIPCommand(uint8_t userCommand,
861{
862 return ((uint16_t)userCommand << 8U) | ((uint16_t)addrMode << 4U) | ((uint16_t)cmdMode & 0x000FU);
863}
864
871static inline bool SEMC_IsNandReady(SEMC_Type *base)
872{
873 return ((base->STS0 & SEMC_STS0_NARDY_MASK) != 0x00U) ? true : false;
874}
875
884status_t SEMC_IPCommandNandWrite(SEMC_Type *base, uint32_t address, uint8_t *data, uint32_t size_bytes);
885
894status_t SEMC_IPCommandNandRead(SEMC_Type *base, uint32_t address, uint8_t *data, uint32_t size_bytes);
895
904status_t SEMC_IPCommandNorWrite(SEMC_Type *base, uint32_t address, uint8_t *data, uint32_t size_bytes);
905
914status_t SEMC_IPCommandNorRead(SEMC_Type *base, uint32_t address, uint8_t *data, uint32_t size_bytes);
915
916/* @} */
917
918#if defined(__cplusplus)
919}
920#endif
921
924#endif /* _FSL_SEMC_H_*/
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
#define MAKE_STATUS(group, code)
Construct a status code value from a group and code number.
Definition: fsl_common.h:47
@ kStatusGroup_SEMC
Definition: fsl_common.h:155
uint8_t tAddrHold_Ns
Definition: fsl_semc.h:465
semc_nand_column_bit_num_t columnAddrBitNum
Definition: fsl_semc.h:440
uint8_t tAddr2WriteHold_Ns
Definition: fsl_semc.h:471
enum _semc_sdram_column_bit_num semc_sdram_column_bit_num_t
SEMC sdram column address bit number.
uint8_t tTurnAround_Ns
Definition: fsl_semc.h:470
_semc_nand_burst_len
SEMC nand burst length.
Definition: fsl_semc.h:167
_semc_norsram_column_bit_num
SEMC nor/sram column address bit number.
Definition: fsl_semc.h:179
uint32_t queueaValue
Definition: fsl_semc.h:577
semc_queueb_weight_struct_t queuebConfig
Definition: fsl_semc.h:593
semc_queueb_weight_t queuebWeight
Definition: fsl_semc.h:603
uint8_t tCsxInterval_Ns
Definition: fsl_semc.h:561
uint8_t tCeHold_Ns
Definition: fsl_semc.h:462
uint8_t tCeHold_Ns
Definition: fsl_semc.h:515
_semc_ipcmd_sdram
SEMC IP command for SDARM.
Definition: fsl_semc.h:360
uint32_t address
Definition: fsl_semc.h:550
status_t SEMC_ConfigureSRAM(SEMC_Type *base, semc_sram_config_t *config, uint32_t clkSrc_Hz)
Configures SRAM controller in SEMC.
Definition: fsl_semc.c:754
uint32_t address
Definition: fsl_semc.h:452
struct _semc_config_t semc_config_t
SEMC configuration structure.
_semc_iomux_pin
SEMC IOMUXC.
Definition: fsl_semc.h:235
uint32_t address
Definition: fsl_semc.h:495
uint8_t tCkeOff_Ns
Definition: fsl_semc.h:396
uint32_t memsize_kbytes
Definition: fsl_semc.h:551
semc_iomux_nora27_pin addr27
Definition: fsl_semc.h:451
_semc_addr_mode
SEMC address mode.
Definition: fsl_semc.h:264
semc_nand_address_option_t arrayAddrOption
Definition: fsl_semc.h:441
semc_iomux_pin csxPinMux
Definition: fsl_semc.h:385
status_t SEMC_IPCommandNorRead(SEMC_Type *base, uint32_t address, uint8_t *data, uint32_t size_bytes)
SEMC NOR device memory read through IP command.
Definition: fsl_semc.c:1300
status_t SEMC_ConfigureNAND(SEMC_Type *base, semc_nand_config_t *config, uint32_t clkSrc_Hz)
Configures NAND controller in SEMC.
Definition: fsl_semc.c:513
uint8_t tReLow_Ns
Definition: fsl_semc.h:468
enum _semc_sram_cs semc_sram_cs_t
SEMC SRAM Chip selection .
uint8_t tWeHigh_Ns
Definition: fsl_semc.h:419
uint8_t tAle2WriteStart_Ns
Definition: fsl_semc.h:425
status_t SEMC_ConfigureNOR(SEMC_Type *base, semc_nor_config_t *config, uint32_t clkSrc_Hz)
Configures NOR controller in SEMC.
Definition: fsl_semc.c:610
sem_sdram_burst_len_t burstLen
Definition: fsl_semc.h:389
uint8_t tTurnAround_Ns
Definition: fsl_semc.h:422
_semc_sram_cs
SEMC SRAM Chip selection .
Definition: fsl_semc.h:73
uint8_t tWehigh2Relow_Ns
Definition: fsl_semc.h:423
uint8_t busTimeoutCycles
Definition: fsl_semc.h:618
enum _semc_nand_burst_len sem_nand_burst_len_t
SEMC nand burst length.
semc_rdy_polarity_t rdyactivePolarity
Definition: fsl_semc.h:438
uint32_t bankRotation
Definition: fsl_semc.h:587
uint8_t tCeSetup_Ns
Definition: fsl_semc.h:415
uint8_t tAddr2WriteHold_Ns
Definition: fsl_semc.h:527
_semc_port_size
SEMC port size.
Definition: fsl_semc.h:254
void SEMC_Deinit(SEMC_Type *base)
Deinitializes the SEMC module and gates the clock.
Definition: fsl_semc.c:350
_semc_waitready_polarity
SEMC WAIT/RDY polarity.
Definition: fsl_semc.h:57
_semc_nand_address_option
SEMC NAND address option.
Definition: fsl_semc.h:333
_semc_ipcmd_sram
SEMC IP command for SRAM.
Definition: fsl_semc.h:351
uint8_t tWexLow_Ns
Definition: fsl_semc.h:557
uint8_t tSelfRefRecovery_Ns
Definition: fsl_semc.h:398
semc_iomux_pin cePinMux
Definition: fsl_semc.h:493
semc_rdy_polarity_t rdyactivePolarity
Definition: fsl_semc.h:455
enum _semc_nand_access_type semc_nand_access_type_t
SEMC NAND device type.
_semc_sdram_burst_len
SEMC sdram burst length.
Definition: fsl_semc.h:139
uint8_t tRefreshRecovery_Ns
Definition: fsl_semc.h:394
uint8_t addrPortWidth
Definition: fsl_semc.h:497
uint32_t slaveHitSwith
Definition: fsl_semc.h:569
_semc_adv_polarity
SEMC ADV signal active polarity.
Definition: fsl_semc.h:279
uint32_t ipgMemsize_kbytes
Definition: fsl_semc.h:437
enum _semc_waitready_polarity semc_waitready_polarity_t
SEMC WAIT/RDY polarity.
uint8_t tWeLow_Ns
Definition: fsl_semc.h:418
uint32_t memsize_kbytes
Definition: fsl_semc.h:387
enum _semc_dbi_column_bit_num semc_dbi_column_bit_num_t
SEMC dbi column address bit number.
uint32_t axiAddress
Definition: fsl_semc.h:434
_semc_nand_access_type
SEMC NAND device type.
Definition: fsl_semc.h:86
enum _semc_mem_type semc_mem_type_t
SEMC memory device type.
semc_adv_polarity_t advActivePolarity
Definition: fsl_semc.h:498
uint8_t tReady2Relow_Ns
Definition: fsl_semc.h:426
enum _semc_nand_address_option semc_nand_address_option_t
SEMC NAND address option.
enum _semc_caslatency semc_caslatency_t
CAS latency.
uint32_t refreshPeriod_nsPerRow
Definition: fsl_semc.h:403
semc_addr_mode_t addrMode
Definition: fsl_semc.h:458
uint8_t tWriteRecovery_Ns
Definition: fsl_semc.h:395
uint8_t tRdxHigh_Ns
Definition: fsl_semc.h:560
uint8_t tPrecharge2Act_Ns
Definition: fsl_semc.h:392
enum _semc_ipcmd_sram semc_ipcmd_sram_t
SEMC IP command for SRAM.
status_t SEMC_ConfigureSRAMWithChipSelection(SEMC_Type *base, semc_sram_cs_t cs, semc_sram_config_t *config, uint32_t clkSrc_Hz)
Configures SRAM controller in SEMC.
Definition: fsl_semc.c:767
_semc_caslatency
CAS latency.
Definition: fsl_semc.h:119
enum _semc_addr_mode semc_addr_mode_t
SEMC address mode.
enum _semc_dbi_burst_len sem_dbi_burst_len_t
SEMC dbi burst length.
enum _semc_ipcmd_nand_addrmode semc_ipcmd_nand_addrmode_t
SEMC IP command for NAND: address mode.
struct _semc_queueb_weight_struct semc_queueb_weight_struct_t
SEMC AXI queue b weight setting structure.
uint8_t tCeInterval_Ns
Definition: fsl_semc.h:417
uint8_t tWehigh2Busy_Ns
Definition: fsl_semc.h:427
_semc_dbi_column_bit_num
SEMC dbi column address bit number.
Definition: fsl_semc.h:207
uint8_t cmdTimeoutCycles
Definition: fsl_semc.h:617
semc_adv_polarity_t advActivePolarity
Definition: fsl_semc.h:456
enum _semc_norsram_burst_len sem_norsram_burst_len_t
SEMC nor/sram burst length.
uint8_t tRefresh2Refresh_Ns
Definition: fsl_semc.h:399
_semc_sdram_column_bit_num
SEMC sdram column address bit number.
Definition: fsl_semc.h:127
void SEMC_GetDefaultConfig(semc_config_t *config)
Gets the SEMC default basic configuration structure.
Definition: fsl_semc.c:253
struct _semc_axi_queueweight semc_axi_queueweight_t
SEMC AXI queue weight setting.
_semc_rdy_polarity
SEMC RDY signal active polarity.
Definition: fsl_semc.h:300
uint8_t tWeHigh_Ns
Definition: fsl_semc.h:523
enum _semc_ipcmd_sdram semc_ipcmd_sdram_t
SEMC IP command for SDARM.
smec_port_size_t portSize
Definition: fsl_semc.h:501
uint32_t memsize_kbytes
Definition: fsl_semc.h:496
enum _semc_ipcmd_datasize semc_ipcmd_datasize_t
SEMC IP command data size in bytes.
enum _semc_adv_level_control semc_adv_level_control_t
SEMC ADV signal level control.
uint32_t tPrescalePeriod_Ns
Definition: fsl_semc.h:401
uint8_t tWeLow_Ns
Definition: fsl_semc.h:466
uint32_t refreshUrgThreshold
Definition: fsl_semc.h:404
semc_sdram_column_bit_num_t columnAddrBitNum
Definition: fsl_semc.h:390
enum _semc_rdy_polarity semc_rdy_polarity_t
SEMC RDY signal active polarity.
enum _semc_nand_column_bit_num semc_nand_column_bit_num_t
SEMC nand column address bit number.
uint32_t memsize_kbytes
Definition: fsl_semc.h:453
enum _semc_refresh_time semc_refresh_time_t
SEMC auto-refresh timing.
uint8_t tRdxLow_Ns
Definition: fsl_semc.h:559
enum _semc_adv_polarity semc_adv_polarity_t
SEMC ADV signal active polarity.
smec_port_size_t portSize
Definition: fsl_semc.h:388
uint8_t tReHigh_Ns
Definition: fsl_semc.h:469
uint32_t axiMemsize_kbytes
Definition: fsl_semc.h:435
struct _semc_sram_config semc_sram_config_t
SEMC SRAM configuration structure.
semc_axi_queueweight_t queueWeight
Definition: fsl_semc.h:619
uint32_t address
Definition: fsl_semc.h:386
_semc_adv_level_control
SEMC ADV signal level control.
Definition: fsl_semc.h:293
semc_dqs_mode_t dqsMode
Definition: fsl_semc.h:616
semc_iomux_nora27_pin addr27
Definition: fsl_semc.h:494
bool queuebEnable
Definition: fsl_semc.h:602
semc_nand_timing_config_t * timingConfig
Definition: fsl_semc.h:444
semc_iomux_pin cePinMux
Definition: fsl_semc.h:450
_semc_sync_mode
SEMC sync mode.
Definition: fsl_semc.h:286
uint8_t tAddrSetup_Ns
Definition: fsl_semc.h:520
status_t SEMC_IPCommandNandWrite(SEMC_Type *base, uint32_t address, uint8_t *data, uint32_t size_bytes)
SEMC NAND device memory write through IP command.
Definition: fsl_semc.c:1203
status_t SEMC_ConfigureDBI(SEMC_Type *base, semc_dbi_config_t *config, uint32_t clkSrc_Hz)
Configures DBI controller in SEMC.
Definition: fsl_semc.c:1061
uint8_t tReHigh_Ns
Definition: fsl_semc.h:525
semc_norsram_column_bit_num_t columnAddrBitNum
Definition: fsl_semc.h:457
smec_port_size_t portSize
Definition: fsl_semc.h:554
uint8_t tReLow_Ns
Definition: fsl_semc.h:420
_semc_ipcmd_datasize
SEMC IP command data size in bytes.
Definition: fsl_semc.h:102
uint8_t tReHigh_Ns
Definition: fsl_semc.h:421
semc_queuea_weight_t queueaWeight
Definition: fsl_semc.h:601
enum _semc_dqs_mode semc_dqs_mode_t
SEMC DQS read strobe mode.
uint32_t weightPagehit
Definition: fsl_semc.h:586
uint32_t tIdleTimeout_Ns
Definition: fsl_semc.h:402
enum _semc_iomux_pin semc_iomux_pin
SEMC IOMUXC.
uint8_t tReLow_Ns
Definition: fsl_semc.h:524
bool edoModeEnabled
Definition: fsl_semc.h:439
uint8_t tAddrHold_Ns
Definition: fsl_semc.h:521
sem_nand_burst_len_t burstLen
Definition: fsl_semc.h:442
uint32_t slaveHitNoswitch
Definition: fsl_semc.h:570
uint8_t addrPortWidth
Definition: fsl_semc.h:454
semc_addr_mode_t addrMode
Definition: fsl_semc.h:499
_semc_sdram_cs
SEMC SDRAM Chip selection .
Definition: fsl_semc.h:64
enum _semc_norsram_column_bit_num semc_norsram_column_bit_num_t
SEMC nor/sram column address bit number.
status_t SEMC_ConfigureSDRAM(SEMC_Type *base, semc_sdram_cs_t cs, semc_sdram_config_t *config, uint32_t clkSrc_Hz)
Configures SDRAM controller in SEMC.
Definition: fsl_semc.c:377
uint8_t tAct2Act_Ns
Definition: fsl_semc.h:400
enum _semc_iomux_nora27_pin semc_iomux_nora27_pin
SEMC NOR/PSRAM Address bit 27 A27.
_semc_dbi_burst_len
SEMC dbi burst length.
Definition: fsl_semc.h:223
uint8_t refreshBurstLen
Definition: fsl_semc.h:405
uint8_t tWeHigh_Ns
Definition: fsl_semc.h:467
uint32_t aging
Definition: fsl_semc.h:568
_semc_nand_column_bit_num
SEMC nand column address bit number.
Definition: fsl_semc.h:154
uint8_t tCsxHold_Ns
Definition: fsl_semc.h:556
uint8_t tCsxSetup_Ns
Definition: fsl_semc.h:555
sem_norsram_burst_len_t burstLen
Definition: fsl_semc.h:459
uint32_t qos
Definition: fsl_semc.h:583
struct _semc_nand_timing_config semc_nand_timing_config_t
SEMC NAND device timing configuration structure.
uint8_t tCeInterval_Ns
Definition: fsl_semc.h:516
sem_norsram_burst_len_t burstLen
Definition: fsl_semc.h:500
uint32_t queuebValue
Definition: fsl_semc.h:594
semc_caslatency_t casLatency
Definition: fsl_semc.h:391
enum _semc_ipcmd_nor_dbi semc_ipcmd_nor_dbi_t
SEMC IP command for NOR.
status_t SEMC_IPCommandNorWrite(SEMC_Type *base, uint32_t address, uint8_t *data, uint32_t size_bytes)
SEMC NOR device memory write through IP command.
Definition: fsl_semc.c:1347
uint8_t tWexHigh_Ns
Definition: fsl_semc.h:558
semc_dbi_column_bit_num_t columnAddrBitNum
Definition: fsl_semc.h:552
union _semc_queueb_weight semc_queueb_weight_t
SEMC AXI queue b weight setting union.
uint8_t tAct2Prechage_Ns
Definition: fsl_semc.h:397
_semc_interrupt_enable
SEMC interrupts .
Definition: fsl_semc.h:93
status_t SEMC_SendIPCommand(SEMC_Type *base, semc_mem_type_t memType, uint32_t address, uint32_t command, uint32_t write, uint32_t *read)
SEMC IP command access.
Definition: fsl_semc.c:1130
uint8_t tTurnAround_Ns
Definition: fsl_semc.h:526
_semc_refresh_time
SEMC auto-refresh timing.
Definition: fsl_semc.h:111
smec_port_size_t portSize
Definition: fsl_semc.h:460
_semc_ipcmd_nand_cmdmode
SEMC IP command for NAND: command mode.
Definition: fsl_semc.h:318
semc_iomux_pin csxPinMux
Definition: fsl_semc.h:549
enum _semc_ipcmd_nand_cmdmode semc_ipcmd_nand_cmdmode_t
SEMC IP command for NAND: command mode.
_semc_ipcmd_nor_dbi
SEMC IP command for NOR.
Definition: fsl_semc.h:344
enum _semc_sync_mode semc_sync_mode_t
SEMC sync mode.
void SEMC_Init(SEMC_Type *base, semc_config_t *configure)
Initializes SEMC. This function ungates the SEMC clock and initializes SEMC. This function must be ca...
Definition: fsl_semc.c:289
semc_iomux_pin cePinMux
Definition: fsl_semc.h:433
uint32_t slaveHitSwith
Definition: fsl_semc.h:585
enum _semc_sdram_cs semc_sdram_cs_t
SEMC SDRAM Chip selection .
_semc_norsram_burst_len
SEMC nor/sram burst length.
Definition: fsl_semc.h:195
struct _semc_nor_config semc_nor_config_t
SEMC NOR configuration structure.
_semc_ipcmd_nand_addrmode
SEMC IP command for NAND: address mode.
Definition: fsl_semc.h:307
uint32_t qos
Definition: fsl_semc.h:567
uint8_t tCeSetup_Ns
Definition: fsl_semc.h:461
uint8_t tAct2ReadWrite_Ns
Definition: fsl_semc.h:393
union _semc_queuea_weight semc_queuea_weight_t
SEMC AXI queue a weight setting union.
struct _semc_dbi_config semc_dbi_config_t
SEMC DBI configuration structure.
sem_dbi_burst_len_t burstLen
Definition: fsl_semc.h:553
smec_port_size_t portSize
Definition: fsl_semc.h:443
status_t SEMC_IPCommandNandRead(SEMC_Type *base, uint32_t address, uint8_t *data, uint32_t size_bytes)
SEMC NAND device memory read through IP command.
Definition: fsl_semc.c:1252
enum _semc_port_size smec_port_size_t
SEMC port size.
semc_queuea_weight_struct_t queueaConfig
Definition: fsl_semc.h:576
struct _semc_sdram_config semc_sdram_config_t
SEMC SDRAM configuration structure.
uint8_t tCeHold_Ns
Definition: fsl_semc.h:416
enum _semc_interrupt_enable semc_interrupt_enable_t
SEMC interrupts .
uint8_t tCeInterval_Ns
Definition: fsl_semc.h:463
uint32_t ipgAddress
Definition: fsl_semc.h:436
struct _semc_nand_config semc_nand_config_t
SEMC NAND configuration structure.
uint8_t tRehigh2Welow_Ns
Definition: fsl_semc.h:424
_semc_iomux_nora27_pin
SEMC NOR/PSRAM Address bit 27 A27.
Definition: fsl_semc.h:246
uint32_t aging
Definition: fsl_semc.h:584
struct _semc_queuea_weight_struct semc_queuea_weight_struct_t
SEMC AXI queue a weight setting structure.
enum _semc_sdram_burst_len sem_sdram_burst_len_t
SEMC sdram burst length.
uint8_t tCeSetup_Ns
Definition: fsl_semc.h:514
_semc_dqs_mode
SEMC DQS read strobe mode.
Definition: fsl_semc.h:272
uint8_t tWeLow_Ns
Definition: fsl_semc.h:522
uint8_t tAddrSetup_Ns
Definition: fsl_semc.h:464
_semc_mem_type
SEMC memory device type.
Definition: fsl_semc.h:47
bool queueaEnable
Definition: fsl_semc.h:600
@ kStatus_SEMC_InvalidBaseAddress
Definition: fsl_semc.h:41
@ kStatus_SEMC_IpCommandExecutionError
Definition: fsl_semc.h:31
@ kStatus_SEMC_InvalidSwPinmuxSelection
Definition: fsl_semc.h:37
@ kStatus_SEMC_InvalidTimerSetting
Definition: fsl_semc.h:42
@ kStatus_SEMC_InvalidColumnAddressBitWidth
Definition: fsl_semc.h:40
@ kStatus_SEMC_InvalidBurstLength
Definition: fsl_semc.h:38
@ kStatus_SEMC_InvalidDeviceType
Definition: fsl_semc.h:30
@ kStatus_SEMC_InvalidDataPortWidth
Definition: fsl_semc.h:36
@ kStatus_SEMC_InvalidMemorySize
Definition: fsl_semc.h:33
@ kStatus_SEMC_InvalidIpcmdDataSize
Definition: fsl_semc.h:34
@ kStatus_SEMC_InvalidAddressPortWidth
Definition: fsl_semc.h:35
@ kStatus_SEMC_AxiCommandExecutionError
Definition: fsl_semc.h:32
@ kSEMC_Nand_BurstLen1
Definition: fsl_semc.h:168
@ kSEMC_Nand_BurstLen32
Definition: fsl_semc.h:173
@ kSEMC_Nand_BurstLen4
Definition: fsl_semc.h:170
@ kSEMC_Nand_BurstLen2
Definition: fsl_semc.h:169
@ kSEMC_Nand_BurstLen8
Definition: fsl_semc.h:171
@ kSEMC_Nand_BurstLen64
Definition: fsl_semc.h:174
@ kSEMC_Nand_BurstLen16
Definition: fsl_semc.h:172
@ kSEMC_NorColum_4bit
Definition: fsl_semc.h:188
@ kSEMC_NorColum_10bit
Definition: fsl_semc.h:182
@ kSEMC_NorColum_11bit
Definition: fsl_semc.h:181
@ kSEMC_NorColum_12bit
Definition: fsl_semc.h:180
@ kSEMC_NorColum_9bit
Definition: fsl_semc.h:183
@ kSEMC_NorColum_3bit
Definition: fsl_semc.h:189
@ kSEMC_NorColum_7bit
Definition: fsl_semc.h:185
@ kSEMC_NorColum_8bit
Definition: fsl_semc.h:184
@ kSEMC_NorColum_6bit
Definition: fsl_semc.h:186
@ kSEMC_NorColum_5bit
Definition: fsl_semc.h:187
@ kSEMC_NorColum_2bit
Definition: fsl_semc.h:190
@ kSEMC_SDRAMCM_Modeset
Definition: fsl_semc.h:363
@ kSEMC_SDRAMCM_Read
Definition: fsl_semc.h:361
@ kSEMC_SDRAMCM_Active
Definition: fsl_semc.h:364
@ kSEMC_SDRAMCM_SelfRefresh
Definition: fsl_semc.h:366
@ kSEMC_SDRAMCM_Prechargeall
Definition: fsl_semc.h:368
@ kSEMC_SDRAMCM_Precharge
Definition: fsl_semc.h:367
@ kSEMC_SDRAMCM_Write
Definition: fsl_semc.h:362
@ kSEMC_SDRAMCM_AutoRefresh
Definition: fsl_semc.h:365
@ kSEMC_MUXCSX2
Definition: fsl_semc.h:239
@ kSEMC_MUXRDY
Definition: fsl_semc.h:241
@ kSEMC_MUXCSX1
Definition: fsl_semc.h:238
@ kSEMC_MUXCSX3
Definition: fsl_semc.h:240
@ kSEMC_MUXCSX0
Definition: fsl_semc.h:237
@ kSEMC_MUXA8
Definition: fsl_semc.h:236
@ kSEMC_AdvAddrdataMux
Definition: fsl_semc.h:266
@ kSEMC_AddrDataMux
Definition: fsl_semc.h:265
@ kSEMC_AddrDataNonMux
Definition: fsl_semc.h:267
@ kSEMC_SRAM_CS0
Definition: fsl_semc.h:80
@ kSEMC_PortSize8Bit
Definition: fsl_semc.h:255
@ kSEMC_PortSize16Bit
Definition: fsl_semc.h:256
@ kSEMC_HighActive
Definition: fsl_semc.h:59
@ kSEMC_LowActive
Definition: fsl_semc.h:58
@ kSEMC_NandAddrOption_2byte_CA1RA1
Definition: fsl_semc.h:339
@ kSEMC_NandAddrOption_5byte_CA2RA3
Definition: fsl_semc.h:334
@ kSEMC_NandAddrOption_3byte_CA2RA1
Definition: fsl_semc.h:336
@ kSEMC_NandAddrOption_4byte_CA1RA3
Definition: fsl_semc.h:337
@ kSEMC_NandAddrOption_4byte_CA2RA2
Definition: fsl_semc.h:335
@ kSEMC_NandAddrOption_3byte_CA1RA2
Definition: fsl_semc.h:338
@ kSEMC_SRAMCM_ArrayWrite
Definition: fsl_semc.h:353
@ kSEMC_SRAMCM_RegWrite
Definition: fsl_semc.h:355
@ kSEMC_SRAMCM_RegRead
Definition: fsl_semc.h:354
@ kSEMC_SRAMCM_ArrayRead
Definition: fsl_semc.h:352
@ kSEMC_Sdram_BurstLen4
Definition: fsl_semc.h:147
@ kSEMC_Sdram_BurstLen8
Definition: fsl_semc.h:148
@ kSEMC_Sdram_BurstLen1
Definition: fsl_semc.h:145
@ kSEMC_Sdram_BurstLen2
Definition: fsl_semc.h:146
@ kSEMC_AdvActiveHigh
Definition: fsl_semc.h:281
@ kSEMC_AdvActiveLow
Definition: fsl_semc.h:280
@ kSEMC_NAND_ACCESS_BY_AXI
Definition: fsl_semc.h:87
@ kSEMC_NAND_ACCESS_BY_IPCMD
Definition: fsl_semc.h:88
@ kSEMC_LatencyThree
Definition: fsl_semc.h:122
@ kSEMC_LatencyOne
Definition: fsl_semc.h:120
@ kSEMC_LatencyTwo
Definition: fsl_semc.h:121
@ kSEMC_Dbi_Colum_5bit
Definition: fsl_semc.h:215
@ kSEMC_Dbi_Colum_2bit
Definition: fsl_semc.h:218
@ kSEMC_Dbi_Colum_3bit
Definition: fsl_semc.h:217
@ kSEMC_Dbi_Colum_6bit
Definition: fsl_semc.h:214
@ kSEMC_Dbi_Colum_4bit
Definition: fsl_semc.h:216
@ kSEMC_Dbi_Colum_10bit
Definition: fsl_semc.h:210
@ kSEMC_Dbi_Colum_7bit
Definition: fsl_semc.h:213
@ kSEMC_Dbi_Colum_12bit
Definition: fsl_semc.h:208
@ kSEMC_Dbi_Colum_11bit
Definition: fsl_semc.h:209
@ kSEMC_Dbi_Colum_8bit
Definition: fsl_semc.h:212
@ kSEMC_Dbi_Colum_9bit
Definition: fsl_semc.h:211
@ kSEMC_SdramColunm_10bit
Definition: fsl_semc.h:130
@ kSEMC_SdramColunm_11bit
Definition: fsl_semc.h:129
@ kSEMC_SdramColunm_12bit
Definition: fsl_semc.h:128
@ kSEMC_SdramColunm_9bit
Definition: fsl_semc.h:131
@ kSEMC_RdyActiveLow
Definition: fsl_semc.h:301
@ kSEMC_RdyActivehigh
Definition: fsl_semc.h:302
@ kSEMC_AdvHigh
Definition: fsl_semc.h:294
@ kSEMC_AdvLow
Definition: fsl_semc.h:295
@ kSEMC_SyncMode
Definition: fsl_semc.h:288
@ kSEMC_AsyncMode
Definition: fsl_semc.h:287
@ kSEMC_IPcmdDataSize_3bytes
Definition: fsl_semc.h:105
@ kSEMC_IPcmdDataSize_1bytes
Definition: fsl_semc.h:103
@ kSEMC_IPcmdDataSize_4bytes
Definition: fsl_semc.h:106
@ kSEMC_IPcmdDataSize_2bytes
Definition: fsl_semc.h:104
@ kSEMC_SDRAM_CS2
Definition: fsl_semc.h:67
@ kSEMC_SDRAM_CS3
Definition: fsl_semc.h:68
@ kSEMC_SDRAM_CS1
Definition: fsl_semc.h:66
@ kSEMC_SDRAM_CS0
Definition: fsl_semc.h:65
@ kSEMC_Dbi_BurstLen2
Definition: fsl_semc.h:225
@ kSEMC_Dbi_BurstLen32
Definition: fsl_semc.h:229
@ kSEMC_Dbi_BurstLen1
Definition: fsl_semc.h:224
@ kSEMC_Dbi_BurstLen8
Definition: fsl_semc.h:227
@ kSEMC_Dbi_BurstLen64
Definition: fsl_semc.h:230
@ kSEMC_Dbi_BurstLen16
Definition: fsl_semc.h:228
@ kSEMC_Dbi_Dbi_BurstLen4
Definition: fsl_semc.h:226
@ kSEMC_NandColum_11bit
Definition: fsl_semc.h:160
@ kSEMC_NandColum_9bit
Definition: fsl_semc.h:162
@ kSEMC_NandColum_10bit
Definition: fsl_semc.h:161
@ kSEMC_NandColum_13bit
Definition: fsl_semc.h:158
@ kSEMC_NandColum_12bit
Definition: fsl_semc.h:159
@ kSEMC_NandColum_15bit
Definition: fsl_semc.h:156
@ kSEMC_NandColum_14bit
Definition: fsl_semc.h:157
@ kSEMC_NandColum_16bit
Definition: fsl_semc.h:155
@ kSEMC_AXIBusErrInterrupt
Definition: fsl_semc.h:97
@ kSEMC_IPCmdErrInterrupt
Definition: fsl_semc.h:95
@ kSEMC_IPCmdDoneInterrupt
Definition: fsl_semc.h:94
@ kSEMC_AXICmdErrInterrupt
Definition: fsl_semc.h:96
@ kSEMC_RefreshNineClocks
Definition: fsl_semc.h:114
@ kSEMC_RefreshThreeClocks
Definition: fsl_semc.h:112
@ kSEMC_RefreshSixClocks
Definition: fsl_semc.h:113
@ kSEMC_NANDCM_CommandAddressRead
Definition: fsl_semc.h:323
@ kSEMC_NANDCM_Command
Definition: fsl_semc.h:319
@ kSEMC_NANDCM_CommandAddressHold
Definition: fsl_semc.h:322
@ kSEMC_NANDCM_CommandRead
Definition: fsl_semc.h:325
@ kSEMC_NANDCM_CommandAddress
Definition: fsl_semc.h:321
@ kSEMC_NANDCM_CommandWrite
Definition: fsl_semc.h:326
@ kSEMC_NANDCM_CommandAddressWrite
Definition: fsl_semc.h:324
@ kSEMC_NANDCM_CommandHold
Definition: fsl_semc.h:320
@ kSEMC_NANDCM_Read
Definition: fsl_semc.h:327
@ kSEMC_NANDCM_Write
Definition: fsl_semc.h:328
@ kSEMC_NORDBICM_Read
Definition: fsl_semc.h:345
@ kSEMC_NORDBICM_Write
Definition: fsl_semc.h:346
@ kSEMC_Nor_BurstLen64
Definition: fsl_semc.h:202
@ kSEMC_Nor_BurstLen2
Definition: fsl_semc.h:197
@ kSEMC_Nor_BurstLen4
Definition: fsl_semc.h:198
@ kSEMC_Nor_BurstLen1
Definition: fsl_semc.h:196
@ kSEMC_Nor_BurstLen16
Definition: fsl_semc.h:200
@ kSEMC_Nor_BurstLen8
Definition: fsl_semc.h:199
@ kSEMC_Nor_BurstLen32
Definition: fsl_semc.h:201
@ kSEMC_NANDAM_RawRA0
Definition: fsl_semc.h:311
@ kSEMC_NANDAM_RawRA0RA1RA2
Definition: fsl_semc.h:313
@ kSEMC_NANDAM_RawRA0RA1
Definition: fsl_semc.h:312
@ kSEMC_NANDAM_ColumnCA0
Definition: fsl_semc.h:309
@ kSEMC_NANDAM_ColumnRow
Definition: fsl_semc.h:308
@ kSEMC_NANDAM_ColumnCA0CA1
Definition: fsl_semc.h:310
@ kSEMC_NORA27_MUXCSX3
Definition: fsl_semc.h:248
@ kSEMC_NORA27_MUXRDY
Definition: fsl_semc.h:249
@ kSEMC_MORA27_NONE
Definition: fsl_semc.h:247
@ kSEMC_Loopbackdqspad
Definition: fsl_semc.h:274
@ kSEMC_Loopbackinternal
Definition: fsl_semc.h:273
@ kSEMC_MemType_NOR
Definition: fsl_semc.h:50
@ kSEMC_MemType_8080
Definition: fsl_semc.h:52
@ kSEMC_MemType_SDRAM
Definition: fsl_semc.h:48
@ kSEMC_MemType_NAND
Definition: fsl_semc.h:51
@ kSEMC_MemType_SRAM
Definition: fsl_semc.h:49
ssize_t write(int fd, const void *buffer, size_t count)
Definition: write.c:49
Definition: MIMXRT1052.h:39738
SEMC AXI queue weight setting.
Definition: fsl_semc.h:599
SEMC configuration structure.
Definition: fsl_semc.h:615
SEMC DBI configuration structure.
Definition: fsl_semc.h:548
SEMC NAND configuration structure.
Definition: fsl_semc.h:432
SEMC NAND device timing configuration structure.
Definition: fsl_semc.h:414
SEMC NOR configuration structure.
Definition: fsl_semc.h:449
SEMC AXI queue a weight setting structure.
Definition: fsl_semc.h:566
SEMC AXI queue b weight setting structure.
Definition: fsl_semc.h:582
SEMC SDRAM configuration structure.
Definition: fsl_semc.h:384
SEMC SRAM configuration structure.
Definition: fsl_semc.h:492
Definition: deflate.c:114
SEMC AXI queue a weight setting union.
Definition: fsl_semc.h:575
SEMC AXI queue b weight setting union.
Definition: fsl_semc.h:592