AM263x MCU+ SDK  08.05.00
mmcsd/v1/mmcsd.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
50 #ifndef MMCSD_H_
51 #define MMCSD_H_
52 
53 /* ========================================================================== */
54 /* Include Files */
55 /* ========================================================================== */
56 
57 #include <stdint.h>
58 #include <kernel/dpl/SystemP.h>
59 #include <kernel/dpl/SemaphoreP.h>
60 #include <kernel/dpl/HwiP.h>
61 #include <drivers/hw_include/csl_types.h>
62 #include <drivers/hw_include/cslr_mmcsd.h>
63 #include <drivers/hw_include/hw_types.h>
64 
65 #ifdef __cplusplus
66 extern "C" {
67 #endif
68 
69 /* ========================================================================== */
70 /* Macros & Typedefs */
71 /* ========================================================================== */
72 
74 #define MMCSD_CARD_SD (0U)
75 
77 #define MMCSD_CARD_MMC (1U)
78 
80 #define MMCSD_CARD_EMMC (2U)
81 
82 /* useful in cases where SoC has MMCSD IP but no device attached to peripheral */
83 #define MMCSD_CARD_TYPE_NO_DEVICE (3U)
84 
86 #define MMCSD_CMD_SETBUSWIDTH (MMCSD_CMD_RESERVED + 0U)
87 
89 #define MMCSD_CMD_SETFREQUENCY (MMCSD_CMD_RESERVED + 1U)
90 
92 #define MMCSD_CMD_GETBUSWIDTH (MMCSD_CMD_RESERVED + 2U)
93 
95 #define MMCSD_CMD_GETFREQUENCY (MMCSD_CMD_RESERVED + 3U)
96 
98 #define MMCSD_CMD_GETMEDIAPARAMS (MMCSD_CMD_RESERVED + 4U)
99 
101 #define MMCSD_INVALID_MUXNUM (-1)
102 
104 #define MMCSD_INVALID_MUX_EVENTNUM (-1)
105 
107 #define MMCSD_BUS_WIDTH_1BIT (1U)
108 
110 #define MMCSD_BUS_WIDTH_4BIT (4U)
111 
113 #define MMCSD_BUS_WIDTH_8BIT (8U)
114 
116 #define MMCSD_TRANSPEED_25MBPS (0x32U)
117 
119 #define MMCSD_TRANSPEED_50MBPS (0x5AU)
120 
122 #define MMCSD_TRANSPEED_DEFAULT (0x32U)
123 
125 #define MMCSD_TRANSPEED_HS (0x5AU)
126 
128 #define MMCSD_TRANSPEED_SDR12 (0x32U)
129 
131 #define MMCSD_TRANSPEED_SDR25 (0x5AU)
132 
134 #define MMCSD_TRANSPEED_SDR50 (0xBU)
135 
137 #define MMCSD_TRANSPEED_SDR104 (0x2BU)
138 
140 #define MMCSD_TRANSPEED_DDR50 (0x3BU)
141 
143 #define MMCSD_TRANSPEED_HS200 (0x2BU)
144 
146 #define MMCSD_LOOPBACK_ANY (0x0U)
147 
149 #define MMCSD_LOOPBACK_INTERNAL (0x1U)
150 
152 #define MMCSD_LOOPBACK_PAD (0x2U)
153 
155 #define MMCSD_VOLTAGE_ANY (0x0U)
156 
157 typedef void* MMCSD_Handle;
158 
159 /* ========================================================================== */
160 /* Structures and Enums */
161 /* ========================================================================== */
170 typedef enum hsMmcsdResetLineMask
171 {
172  MMCSD_RESET_LINE_MASK_DATA = CSL_MMC_SYSCTL_SRD_MASK,
174  MMCSD_RESET_LINE_MASK_CMD = CSL_MMC_SYSCTL_SRC_MASK,
176  MMCSD_RESET_LINE_MASK_ALL = CSL_MMC_SYSCTL_SRA_MASK
179 
181 typedef enum MMCSD_clkAct_t
182 {
183  MMCSD_CLK_ACT_ICLK_FCLK_OFF = CSL_MMC_SYSCONFIG_CLOCKACTIVITY_NONE,
185  MMCSD_CLK_ACT_FCLK_OFF = CSL_MMC_SYSCONFIG_CLOCKACTIVITY_FUNC,
187  MMCSD_CLK_ACT_ICLK_OFF = CSL_MMC_SYSCONFIG_CLOCKACTIVITY_OCP,
189  MMCSD_CLK_ACT_ICLK_FLCK_ON = CSL_MMC_SYSCONFIG_CLOCKACTIVITY_BOTH
192 
194 typedef enum MMCSD_standbyMode_t
195 {
196  MMCSD_STANDBY_MODE_FORCE = CSL_MMC_SYSCONFIG_STANDBYMODE_FORCE,
198  MMCSD_STANDBY_MODE_NONE = CSL_MMC_SYSCONFIG_STANDBYMODE_NOIDLE,
200  MMCSD_STANDBY_MODE_SMART = CSL_MMC_SYSCONFIG_STANDBYMODE_SMART,
203  CSL_MMC_SYSCONFIG_STANDBYMODE_SMARTWAKE
206 
208 typedef enum MMCSD_pwrCtrl_t
209 {
210  MMCSD_PWR_CTRL_ON = CSL_MMC_HCTL_SDBP_PWRON,
212  MMCSD_PWR_CTRL_OFF = CSL_MMC_HCTL_SDBP_PWROFF
215 
217 typedef enum MMCSD_suppVolt_t
218 {
219  MMCSD_SUPP_VOLT_1P8 = CSL_MMC_CAPA_VS18_MASK,
221  MMCSD_SUPP_VOLT_3P0 = CSL_MMC_CAPA_VS30_MASK,
223  MMCSD_SUPP_VOLT_3P3 = CSL_MMC_CAPA_VS33_MASK
226 
228 typedef enum MMCSD_cmdType_t
229 {
230  MMCSD_CMD_TYPE_OTHER = CSL_MMC_CMD_CMD_TYPE_NORMAL,
232  MMCSD_CMD_TYPE_BUS_SUSPEND = CSL_MMC_CMD_CMD_TYPE_SUSPEND,
234  MMCSD_CMD_TYPE_FUNC_SEL = CSL_MMC_CMD_CMD_TYPE_RESUME,
236  MMCSD_CMD_TYPE_IO_ABORT = CSL_MMC_CMD_CMD_TYPE_ABORT
239 
241 typedef enum MMCSD_rspType_t
242 {
243  MMCSD_RSP_TYPE_NONE = CSL_MMC_CMD_RSP_TYPE_NORSP,
245  MMCSD_RSP_TYPE_LEN_136 = CSL_MMC_CMD_RSP_TYPE_LGHT36,
247  MMCSD_RSP_TYPE_LEN_48 = CSL_MMC_CMD_RSP_TYPE_LGHT48,
249  MMCSD_RSP_TYPE_LEN_48_BUSY = CSL_MMC_CMD_RSP_TYPE_LGHT48B
252 
254 typedef enum MMCSD_xFerType_t
255 {
256  MMCSD_XFER_TYPE_TX = CSL_MMC_CMD_DDIR_WRITE,
258  MMCSD_XFER_TYPE_RX = CSL_MMC_CMD_DDIR_READ
261 
263 typedef enum MMCSD_intrMask_t
264 {
265  MMCSD_INTR_MASK_BADACCESS = CSL_MMC_IE_BADA_ENABLE_MASK,
267  MMCSD_INTR_MASK_CARDERROR = CSL_MMC_IE_CERR_ENABLE_MASK,
269  MMCSD_INTR_MASK_ADMAERROR = CSL_MMC_IE_ADMAE_ENABLE_MASK,
271  MMCSD_INTR_MASK_ACMD12ERR = CSL_MMC_IE_ACE_ENABLE_MASK,
273  MMCSD_INTR_MASK_DATABITERR = CSL_MMC_IE_DEB_ENABLE_MASK,
275  MMCSD_INTR_MASK_DATACRCERR = CSL_MMC_IE_DCRC_ENABLE_MASK,
277  MMCSD_INTR_MASK_DATATIMEOUT = CSL_MMC_IE_DTO_ENABLE_MASK,
279  MMCSD_INTR_MASK_CMDINDXERR = CSL_MMC_IE_CIE_ENABLE_MASK,
281  MMCSD_INTR_MASK_CMDBITERR = CSL_MMC_IE_CEB_ENABLE_MASK,
283  MMCSD_INTR_MASK_CMDCRCERR = CSL_MMC_IE_CCRC_ENABLE_MASK,
285  MMCSD_INTR_MASK_CMDTIMEOUT = CSL_MMC_IE_CTO_ENABLE_MASK,
287  MMCSD_INTR_MASK_ERR = CSL_MMC_IE_NULL_MASK,
289  MMCSD_INTR_MASK_CARDREM = CSL_MMC_IE_CREM_ENABLE_MASK,
291  MMCSD_INTR_MASK_CARDINS = CSL_MMC_IE_CINS_ENABLE_MASK,
293  MMCSD_INTR_MASK_BUFRDRDY = CSL_MMC_IE_BRR_ENABLE_MASK,
295  MMCSD_INTR_MASK_BUFWRRDY = CSL_MMC_IE_BWR_ENABLE_MASK,
297  MMCSD_INTR_MASK_TRNFCOMP = CSL_MMC_IE_TC_ENABLE_MASK,
299  MMCSD_INTR_MASK_CMDCOMP = CSL_MMC_IE_CC_ENABLE_MASK
302 
304 typedef struct MMCSD_sysCfg_t
305 {
306  uint32_t clockActivity;
309  uint32_t standbyMode;
312  uint32_t idleMode;
315  uint32_t enableWakeup;
319  uint32_t enableAutoIdle;
323 }MMCSD_sysCfg;
324 
328 typedef struct MMCSD_cmd_t{
329  uint32_t cmdId;
331  uint32_t cmdType;
333  uint32_t rspType;
335  uint32_t xferType;
337 } MMCSD_cmd;
338 
340 typedef struct MMCSD_cmdObj_t
341 {
344  uint32_t cmdArg;
346  uint32_t enableData;
351  uint32_t numBlks;
355  uint32_t enableDma;
359 }MMCSD_cmdObj;
360 
362 typedef enum MMCSD_idleMode_t
363 {
364  MMCSD_IDLE_MODE_FORCE = CSL_MMC_SYSCONFIG_SIDLEMODE_FORCE,
366  MMCSD_IDLE_MODE_NONE = CSL_MMC_SYSCONFIG_SIDLEMODE_NOIDLE,
368  MMCSD_IDLE_MODE_SMART = CSL_MMC_SYSCONFIG_SIDLEMODE_SMART
371 
373 typedef enum MMCSD_busVolt_t
374 {
375  MMCSD_BUS_VOLT_1P8 = CSL_MMC_HCTL_SDVS__1V8,
377  MMCSD_BUS_VOLT_3P0 = CSL_MMC_HCTL_SDVS__3V0,
379  MMCSD_BUS_VOLT_3P3 = CSL_MMC_HCTL_SDVS__3V3
382 
383 typedef struct MMCSD_iodelayParams_s {
384  uint32_t deviceType;
385  uint32_t transferSpeed;
386  uint32_t operatingVoltage;
387  uint32_t loopBackType;
389 
390 typedef enum {
395 
400 typedef enum {
401  MMCSD_INPUT_CLOCK_CTRL_GET, /* Returns the input clock to MMC'n' */
402  MMCSD_INPUT_CLOCK_CTRL_SET /* Sets the input clock to MMC'n' as per a value */
404 
409 typedef int32_t (*MMCSD_iodelayFxn) (uint32_t instanceNum, MMCSD_ioDelayParams *iodelayParams);
410 
414 typedef int32_t (*MMCSD_switchVoltage) (uint32_t controllerNum, MMCSD_BusVoltage voltage);
415 
419 typedef uint32_t (*MMCSD_inputClockControl) (uint32_t instNum, uint32_t *clkFreq, MMCSD_inputClkCtrlMode_e);
420 
421 typedef struct
422 {
423  void* deviceData;
424  /* Pointer to eMMC/SD device data structure. Memory for this structure has to be allocated in application */
425 
426  uint8_t *dataBuf;
427  /* Pointer to a 512 byte dataBuffer used for temporary data transactions internal to driver like ECSD read, tuning etc. To be allocated by application */
428 
429 } MMCSD_Params;
430 
434 typedef struct
435 {
436  uint32_t ocr;
437  /* Operating conditions register */
438 
439  uint32_t rca;
440  /* Relative card address register */
441 
442  uint16_t maxReadBlockLen;
443  /* Maximum supported block length for read */
444 
446  /* Maximum supported block length for read */
447 
448  char manuDate[9];
449  /* ASCII string with the date of manufacture */
450 
451  uint8_t manuID;
452  /* Card manufacturer ID */
453 
454  char productName[7];
455  /* Product name */
456 
457  /* From CSD */
458  uint8_t specVersion;
459  /* eMMC specification version */
460 
461  uint32_t blockCount;
462  /* Number of blocks in the eMMC */
463 
464  uint8_t transferSpeed;
465  /* Transfer speed in code - Freq Unit x Mult Factor */
466 
467  uint8_t supportedModes;
468  /* Supported speed modes by the device - HS200, HS400 etc */
469 
470  uint8_t eStrobeSupport;
471  /* Support of enhanced strobe */
472 
473  uint8_t driveStrength;
474  /* Drive strength of the device */
475 
477 
481 typedef struct
482 {
483  uint32_t ocr;
484  /* Operating conditions register */
485 
486  uint32_t rca;
487  /* Relative card address register */
488 
489  uint16_t maxReadBlockLen;
490  /* Maximum supported block length for read */
491 
493  /* Maximum supported block length for read */
494 
495  char manuDate[9];
496  /* ASCII string with the date of manufacture */
497 
498  uint8_t manuID;
499  /* Card manufacturer ID */
500 
501  char productName[6];
502  /* Product name */
503 
504  /* From CSD */
505  uint8_t specVersion;
506  /* SD card specification version */
507 
508  uint32_t blockCount;
509  /* Number of blocks in the SD */
510 
511  uint8_t transferSpeed;
512  /* Transfer speed in code - Freq Unit x Mult Factor */
513 
514  uint32_t isCmd23;
515  /* CMD23 support */
516 
518  /* Supported data widths by the device */
519 
521 
529 typedef struct
530 {
531  uint32_t cmd;
534  uint32_t flags;
537  uint32_t arg;
540  void *dataBuf;
543  uint32_t blockSize;
546  uint32_t blockCount;
549  uint32_t response[4];
553 
557 typedef struct
558 {
559  uint32_t instNum;
560  /*< MMC Peripheral instance number */
561 
562  uint32_t baseAddr;
565  uint32_t intrNum;
568  uint32_t inputClk;
569  /*< MMC input functional clock */
570 
571  uint32_t outputClk;
572  /*< MMC output clock */
573 
574  uint32_t cardType;
583  uint32_t intrEnable;
584  /*< MMC enable interrupt */
585 
587  /*< MMC Voltage Switch function */
588 
593 
594  uint32_t dmaEnable;
595  /*EDMA related Hardware configuration details*/
596 
597 } MMCSD_Attrs;
598 
602 typedef struct
603 {
604  uint32_t cardType;
605  /*< Type of card. */
606 
610  uint32_t isOpen;
611  /*< flag to indicate module is open */
612 
613  uint32_t ocr;
614  /*< Operation condition register. */
615 
617  /*< Has the card switched to 1.8V */
618 
619  uint32_t rca;
620  /*< Relative card address. */
621 
622  uint32_t dataBlockCount;
623 
624  /*< Data dec. block counter */
625 
626  uint32_t dataBlockSize;
629  uint8_t support1_8V;
630  /*< Does card support 1.8V. */
631 
632  uint64_t size;
633  /*< Size of the card in bytes. */
634 
635  uint8_t highCap;
636  /*< Is card of high capacity. */
637 
638  uint8_t *dataBufIdx;
639  /*< Data buffer index */
640 
641  uint32_t cid[4];
644  volatile uint32_t cmdComp;
645  /*< Command completion flag */
646 
647  volatile uint32_t cmdTimeout;
648  /*< Command timeout flag */
649 
650  volatile uint32_t xferInProgress;
651  /*< Command completion flag */
652 
653  volatile uint32_t xferComp;
654  /*< Transfer completion flag */
655 
656  uint8_t tranSpeed;
657  /*< Transfer speed. */
658 
659  uint32_t csd[4];
660  /*< Card specific data. */
661 
662  uint32_t scr[2];
663  /*< First value of enumeration. Can be used for validation. */
664 
665  volatile uint32_t xferTimeout;
666  /*< Transfer timeout flag */
667 
668  uint8_t sdVer;
669  /*< Version of card. */
670 
671  uint32_t intrEnable;
672  /*< MMC enable interrupt */
673 
674  uint32_t dmaEnable;
680  uint8_t ecsd[512];
681  /*< eMMC specific data. */
682 
683  uint32_t blockSize;
686  uint8_t busWidth;
687  /*< Bus width. */
688 
689  uint8_t *writeBufIdx; /*< Internal inc. dataBuf index */
690 
691  uint32_t writeBlockCount; /*< Internal dec. blockCounter */
692 
693  uint8_t *readBufIdx; /*< Internal inc. dataBuf index */
694 
695  uint32_t readBlockCount; /*< Internal dec. blockCounter */
696 
697  uint32_t isHC;
716 } MMCSD_Object;
717 
718 typedef struct
719 {
724 } MMCSD_Config;
725 
726 /* ========================================================================== */
727 /* Externs */
728 /* ========================================================================== */
729 
731 extern MMCSD_Config gMmcsdConfig[];
733 extern uint32_t gMmcsdConfigNum;
734 
735 /* ========================================================================== */
736 /* Internal/Private Structure Declarations */
737 /* ========================================================================== */
738 
739 /* ========================================================================== */
740 /* Function Declarations */
741 /* ========================================================================== */
742 
746 void MMCSD_init(void);
747 
751 void MMCSD_deinit(void);
752 
758 void MMCSD_Params_init(MMCSD_Params *mmcsdParams);
759 
774 MMCSD_Handle MMCSD_open(uint32_t index, const MMCSD_Params *openParams);
775 
786 
800 
814 int32_t MMCSD_read(MMCSD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks);
815 
829 int32_t MMCSD_write(MMCSD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks);
830 
844 
858 
861 #ifdef __cplusplus
862 }
863 #endif
864 
865 #endif /* MMCSD_H_ */
MMCSD_sysCfg::enableAutoIdle
uint32_t enableAutoIdle
Definition: mmcsd/v1/mmcsd.h:319
MMCSD_Attrs::intrEnable
uint32_t intrEnable
Definition: mmcsd/v1/mmcsd.h:583
MMCSD_RESET_LINE_MASK_ALL
@ MMCSD_RESET_LINE_MASK_ALL
Definition: mmcsd/v1/mmcsd.h:176
MMCSD_CLK_ACT_FCLK_OFF
@ MMCSD_CLK_ACT_FCLK_OFF
Definition: mmcsd/v1/mmcsd.h:185
MMCSD_open
MMCSD_Handle MMCSD_open(uint32_t index, const MMCSD_Params *openParams)
This function opens a given MMCSD peripheral.
MMCSD_XFER_TYPE_TX
@ MMCSD_XFER_TYPE_TX
Definition: mmcsd/v1/mmcsd.h:256
MMCSD_SdDeviceData::ocr
uint32_t ocr
Definition: mmcsd/v1/mmcsd.h:483
MMCSD_inputClkCtrlMode_e
MMCSD_inputClkCtrlMode_e
ENUMs to read/configure the input clock to the MMC controller.
Definition: mmcsd/v1/mmcsd.h:400
MMCSD_CLK_ACT_ICLK_OFF
@ MMCSD_CLK_ACT_ICLK_OFF
Definition: mmcsd/v1/mmcsd.h:187
MMCSD_SdDeviceData::manuID
uint8_t manuID
Definition: mmcsd/v1/mmcsd.h:498
MMCSD_PWR_CTRL_OFF
@ MMCSD_PWR_CTRL_OFF
Definition: mmcsd/v1/mmcsd.h:212
MMCSD_Object::isHC
uint32_t isHC
Definition: mmcsd/v1/mmcsd.h:697
MMCSD_Object::dataCopyCompleteSemObj
SemaphoreP_Object dataCopyCompleteSemObj
Definition: mmcsd/v1/mmcsd.h:709
MMCSD_Config::attrs
MMCSD_Attrs * attrs
Definition: mmcsd/v1/mmcsd.h:720
MMCSD_INTR_MASK_CMDCOMP
@ MMCSD_INTR_MASK_CMDCOMP
Definition: mmcsd/v1/mmcsd.h:299
MMCSD_SdDeviceData::transferSpeed
uint8_t transferSpeed
Definition: mmcsd/v1/mmcsd.h:511
MMCSD_Attrs::instNum
uint32_t instNum
Definition: mmcsd/v1/mmcsd.h:559
MMCSD_Attrs::baseAddr
uint32_t baseAddr
Definition: mmcsd/v1/mmcsd.h:562
MMCSD_ioDelayParams::deviceType
uint32_t deviceType
Definition: mmcsd/v1/mmcsd.h:384
MMCSD_CMD_TYPE_IO_ABORT
@ MMCSD_CMD_TYPE_IO_ABORT
Definition: mmcsd/v1/mmcsd.h:236
MMCSD_Object::tranSpeed
uint8_t tranSpeed
Definition: mmcsd/v1/mmcsd.h:656
MMCSD_Object::highCap
uint8_t highCap
Definition: mmcsd/v1/mmcsd.h:635
MMCSD_EmmcDeviceData::blockCount
uint32_t blockCount
Definition: mmcsd/v1/mmcsd.h:461
MMCSD_IDLE_MODE_NONE
@ MMCSD_IDLE_MODE_NONE
Definition: mmcsd/v1/mmcsd.h:366
MMCSD_SdDeviceData
SD device properties.
Definition: mmcsd/v1/mmcsd.h:482
MMCSD_Object::dataBlockSize
uint32_t dataBlockSize
Definition: mmcsd/v1/mmcsd.h:626
MMCSD_INTR_MASK_ACMD12ERR
@ MMCSD_INTR_MASK_ACMD12ERR
Definition: mmcsd/v1/mmcsd.h:271
MMCSD_cmd::xferType
uint32_t xferType
Definition: mmcsd/v1/mmcsd.h:335
MMCSD_Transaction::cmd
uint32_t cmd
Definition: mmcsd/v1/mmcsd.h:531
MMCSD_EmmcDeviceData::rca
uint32_t rca
Definition: mmcsd/v1/mmcsd.h:439
MMCSD_BUS_VOLTAGE_1_8V
@ MMCSD_BUS_VOLTAGE_1_8V
Definition: mmcsd/v1/mmcsd.h:391
MMCSD_Object::cmdTimeout
volatile uint32_t cmdTimeout
Definition: mmcsd/v1/mmcsd.h:647
MMCSD_Transaction::blockSize
uint32_t blockSize
Definition: mmcsd/v1/mmcsd.h:543
SystemP.h
MMCSD_IDLE_MODE_SMART
@ MMCSD_IDLE_MODE_SMART
Definition: mmcsd/v1/mmcsd.h:368
MMCSD_Object::busWidth
uint8_t busWidth
Definition: mmcsd/v1/mmcsd.h:686
MMCSD_Object::xferMutex
SemaphoreP_Object xferMutex
Definition: mmcsd/v1/mmcsd.h:703
MMCSD_Object::cmdCompleteSemObj
SemaphoreP_Object cmdCompleteSemObj
Definition: mmcsd/v1/mmcsd.h:706
MMCSD_INTR_MASK_DATACRCERR
@ MMCSD_INTR_MASK_DATACRCERR
Definition: mmcsd/v1/mmcsd.h:275
MMCSD_Object::writeBufIdx
uint8_t * writeBufIdx
Definition: mmcsd/v1/mmcsd.h:689
MMCSD_ioDelayParams::loopBackType
uint32_t loopBackType
Definition: mmcsd/v1/mmcsd.h:387
MMCSD_SdDeviceData::specVersion
uint8_t specVersion
Definition: mmcsd/v1/mmcsd.h:505
MMCSD_xFerType
MMCSD_xFerType
Enumerates the list of response types.
Definition: mmcsd/v1/mmcsd.h:255
MMCSD_CLK_ACT_ICLK_FLCK_ON
@ MMCSD_CLK_ACT_ICLK_FLCK_ON
Definition: mmcsd/v1/mmcsd.h:189
MMCSD_INTR_MASK_TRNFCOMP
@ MMCSD_INTR_MASK_TRNFCOMP
Definition: mmcsd/v1/mmcsd.h:297
MMCSD_BUS_VOLT_3P0
@ MMCSD_BUS_VOLT_3P0
Definition: mmcsd/v1/mmcsd.h:377
MMCSD_INTR_MASK_CARDREM
@ MMCSD_INTR_MASK_CARDREM
Definition: mmcsd/v1/mmcsd.h:289
MMCSD_cmd
Structure for MMCSD command.
Definition: mmcsd/v1/mmcsd.h:328
MMCSD_INTR_MASK_DATABITERR
@ MMCSD_INTR_MASK_DATABITERR
Definition: mmcsd/v1/mmcsd.h:273
MMCSD_CMD_TYPE_BUS_SUSPEND
@ MMCSD_CMD_TYPE_BUS_SUSPEND
Definition: mmcsd/v1/mmcsd.h:232
MMCSD_Attrs::supportedBusWidth
uint32_t supportedBusWidth
Definition: mmcsd/v1/mmcsd.h:577
MMCSD_Object::xferCompleteSemObj
SemaphoreP_Object xferCompleteSemObj
Definition: mmcsd/v1/mmcsd.h:712
MMCSD_Attrs::supportedBusVoltages
uint32_t supportedBusVoltages
Definition: mmcsd/v1/mmcsd.h:580
MMCSD_STANDBY_MODE_FORCE
@ MMCSD_STANDBY_MODE_FORCE
Definition: mmcsd/v1/mmcsd.h:196
SemaphoreP.h
MMCSD_SdDeviceData::maxReadBlockLen
uint16_t maxReadBlockLen
Definition: mmcsd/v1/mmcsd.h:489
MMCSD_Object::isOpen
uint32_t isOpen
Definition: mmcsd/v1/mmcsd.h:610
MMCSD_Config::object
MMCSD_Object * object
Definition: mmcsd/v1/mmcsd.h:722
MMCSD_INTR_MASK_BADACCESS
@ MMCSD_INTR_MASK_BADACCESS
Definition: mmcsd/v1/mmcsd.h:265
MMCSD_Object::cardType
uint32_t cardType
Definition: mmcsd/v1/mmcsd.h:604
MMCSD_init
void MMCSD_init(void)
This function initializes the MMCSD module.
MMCSD_Attrs::outputClk
uint32_t outputClk
Definition: mmcsd/v1/mmcsd.h:571
MMCSD_suppVolt
MMCSD_suppVolt
Enumerates the list of supported bus voltages.
Definition: mmcsd/v1/mmcsd.h:218
MMCSD_RSP_TYPE_NONE
@ MMCSD_RSP_TYPE_NONE
Definition: mmcsd/v1/mmcsd.h:243
MMCSD_cmdObj::enableData
uint32_t enableData
Definition: mmcsd/v1/mmcsd.h:346
MMCSD_STANDBY_MODE_SMART_WAKEUP
@ MMCSD_STANDBY_MODE_SMART_WAKEUP
Definition: mmcsd/v1/mmcsd.h:202
MMCSD_ioDelayParams::operatingVoltage
uint32_t operatingVoltage
Definition: mmcsd/v1/mmcsd.h:386
MMCSD_sysCfg::enableWakeup
uint32_t enableWakeup
Definition: mmcsd/v1/mmcsd.h:315
MMCSD_cmdType
MMCSD_cmdType
Enumerates the list of command types.
Definition: mmcsd/v1/mmcsd.h:229
MMCSD_Transaction
MMCSD transaction.
Definition: mmcsd/v1/mmcsd.h:530
MMCSD_cmdObj
Structure holding the hs mmcsd controller command object.
Definition: mmcsd/v1/mmcsd.h:341
MMCSD_CMD_TYPE_OTHER
@ MMCSD_CMD_TYPE_OTHER
Definition: mmcsd/v1/mmcsd.h:230
MMCSD_pwrCtrl
MMCSD_pwrCtrl
Enumerates macros to configure power on/off.
Definition: mmcsd/v1/mmcsd.h:209
MMCSD_STANDBY_MODE_NONE
@ MMCSD_STANDBY_MODE_NONE
Definition: mmcsd/v1/mmcsd.h:198
MMCSD_Attrs::inputClk
uint32_t inputClk
Definition: mmcsd/v1/mmcsd.h:568
MMCSD_EmmcDeviceData::eStrobeSupport
uint8_t eStrobeSupport
Definition: mmcsd/v1/mmcsd.h:470
MMCSD_EmmcDeviceData::manuID
uint8_t manuID
Definition: mmcsd/v1/mmcsd.h:451
MMCSD_cmd::cmdId
uint32_t cmdId
Definition: mmcsd/v1/mmcsd.h:329
MMCSD_Object::size
uint64_t size
Definition: mmcsd/v1/mmcsd.h:632
MMCSD_Attrs::cardType
uint32_t cardType
Definition: mmcsd/v1/mmcsd.h:574
MMCSD_switchVoltage
int32_t(* MMCSD_switchVoltage)(uint32_t controllerNum, MMCSD_BusVoltage voltage)
A function pointer to set the voltage of the MMC I/O Cells and PBAIS to the desired voltage.
Definition: mmcsd/v1/mmcsd.h:414
MMCSD_SdDeviceData::isCmd23
uint32_t isCmd23
Definition: mmcsd/v1/mmcsd.h:514
MMCSD_EmmcDeviceData::specVersion
uint8_t specVersion
Definition: mmcsd/v1/mmcsd.h:458
MMCSD_EmmcDeviceData::ocr
uint32_t ocr
Definition: mmcsd/v1/mmcsd.h:436
MMCSD_BUS_VOLT_1P8
@ MMCSD_BUS_VOLT_1P8
Definition: mmcsd/v1/mmcsd.h:375
MMCSD_read
int32_t MMCSD_read(MMCSD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
Function to perform block reads from the MMC/SD media.
gMmcsdConfigNum
uint32_t gMmcsdConfigNum
Externally defined driver configuration array size.
MMCSD_IDLE_MODE_FORCE
@ MMCSD_IDLE_MODE_FORCE
Definition: mmcsd/v1/mmcsd.h:364
HwiP.h
MMCSD_Attrs::intrNum
uint32_t intrNum
Definition: mmcsd/v1/mmcsd.h:565
MMCSD_INTR_MASK_DATATIMEOUT
@ MMCSD_INTR_MASK_DATATIMEOUT
Definition: mmcsd/v1/mmcsd.h:277
MMCSD_Attrs::dmaEnable
uint32_t dmaEnable
Definition: mmcsd/v1/mmcsd.h:594
MMCSD_SUPP_VOLT_3P0
@ MMCSD_SUPP_VOLT_3P0
Definition: mmcsd/v1/mmcsd.h:221
MMCSD_INTR_MASK_ERR
@ MMCSD_INTR_MASK_ERR
Definition: mmcsd/v1/mmcsd.h:287
MMCSD_busVolt
MMCSD_busVolt
Enumerates mmc sd controller's bus voltages.
Definition: mmcsd/v1/mmcsd.h:374
MMCSD_clkAct
MMCSD_clkAct
Enumerates the clock activity configurations during wake up .
Definition: mmcsd/v1/mmcsd.h:182
MMCSD_Transaction::flags
uint32_t flags
Definition: mmcsd/v1/mmcsd.h:534
MMCSD_Object::hwiObj
HwiP_Object hwiObj
Definition: mmcsd/v1/mmcsd.h:677
MMCSD_Attrs::iodelayFxn
MMCSD_iodelayFxn iodelayFxn
Definition: mmcsd/v1/mmcsd.h:586
MMCSD_getBlockCount
uint32_t MMCSD_getBlockCount(MMCSD_Handle handle)
This function returns the block count of User Data Area of the MMC/SD media connected to the MMCSD co...
MMCSD_BUS_VOLT_3P3
@ MMCSD_BUS_VOLT_3P3
Definition: mmcsd/v1/mmcsd.h:379
MMCSD_cmdObj::enableDma
uint32_t enableDma
Definition: mmcsd/v1/mmcsd.h:355
MMCSD_rspType
MMCSD_rspType
Enumerates the list of response types.
Definition: mmcsd/v1/mmcsd.h:242
MMCSD_SdDeviceData::rca
uint32_t rca
Definition: mmcsd/v1/mmcsd.h:486
MMCSD_RSP_TYPE_LEN_48_BUSY
@ MMCSD_RSP_TYPE_LEN_48_BUSY
Definition: mmcsd/v1/mmcsd.h:249
MMCSD_XFER_TYPE_RX
@ MMCSD_XFER_TYPE_RX
Definition: mmcsd/v1/mmcsd.h:258
MMCSD_EmmcDeviceData::supportedModes
uint8_t supportedModes
Definition: mmcsd/v1/mmcsd.h:467
MMCSD_Params::dataBuf
uint8_t * dataBuf
Definition: mmcsd/v1/mmcsd.h:426
MMCSD_Object::readBufIdx
uint8_t * readBufIdx
Definition: mmcsd/v1/mmcsd.h:693
MMCSD_resetLineMask
MMCSD_resetLineMask
MMCSD instance attributes - used during init time.
Definition: mmcsd/v1/mmcsd.h:171
MMCSD_Attrs::inputClockControl
MMCSD_inputClockControl inputClockControl
Definition: mmcsd/v1/mmcsd.h:592
MMCSD_Handle
void * MMCSD_Handle
Definition: mmcsd/v1/mmcsd.h:157
MMCSD_INTR_MASK_CMDINDXERR
@ MMCSD_INTR_MASK_CMDINDXERR
Definition: mmcsd/v1/mmcsd.h:279
MMCSD_BUS_VOLTAGE_3_0V
@ MMCSD_BUS_VOLTAGE_3_0V
Definition: mmcsd/v1/mmcsd.h:392
MMCSD_Object::xferInProgress
volatile uint32_t xferInProgress
Definition: mmcsd/v1/mmcsd.h:650
MMCSD_Params
Definition: mmcsd/v1/mmcsd.h:422
MMCSD_getBlockSize
uint32_t MMCSD_getBlockSize(MMCSD_Handle handle)
This function returns the block size of the MMC/SD media connected to the MMCSD controller.
MMCSD_INPUT_CLOCK_CTRL_GET
@ MMCSD_INPUT_CLOCK_CTRL_GET
Definition: mmcsd/v1/mmcsd.h:401
MMCSD_Object::dataBlockCount
uint32_t dataBlockCount
Definition: mmcsd/v1/mmcsd.h:622
MMCSD_EmmcDeviceData
eMMC device properties
Definition: mmcsd/v1/mmcsd.h:435
MMCSD_BUS_VOLTAGE_3_3V
@ MMCSD_BUS_VOLTAGE_3_3V
Definition: mmcsd/v1/mmcsd.h:393
MMCSD_SUPP_VOLT_3P3
@ MMCSD_SUPP_VOLT_3P3
Definition: mmcsd/v1/mmcsd.h:223
MMCSD_deinit
void MMCSD_deinit(void)
This function de-initializes the MMCSD module.
MMCSD_cmdObj::cmd
MMCSD_cmd cmd
Definition: mmcsd/v1/mmcsd.h:342
MMCSD_EmmcDeviceData::maxReadBlockLen
uint16_t maxReadBlockLen
Definition: mmcsd/v1/mmcsd.h:442
MMCSD_Object
MMCSD driver object.
Definition: mmcsd/v1/mmcsd.h:603
MMCSD_sysCfg::idleMode
uint32_t idleMode
Definition: mmcsd/v1/mmcsd.h:312
MMCSD_Object::xferComp
volatile uint32_t xferComp
Definition: mmcsd/v1/mmcsd.h:653
MMCSD_INTR_MASK_CMDCRCERR
@ MMCSD_INTR_MASK_CMDCRCERR
Definition: mmcsd/v1/mmcsd.h:283
MMCSD_EmmcDeviceData::transferSpeed
uint8_t transferSpeed
Definition: mmcsd/v1/mmcsd.h:464
MMCSD_SdDeviceData::supportedDataWidths
uint32_t supportedDataWidths
Definition: mmcsd/v1/mmcsd.h:517
MMCSD_iodelayFxn
int32_t(* MMCSD_iodelayFxn)(uint32_t instanceNum, MMCSD_ioDelayParams *iodelayParams)
Return status of MMCSD.
Definition: mmcsd/v1/mmcsd.h:409
MMCSD_Params_init
void MMCSD_Params_init(MMCSD_Params *mmcsdParams)
Initialize data structure with defaults.
MMCSD_RSP_TYPE_LEN_136
@ MMCSD_RSP_TYPE_LEN_136
Definition: mmcsd/v1/mmcsd.h:245
MMCSD_Transaction::dataBuf
void * dataBuf
Definition: mmcsd/v1/mmcsd.h:540
HwiP_Object
Opaque Hwi object used with the Hwi APIs.
Definition: HwiP.h:91
MMCSD_Object::handle
MMCSD_Handle handle
Definition: mmcsd/v1/mmcsd.h:607
MMCSD_cmdObj::numBlks
uint32_t numBlks
Definition: mmcsd/v1/mmcsd.h:351
MMCSD_Params::deviceData
void * deviceData
Definition: mmcsd/v1/mmcsd.h:423
MMCSD_INTR_MASK_CMDTIMEOUT
@ MMCSD_INTR_MASK_CMDTIMEOUT
Definition: mmcsd/v1/mmcsd.h:285
MMCSD_EmmcDeviceData::maxWriteBlockLen
uint16_t maxWriteBlockLen
Definition: mmcsd/v1/mmcsd.h:445
MMCSD_Object::rca
uint32_t rca
Definition: mmcsd/v1/mmcsd.h:619
MMCSD_INTR_MASK_CARDERROR
@ MMCSD_INTR_MASK_CARDERROR
Definition: mmcsd/v1/mmcsd.h:267
MMCSD_INTR_MASK_CMDBITERR
@ MMCSD_INTR_MASK_CMDBITERR
Definition: mmcsd/v1/mmcsd.h:281
MMCSD_Transaction::arg
uint32_t arg
Definition: mmcsd/v1/mmcsd.h:537
MMCSD_Object::sdVer
uint8_t sdVer
Definition: mmcsd/v1/mmcsd.h:668
MMCSD_Config
Definition: mmcsd/v1/mmcsd.h:719
MMCSD_BusVoltage
MMCSD_BusVoltage
Definition: mmcsd/v1/mmcsd.h:390
MMCSD_Transaction::blockCount
uint32_t blockCount
Definition: mmcsd/v1/mmcsd.h:546
SemaphoreP_Object
Opaque semaphore object used with the semaphore APIs.
Definition: SemaphoreP.h:59
MMCSD_sysCfg::standbyMode
uint32_t standbyMode
Definition: mmcsd/v1/mmcsd.h:309
MMCSD_cmdObj::cmdArg
uint32_t cmdArg
Definition: mmcsd/v1/mmcsd.h:344
gMmcsdConfig
MMCSD_Config gMmcsdConfig[]
Externally defined driver configuration array.
MMCSD_RSP_TYPE_LEN_48
@ MMCSD_RSP_TYPE_LEN_48
Definition: mmcsd/v1/mmcsd.h:247
MMCSD_ioDelayParams
Definition: mmcsd/v1/mmcsd.h:383
MMCSD_Attrs
MMCSD instance attributes - used during init time.
Definition: mmcsd/v1/mmcsd.h:558
MMCSD_ioDelayParams::transferSpeed
uint32_t transferSpeed
Definition: mmcsd/v1/mmcsd.h:385
MMCSD_RESET_LINE_MASK_DATA
@ MMCSD_RESET_LINE_MASK_DATA
Definition: mmcsd/v1/mmcsd.h:172
MMCSD_sysCfg::clockActivity
uint32_t clockActivity
Definition: mmcsd/v1/mmcsd.h:306
MMCSD_SUPP_VOLT_1P8
@ MMCSD_SUPP_VOLT_1P8
Definition: mmcsd/v1/mmcsd.h:219
MMCSD_SdDeviceData::blockCount
uint32_t blockCount
Definition: mmcsd/v1/mmcsd.h:508
MMCSD_close
void MMCSD_close(MMCSD_Handle handle)
Function to close a MMCSD peripheral specified by the MMCSD handle.
MMCSD_STANDBY_MODE_SMART
@ MMCSD_STANDBY_MODE_SMART
Definition: mmcsd/v1/mmcsd.h:200
MMCSD_CMD_TYPE_FUNC_SEL
@ MMCSD_CMD_TYPE_FUNC_SEL
Definition: mmcsd/v1/mmcsd.h:234
MMCSD_Object::cmdMutex
SemaphoreP_Object cmdMutex
Definition: mmcsd/v1/mmcsd.h:700
MMCSD_Attrs::switchVoltageFxn
MMCSD_switchVoltage switchVoltageFxn
Definition: mmcsd/v1/mmcsd.h:589
MMCSD_INTR_MASK_BUFRDRDY
@ MMCSD_INTR_MASK_BUFRDRDY
Definition: mmcsd/v1/mmcsd.h:293
MMCSD_cmd::cmdType
uint32_t cmdType
Definition: mmcsd/v1/mmcsd.h:331
MMCSD_Object::xferTimeout
volatile uint32_t xferTimeout
Definition: mmcsd/v1/mmcsd.h:665
MMCSD_cmd::rspType
uint32_t rspType
Definition: mmcsd/v1/mmcsd.h:333
MMCSD_Object::ocr
uint32_t ocr
Definition: mmcsd/v1/mmcsd.h:613
MMCSD_RESET_LINE_MASK_CMD
@ MMCSD_RESET_LINE_MASK_CMD
Definition: mmcsd/v1/mmcsd.h:174
MMCSD_Object::intrEnable
uint32_t intrEnable
Definition: mmcsd/v1/mmcsd.h:671
MMCSD_Object::readBlockCount
uint32_t readBlockCount
Definition: mmcsd/v1/mmcsd.h:695
MMCSD_idleMode
MMCSD_idleMode
Enumerates the idle modes.
Definition: mmcsd/v1/mmcsd.h:363
MMCSD_write
int32_t MMCSD_write(MMCSD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
Function to perform block writes to the MMC/SD media.
MMCSD_Object::cmdComp
volatile uint32_t cmdComp
Definition: mmcsd/v1/mmcsd.h:644
MMCSD_getHandle
MMCSD_Handle MMCSD_getHandle(uint32_t index)
This function returns the handle of an open MMCSD Instance from the instance index.
MMCSD_intrMask
MMCSD_intrMask
Enumerates the controller's interrupt masks.
Definition: mmcsd/v1/mmcsd.h:264
MMCSD_Object::support1_8V
uint8_t support1_8V
Definition: mmcsd/v1/mmcsd.h:629
MMCSD_CLK_ACT_ICLK_FCLK_OFF
@ MMCSD_CLK_ACT_ICLK_FCLK_OFF
Definition: mmcsd/v1/mmcsd.h:183
MMCSD_Object::dmaEnable
uint32_t dmaEnable
Definition: mmcsd/v1/mmcsd.h:674
MMCSD_EmmcDeviceData::driveStrength
uint8_t driveStrength
Definition: mmcsd/v1/mmcsd.h:473
MMCSD_sysCfg
Structure holding the hs mmcsd controller system configurations.
Definition: mmcsd/v1/mmcsd.h:305
MMCSD_standbyMode
MMCSD_standbyMode
Enumerates the standby modes.
Definition: mmcsd/v1/mmcsd.h:195
MMCSD_Object::switched_to_v18
uint8_t switched_to_v18
Definition: mmcsd/v1/mmcsd.h:616
MMCSD_inputClockControl
uint32_t(* MMCSD_inputClockControl)(uint32_t instNum, uint32_t *clkFreq, MMCSD_inputClkCtrlMode_e)
A function pointer to read/configure the input clock to the MMC controller.
Definition: mmcsd/v1/mmcsd.h:419
MMCSD_Object::dataBufIdx
uint8_t * dataBufIdx
Definition: mmcsd/v1/mmcsd.h:638
MMCSD_INTR_MASK_ADMAERROR
@ MMCSD_INTR_MASK_ADMAERROR
Definition: mmcsd/v1/mmcsd.h:269
MMCSD_Object::writeBlockCount
uint32_t writeBlockCount
Definition: mmcsd/v1/mmcsd.h:691
MMCSD_INTR_MASK_BUFWRRDY
@ MMCSD_INTR_MASK_BUFWRRDY
Definition: mmcsd/v1/mmcsd.h:295
MMCSD_Object::blockSize
uint32_t blockSize
Definition: mmcsd/v1/mmcsd.h:683
MMCSD_PWR_CTRL_ON
@ MMCSD_PWR_CTRL_ON
Definition: mmcsd/v1/mmcsd.h:210
MMCSD_INPUT_CLOCK_CTRL_SET
@ MMCSD_INPUT_CLOCK_CTRL_SET
Definition: mmcsd/v1/mmcsd.h:402
MMCSD_INTR_MASK_CARDINS
@ MMCSD_INTR_MASK_CARDINS
Definition: mmcsd/v1/mmcsd.h:291
MMCSD_SdDeviceData::maxWriteBlockLen
uint16_t maxWriteBlockLen
Definition: mmcsd/v1/mmcsd.h:492