Merge pull request #12 from embassy-rs/sdmmc-v2

Initial sdmmc_v2 support
This commit is contained in:
Dario Nieuwenhuis 2021-05-06 17:35:03 +02:00 committed by GitHub
commit a7d47fe78b
2 changed files with 670 additions and 0 deletions

View File

@ -0,0 +1,669 @@
---
block/SDMMC:
description: SDMMC
items:
- name: POWER
description: SDMMC power control register
byte_offset: 0
fieldset: POWER
- name: CLKCR
description: "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."
byte_offset: 4
fieldset: CLKCR
- name: ARGR
description: "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."
byte_offset: 8
fieldset: ARGR
- name: CMDR
description: The SDMMC_CMDR register contains the command index and command type bits. The command index is sent to a card as part of a command message. The command type bits control the command path state machine (CPSM).
byte_offset: 12
fieldset: CMDR
- name: RESPCMDR
description: SDMMC command response register
byte_offset: 16
access: Read
fieldset: RESPCMDR
- name: RESPR
description: "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."
array:
len: 4
stride: 4
byte_offset: 20
access: Read
fieldset: RESP1R
- name: DTIMER
description: "The SDMMC_DTIMER register contains the data timeout period, in card bus clock periods. A counter loads the value from the SDMMC_DTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_R or Busy state. If the timer reaches 0 while the DPSM is in either of these states, the timeout status flag is set."
byte_offset: 36
fieldset: DTIMER
- name: DLENR
description: The SDMMC_DLENR register contains the number of data bytes to be transferred. The value is loaded into the data counter when data transfer starts.
byte_offset: 40
fieldset: DLENR
- name: DCTRL
description: The SDMMC_DCTRL register control the data path state machine (DPSM).
byte_offset: 44
fieldset: DCTRL
- name: DCNTR
description: "The SDMMC_DCNTR register loads the value from the data length register (see SDMMC_DLENR) when the DPSM moves from the Idle state to the Wait_R or Wait_S state. As data is transferred, the counter decrements the value until it reaches 0. The DPSM then moves to the Idle state and when there has been no error, the data status end flag (DATAEND) is set."
byte_offset: 48
access: Read
fieldset: DCNTR
- name: STAR
description: "The SDMMC_STAR register is a read-only register. It contains two types of flag:Static flags (bits [29,21,11:0]): these bits remain asserted until they are cleared by writing to the SDMMC interrupt Clear register (see SDMMC_ICR)Dynamic flags (bits [20:12]): these bits change state depending on the state of the underlying logic (for example, FIFO full and empty flags are asserted and de-asserted as data while written to the FIFO)"
byte_offset: 52
access: Read
fieldset: STAR
- name: ICR
description: The SDMMC_ICR register is a write-only register. Writing a bit with 1 clears the corresponding bit in the SDMMC_STAR status register.
byte_offset: 56
fieldset: ICR
- name: MASKR
description: The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1.
byte_offset: 60
fieldset: MASKR
- name: ACKTIMER
description: "The SDMMC_ACKTIMER register contains the acknowledgment timeout period, in SDMMC_CK bus clock periods. A counter loads the value from the SDMMC_ACKTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_Ack state. If the timer reaches 0 while the DPSM is in this states, the acknowledgment timeout status flag is set."
byte_offset: 64
fieldset: ACKTIMER
- name: IDMACTRLR
description: The receive and transmit FIFOs can be read or written as 32-bit wide registers. The FIFOs contain 32 entries on 32 sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO.
byte_offset: 80
fieldset: IDMACTRLR
- name: IDMABSIZER
description: The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration.
byte_offset: 84
fieldset: IDMABSIZER
- name: IDMABASE0R
description: The SDMMC_IDMABASE0R register contains the memory buffer base address in single buffer configuration and the buffer 0 base address in double buffer configuration.
byte_offset: 88
fieldset: IDMABASE0R
- name: IDMABASE1R
description: The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address.
byte_offset: 92
fieldset: IDMABASE1R
- name: FIFOR
description: The receive and transmit FIFOs can be only read or written as word (32-bit) wide registers. The FIFOs contain 16 entries on sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO.When accessing SDMMC_FIFOR with half word or byte access an AHB bus fault is generated.
byte_offset: 128
fieldset: FIFOR
- name: VER
description: SDMMC IP version register
byte_offset: 1012
access: Read
fieldset: VER
- name: ID
description: SDMMC IP identification register
byte_offset: 1016
access: Read
fieldset: ID
fieldset/ACKTIMER:
description: "The SDMMC_ACKTIMER register contains the acknowledgment timeout period, in SDMMC_CK bus clock periods. A counter loads the value from the SDMMC_ACKTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_Ack state. If the timer reaches 0 while the DPSM is in this states, the acknowledgment timeout status flag is set."
fields:
- name: ACKTIME
description: Boot acknowledgment timeout period This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). Boot acknowledgment timeout period expressed in card bus clock periods.
bit_offset: 0
bit_size: 25
fieldset/ARGR:
description: "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."
fields:
- name: CMDARG
description: "Command argument. These bits can only be written by firmware when CPSM is disabled (CPSMEN = 0). Command argument sent to a card as part of a command message. If a command contains an argument, it must be loaded into this register before writing a command to the command register."
bit_offset: 0
bit_size: 32
fieldset/CLKCR:
description: "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."
fields:
- name: CLKDIV
description: "Clock divide factor This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). This field defines the divide factor between the input clock (SDMMCCLK) and the output clock (SDMMC_CK): SDMMC_CK frequency = SDMMCCLK / [2 * CLKDIV]. 0xx: etc.. xxx: etc.."
bit_offset: 0
bit_size: 10
- name: PWRSAV
description: "Power saving configuration bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) For power saving, the SDMMC_CK clock output can be disabled when the bus is idle by setting PWRSAV:"
bit_offset: 12
bit_size: 1
- name: WIDBUS
description: Wide bus mode enable bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)
bit_offset: 14
bit_size: 2
- name: NEGEDGE
description: "SDMMC_CK dephasing selection bit for data and Command. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). When clock division = 1 (CLKDIV = 0), this bit has no effect. Data and Command change on SDMMC_CK falling edge. When clock division >1 (CLKDIV > 0) & DDR = 0: - SDMMC_CK edge occurs on SDMMCCLK rising edge. When clock division >1 (CLKDIV > 0) & DDR = 1: - Data changed on the SDMMCCLK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge. - Data changed on the SDMMC_CK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge."
bit_offset: 16
bit_size: 1
- name: HWFC_EN
description: "Hardware flow control enable This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) When Hardware flow control is enabled, the meaning of the TXFIFOE and RXFIFOF flags change, please see SDMMC status register definition in Section56.8.11."
bit_offset: 17
bit_size: 1
- name: DDR
description: Data rate signaling selection This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) DDR rate shall only be selected with 4-bit or 8-bit wide bus mode. (WIDBUS > 00). DDR = 1 has no effect when WIDBUS = 00 (1-bit wide bus). DDR rate shall only be selected with clock division >1. (CLKDIV > 0)
bit_offset: 18
bit_size: 1
- name: BUSSPEED
description: "Bus speed mode selection between DS, HS, SDR12, SDR25 and SDR50, DDR50, SDR104. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"
bit_offset: 19
bit_size: 1
- name: SELCLKRX
description: Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)
bit_offset: 20
bit_size: 2
fieldset/CMDR:
description: The SDMMC_CMDR register contains the command index and command type bits. The command index is sent to a card as part of a command message. The command type bits control the command path state machine (CPSM).
fields:
- name: CMDINDEX
description: Command index. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). The command index is sent to the card as part of a command message.
bit_offset: 0
bit_size: 6
- name: CMDTRANS
description: "The CPSM treats the command as a data transfer command, stops the interrupt period, and signals DataEnable to the DPSM This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues an end of interrupt period and issues DataEnable signal to the DPSM when the command is sent."
bit_offset: 6
bit_size: 1
- name: CMDSTOP
description: "The CPSM treats the command as a Stop Transmission command and signals Abort to the DPSM. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues the Abort signal to the DPSM when the command is sent."
bit_offset: 7
bit_size: 1
- name: WAITRESP
description: "Wait for response bits. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). They are used to configure whether the CPSM is to wait for a response, and if yes, which kind of response."
bit_offset: 8
bit_size: 2
- name: WAITINT
description: "CPSM waits for interrupt request. If this bit is set, the CPSM disables command timeout and waits for an card interrupt request (Response). If this bit is cleared in the CPSM Wait state, will cause the abort of the interrupt mode."
bit_offset: 10
bit_size: 1
- name: WAITPEND
description: "CPSM Waits for end of data transfer (CmdPend internal signal) from DPSM. This bit when set, the CPSM waits for the end of data transfer trigger before it starts sending a command. WAITPEND is only taken into account when DTMODE = MMC stream data transfer, WIDBUS = 1-bit wide bus mode, DPSMACT = 1 and DTDIR = from host to card."
bit_offset: 11
bit_size: 1
- name: CPSMEN
description: "Command path state machine (CPSM) Enable bit This bit is written 1 by firmware, and cleared by hardware when the CPSM enters the Idle state. If this bit is set, the CPSM is enabled. When DTEN = 1, no command will be transfered nor boot procedure will be started. CPSMEN is cleared to 0."
bit_offset: 12
bit_size: 1
- name: DTHOLD
description: "Hold new data block transmission and reception in the DPSM. If this bit is set, the DPSM will not move from the Wait_S state to the Send state or from the Wait_R state to the Receive state."
bit_offset: 13
bit_size: 1
- name: BOOTMODE
description: Select the boot mode procedure to be used. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0)
bit_offset: 14
bit_size: 1
- name: BOOTEN
description: Enable boot mode procedure.
bit_offset: 15
bit_size: 1
- name: CMDSUSPEND
description: "The CPSM treats the command as a Suspend or Resume command and signals interrupt period start/end. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). CMDSUSPEND = 1 and CMDTRANS = 0 Suspend command, start interrupt period when response bit BS=0. CMDSUSPEND = 1 and CMDTRANS = 1 Resume command with data, end interrupt period when response bit DF=1."
bit_offset: 16
bit_size: 1
fieldset/DCNTR:
description: "The SDMMC_DCNTR register loads the value from the data length register (see SDMMC_DLENR) when the DPSM moves from the Idle state to the Wait_R or Wait_S state. As data is transferred, the counter decrements the value until it reaches 0. The DPSM then moves to the Idle state and when there has been no error, the data status end flag (DATAEND) is set."
fields:
- name: DATACOUNT
description: "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."
bit_offset: 0
bit_size: 25
fieldset/DCTRL:
description: The SDMMC_DCTRL register control the data path state machine (DPSM).
fields:
- name: DTEN
description: "Data transfer enable bit This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). This bit is cleared by Hardware when data transfer completes. This bit shall only be used to transfer data when no associated data transfer command is used, i.e. shall not be used with SD or eMMC cards."
bit_offset: 0
bit_size: 1
- name: DTDIR
description: Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0).
bit_offset: 1
bit_size: 1
- name: DTMODE
description: Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0).
bit_offset: 2
bit_size: 2
- name: DBLOCKSIZE
description: "Data block size This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). Define the data block length when the block data transfer mode is selected: When DATALENGTH is not a multiple of DBLOCKSIZE, the transfered data is truncated at a multiple of DBLOCKSIZE. (Any remain data will not be transfered.) When DDR = 1, DBLOCKSIZE = 0000 shall not be used. (No data will be transfered)"
bit_offset: 4
bit_size: 4
- name: RWSTART
description: "Read wait start. If this bit is set, read wait operation starts."
bit_offset: 8
bit_size: 1
- name: RWSTOP
description: Read wait stop This bit is written by firmware and auto cleared by hardware when the DPSM moves from the READ_WAIT state to the WAIT_R or IDLE state.
bit_offset: 9
bit_size: 1
- name: RWMOD
description: Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0).
bit_offset: 10
bit_size: 1
- name: SDIOEN
description: "SD I/O interrupt enable functions This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). If this bit is set, the DPSM enables the SD I/O card specific interrupt operation."
bit_offset: 11
bit_size: 1
- name: BOOTACKEN
description: Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0).
bit_offset: 12
bit_size: 1
- name: FIFORST
description: "FIFO reset, will flush any remaining data. This bit can only be written by firmware when IDMAEN= 0 and DPSM is active (DPSMACT = 1). This bit will only take effect when a transfer error or transfer hold occurs."
bit_offset: 13
bit_size: 1
fieldset/DLENR:
description: The SDMMC_DLENR register contains the number of data bytes to be transferred. The value is loaded into the data counter when data transfer starts.
fields:
- name: DATALENGTH
description: "Data length value This register can only be written by firmware when DPSM is inactive (DPSMACT = 0). Number of data bytes to be transferred. When DDR = 1 DATALENGTH is truncated to a multiple of 2. (The last odd byte is not transfered) When DATALENGTH = 0 no data will be transfered, when requested by a CPSMEN and CMDTRANS = 1 also no command will be transfered. DTEN and CPSMEN are cleared to 0."
bit_offset: 0
bit_size: 25
fieldset/DTIMER:
description: "The SDMMC_DTIMER register contains the data timeout period, in card bus clock periods. A counter loads the value from the SDMMC_DTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_R or Busy state. If the timer reaches 0 while the DPSM is in either of these states, the timeout status flag is set."
fields:
- name: DATATIME
description: Data and R1b busy timeout period This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). Data and R1b busy timeout period expressed in card bus clock periods.
bit_offset: 0
bit_size: 32
fieldset/FIFOR:
description: The receive and transmit FIFOs can be only read or written as word (32-bit) wide registers. The FIFOs contain 16 entries on sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO.When accessing SDMMC_FIFOR with half word or byte access an AHB bus fault is generated.
fields:
- name: FIFODATA
description: Receive and transmit FIFO data This register can only be read or written by firmware when the DPSM is active (DPSMACT=1). The FIFO data occupies 16 entries of 32-bit words.
bit_offset: 0
bit_size: 32
fieldset/ICR:
description: The SDMMC_ICR register is a write-only register. Writing a bit with 1 clears the corresponding bit in the SDMMC_STAR status register.
fields:
- name: CCRCFAILC
description: CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag.
bit_offset: 0
bit_size: 1
- name: DCRCFAILC
description: DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag.
bit_offset: 1
bit_size: 1
- name: CTIMEOUTC
description: CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag.
bit_offset: 2
bit_size: 1
- name: DTIMEOUTC
description: DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag.
bit_offset: 3
bit_size: 1
- name: TXUNDERRC
description: TXUNDERR flag clear bit Set by software to clear TXUNDERR flag.
bit_offset: 4
bit_size: 1
- name: RXOVERRC
description: RXOVERR flag clear bit Set by software to clear the RXOVERR flag.
bit_offset: 5
bit_size: 1
- name: CMDRENDC
description: CMDREND flag clear bit Set by software to clear the CMDREND flag.
bit_offset: 6
bit_size: 1
- name: CMDSENTC
description: CMDSENT flag clear bit Set by software to clear the CMDSENT flag.
bit_offset: 7
bit_size: 1
- name: DATAENDC
description: DATAEND flag clear bit Set by software to clear the DATAEND flag.
bit_offset: 8
bit_size: 1
- name: DHOLDC
description: DHOLD flag clear bit Set by software to clear the DHOLD flag.
bit_offset: 9
bit_size: 1
- name: DBCKENDC
description: DBCKEND flag clear bit Set by software to clear the DBCKEND flag.
bit_offset: 10
bit_size: 1
- name: DABORTC
description: DABORT flag clear bit Set by software to clear the DABORT flag.
bit_offset: 11
bit_size: 1
- name: BUSYD0ENDC
description: BUSYD0END flag clear bit Set by software to clear the BUSYD0END flag.
bit_offset: 21
bit_size: 1
- name: SDIOITC
description: SDIOIT flag clear bit Set by software to clear the SDIOIT flag.
bit_offset: 22
bit_size: 1
- name: ACKFAILC
description: ACKFAIL flag clear bit Set by software to clear the ACKFAIL flag.
bit_offset: 23
bit_size: 1
- name: ACKTIMEOUTC
description: ACKTIMEOUT flag clear bit Set by software to clear the ACKTIMEOUT flag.
bit_offset: 24
bit_size: 1
- name: VSWENDC
description: VSWEND flag clear bit Set by software to clear the VSWEND flag.
bit_offset: 25
bit_size: 1
- name: CKSTOPC
description: CKSTOP flag clear bit Set by software to clear the CKSTOP flag.
bit_offset: 26
bit_size: 1
- name: IDMATEC
description: IDMA transfer error clear bit Set by software to clear the IDMATE flag.
bit_offset: 27
bit_size: 1
- name: IDMABTCC
description: IDMA buffer transfer complete clear bit Set by software to clear the IDMABTC flag.
bit_offset: 28
bit_size: 1
fieldset/ID:
description: SDMMC IP identification register
fields:
- name: IP_ID
description: SDMMC IP identification.
bit_offset: 0
bit_size: 32
fieldset/IDMABASE0R:
description: The SDMMC_IDMABASE0R register contains the memory buffer base address in single buffer configuration and the buffer 0 base address in double buffer configuration.
fields:
- name: IDMABASE0
description: "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0] are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 0 is inactive (IDMABACT = 1)."
bit_offset: 0
bit_size: 32
fieldset/IDMABASE1R:
description: The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address.
fields:
- name: IDMABASE1
description: "Buffer 1 memory base address, shall be word aligned (bit [1:0] are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 1 is inactive (IDMABACT = 0)."
bit_offset: 0
bit_size: 32
fieldset/IDMABSIZER:
description: The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration.
fields:
- name: IDMABNDT
description: "Number of transfers per buffer. This 8-bit value shall be multiplied by 8 to get the size of the buffer in 32-bit words and by 32 to get the size of the buffer in bytes. Example: IDMABNDT = 0x01: buffer size = 8 words = 32 bytes. These bits can only be written by firmware when DPSM is inactive (DPSMACT = 0)."
bit_offset: 5
bit_size: 8
fieldset/IDMACTRLR:
description: The receive and transmit FIFOs can be read or written as 32-bit wide registers. The FIFOs contain 32 entries on 32 sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO.
fields:
- name: IDMAEN
description: IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0).
bit_offset: 0
bit_size: 1
- name: IDMABMODE
description: Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0).
bit_offset: 1
bit_size: 1
- name: IDMABACT
description: Double buffer mode active buffer indication This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). When IDMA is enabled this bit is toggled by hardware.
bit_offset: 2
bit_size: 1
fieldset/MASKR:
description: The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1.
fields:
- name: CCRCFAILIE
description: Command CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by command CRC failure.
bit_offset: 0
bit_size: 1
- name: DCRCFAILIE
description: Data CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by data CRC failure.
bit_offset: 1
bit_size: 1
- name: CTIMEOUTIE
description: Command timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by command timeout.
bit_offset: 2
bit_size: 1
- name: DTIMEOUTIE
description: Data timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by data timeout.
bit_offset: 3
bit_size: 1
- name: TXUNDERRIE
description: Tx FIFO underrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO underrun error.
bit_offset: 4
bit_size: 1
- name: RXOVERRIE
description: Rx FIFO overrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO overrun error.
bit_offset: 5
bit_size: 1
- name: CMDRENDIE
description: Command response received interrupt enable Set and cleared by software to enable/disable interrupt caused by receiving command response.
bit_offset: 6
bit_size: 1
- name: CMDSENTIE
description: Command sent interrupt enable Set and cleared by software to enable/disable interrupt caused by sending command.
bit_offset: 7
bit_size: 1
- name: DATAENDIE
description: Data end interrupt enable Set and cleared by software to enable/disable interrupt caused by data end.
bit_offset: 8
bit_size: 1
- name: DHOLDIE
description: Data hold interrupt enable Set and cleared by software to enable/disable the interrupt generated when sending new data is hold in the DPSM Wait_S state.
bit_offset: 9
bit_size: 1
- name: DBCKENDIE
description: Data block end interrupt enable Set and cleared by software to enable/disable interrupt caused by data block end.
bit_offset: 10
bit_size: 1
- name: DABORTIE
description: Data transfer aborted interrupt enable Set and cleared by software to enable/disable interrupt caused by a data transfer being aborted.
bit_offset: 11
bit_size: 1
- name: TXFIFOHEIE
description: Tx FIFO half empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO half empty.
bit_offset: 14
bit_size: 1
- name: RXFIFOHFIE
description: Rx FIFO half full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO half full.
bit_offset: 15
bit_size: 1
- name: RXFIFOFIE
description: Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full.
bit_offset: 17
bit_size: 1
- name: TXFIFOEIE
description: Tx FIFO empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO empty.
bit_offset: 18
bit_size: 1
- name: BUSYD0ENDIE
description: BUSYD0END interrupt enable Set and cleared by software to enable/disable the interrupt generated when SDMMC_D0 signal changes from busy to NOT busy following a CMD response.
bit_offset: 21
bit_size: 1
- name: SDIOITIE
description: SDIO mode interrupt received interrupt enable Set and cleared by software to enable/disable the interrupt generated when receiving the SDIO mode interrupt.
bit_offset: 22
bit_size: 1
- name: ACKFAILIE
description: Acknowledgment Fail interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment Fail.
bit_offset: 23
bit_size: 1
- name: ACKTIMEOUTIE
description: Acknowledgment timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment timeout.
bit_offset: 24
bit_size: 1
- name: VSWENDIE
description: Voltage switch critical timing section completion interrupt enable Set and cleared by software to enable/disable the interrupt generated when voltage switch critical timing section completion.
bit_offset: 25
bit_size: 1
- name: CKSTOPIE
description: Voltage Switch clock stopped interrupt enable Set and cleared by software to enable/disable interrupt caused by Voltage Switch clock stopped.
bit_offset: 26
bit_size: 1
- name: IDMABTCIE
description: IDMA buffer transfer complete interrupt enable Set and cleared by software to enable/disable the interrupt generated when the IDMA has transferred all data belonging to a memory buffer.
bit_offset: 28
bit_size: 1
fieldset/POWER:
description: SDMMC power control register
fields:
- name: PWRCTRL
description: "SDMMC state control bits. These bits can only be written when the SDMMC is not in the power-on state (PWRCTRL?11). These bits are used to define the functional state of the SDMMC signals: Any further write will be ignored, PWRCTRL value will keep 11."
bit_offset: 0
bit_size: 2
- name: VSWITCH
description: "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"
bit_offset: 2
bit_size: 1
- name: VSWITCHEN
description: "Voltage switch procedure enable. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). This bit is used to stop the SDMMC_CK after the voltage switch command response:"
bit_offset: 3
bit_size: 1
- name: DIRPOL
description: Data and command direction signals polarity selection. This bit can only be written when the SDMMC is in the power-off state (PWRCTRL = 00).
bit_offset: 4
bit_size: 1
fieldset/RESP1R:
description: "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."
fields:
- name: CARDSTATUS1
description: see Table 432
bit_offset: 0
bit_size: 32
fieldset/RESP2R:
description: "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."
fields:
- name: CARDSTATUS2
description: see Table404.
bit_offset: 0
bit_size: 32
fieldset/RESP3R:
description: "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."
fields:
- name: CARDSTATUS3
description: see Table404.
bit_offset: 0
bit_size: 32
fieldset/RESP4R:
description: "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."
fields:
- name: CARDSTATUS4
description: see Table404.
bit_offset: 0
bit_size: 32
fieldset/RESPCMDR:
description: SDMMC command response register
fields:
- name: RESPCMD
description: Response command index
bit_offset: 0
bit_size: 6
fieldset/STAR:
description: "The SDMMC_STAR register is a read-only register. It contains two types of flag:Static flags (bits [29,21,11:0]): these bits remain asserted until they are cleared by writing to the SDMMC interrupt Clear register (see SDMMC_ICR)Dynamic flags (bits [20:12]): these bits change state depending on the state of the underlying logic (for example, FIFO full and empty flags are asserted and de-asserted as data while written to the FIFO)"
fields:
- name: CCRCFAIL
description: Command response received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 0
bit_size: 1
- name: DCRCFAIL
description: Data block sent/received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 1
bit_size: 1
- name: CTIMEOUT
description: Command response timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR. The Command Timeout period has a fixed value of 64 SDMMC_CK clock periods.
bit_offset: 2
bit_size: 1
- name: DTIMEOUT
description: Data timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 3
bit_size: 1
- name: TXUNDERR
description: Transmit FIFO underrun error or IDMA read transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 4
bit_size: 1
- name: RXOVERR
description: Received FIFO overrun error or IDMA write transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 5
bit_size: 1
- name: CMDREND
description: "Command response received (CRC check passed, or no CRC). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."
bit_offset: 6
bit_size: 1
- name: CMDSENT
description: Command sent (no response required). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 7
bit_size: 1
- name: DATAEND
description: "Data transfer ended correctly. (data counter, DATACOUNT is zero and no errors occur). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."
bit_offset: 8
bit_size: 1
- name: DHOLD
description: Data transfer Hold. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 9
bit_size: 1
- name: DBCKEND
description: Data block sent/received. (CRC check passed) and DPSM moves to the READWAIT state. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 10
bit_size: 1
- name: DABORT
description: Data transfer aborted by CMD12. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 11
bit_size: 1
- name: DPSMACT
description: "Data path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."
bit_offset: 12
bit_size: 1
- name: CPSMACT
description: "Command path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."
bit_offset: 13
bit_size: 1
- name: TXFIFOHE
description: Transmit FIFO half empty At least half the number of words can be written into the FIFO. This bit is cleared when the FIFO becomes half+1 full.
bit_offset: 14
bit_size: 1
- name: RXFIFOHF
description: Receive FIFO half full There are at least half the number of words in the FIFO. This bit is cleared when the FIFO becomes half+1 empty.
bit_offset: 15
bit_size: 1
- name: TXFIFOF
description: "Transmit FIFO full This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes empty."
bit_offset: 16
bit_size: 1
- name: RXFIFOF
description: Receive FIFO full This bit is cleared when one FIFO location becomes empty.
bit_offset: 17
bit_size: 1
- name: TXFIFOE
description: Transmit FIFO empty This bit is cleared when one FIFO location becomes full.
bit_offset: 18
bit_size: 1
- name: RXFIFOE
description: "Receive FIFO empty This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes full."
bit_offset: 19
bit_size: 1
- name: BUSYD0
description: "Inverted value of SDMMC_D0 line (Busy), sampled at the end of a CMD response and a second time 2 SDMMC_CK cycles after the CMD response. This bit is reset to not busy when the SDMMCD0 line changes from busy to not busy. This bit does not signal busy due to data transfer. This is a hardware status flag only, it does not generate an interrupt."
bit_offset: 20
bit_size: 1
- name: BUSYD0END
description: end of SDMMC_D0 Busy following a CMD response detected. This indicates only end of busy following a CMD response. This bit does not signal busy due to data transfer. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 21
bit_size: 1
- name: SDIOIT
description: SDIO interrupt received. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 22
bit_size: 1
- name: ACKFAIL
description: Boot acknowledgment received (boot acknowledgment check fail). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 23
bit_size: 1
- name: ACKTIMEOUT
description: Boot acknowledgment timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 24
bit_size: 1
- name: VSWEND
description: Voltage switch critical timing section completion. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 25
bit_size: 1
- name: CKSTOP
description: SDMMC_CK stopped in Voltage switch procedure. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 26
bit_size: 1
- name: IDMATE
description: IDMA transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 27
bit_size: 1
- name: IDMABTC
description: IDMA buffer transfer complete. interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR.
bit_offset: 28
bit_size: 1
fieldset/VER:
description: SDMMC IP version register
fields:
- name: MINREV
description: IP minor revision number.
bit_offset: 0
bit_size: 4
- name: MAJREV
description: IP major revision number.
bit_offset: 4
bit_size: 4

View File

@ -217,6 +217,7 @@ perimap = [
('.*:RNG:rng1_v3_1', 'rng_v1/RNG'), ('.*:RNG:rng1_v3_1', 'rng_v1/RNG'),
('STM32F4.*:SYS:.*', 'syscfg_f4/SYSCFG'), ('STM32F4.*:SYS:.*', 'syscfg_f4/SYSCFG'),
('STM32L4.*:SYS:.*', 'syscfg_l4/SYSCFG'), ('STM32L4.*:SYS:.*', 'syscfg_l4/SYSCFG'),
('.*SDMMC:sdmmc2_v1_0', 'sdmmc_v2/SDMMC'),
] ]