pub struct R(/* private fields */);Expand description
Register CTRL reader
Implementations§
Source§impl R
impl R
Sourcepub fn ec_am_mode(&self) -> EC_AM_MODE_R
pub fn ec_am_mode(&self) -> EC_AM_MODE_R
Bit 8 - This field specifies the clocking for the address matching (I2C) or slave selection detection logic (SPI) ‘0’: Internally clocked mode ‘1’: Externally clocked mode In internally clocked mode, the serial interface protocols run off the SCB clock. In externally clocked mode, the serial interface protocols run off the clock as provided by the serial interface. The clocking for the rest of the logic is determined by CTRL.EC_OP_MODE. Externally clocked mode is only used for synchronous serial interface protocols (SPI and I2C) in slave mode. In SPI mode, only Motorola submode (all Motorola modes: 0, 1, 2, 3) is supported. In UART mode this field should be ‘0’.
Sourcepub fn ec_op_mode(&self) -> EC_OP_MODE_R
pub fn ec_op_mode(&self) -> EC_OP_MODE_R
Bit 9 - This field specifies the clocking for the SCB block ‘0’: Internally clocked mode ‘1’: externally clocked mode In internally clocked mode, the serial interface protocols run off the SCB clock. In externally clocked mode, the serial interface protocols run off the clock as provided by the serial interface. Externally clocked operation mode is only used for synchronous serial interface protocols (SPI and I2C) in slave mode AND EZ mode. In SPI mode, only Motorola submode (all Motorola modes: 0, 1, 2, 3) is supported. The maximum SPI slave, EZ mode bitrate is 48 Mbps (transmission and IO delays outside the IP will degrade the effective bitrate). In UART mode this field should be ‘0’.
Sourcepub fn ez_mode(&self) -> EZ_MODE_R
pub fn ez_mode(&self) -> EZ_MODE_R
Bit 10 - Non EZ mode (‘0’) or EZ mode (‘1’). In EZ mode, a meta protocol is applied to the serial interface protocol. This meta protocol adds meaning to the data frames transferred by the serial interface protocol: a data frame can represent a memory address, a write memory data element or a read memory data element. EZ mode is only used for synchronous serial interface protocols: SPI and I2C. In SPI mode, only Motorola submode (all Motorola modes: 0, 1, 2, 3) is supported and the transmitter should use continuous data frames; i.e. data frames not separated by slave deselection. This mode is only applicable to slave functionality. In EZ mode, the slave can read from and write to an addressable memory structure of 32 bytes. In EZ mode, data frames should 8-bit in size and should be transmitted and received with the Most Significant Bit (MSB) first. In UART mode this field should be ‘0’.
Sourcepub fn cmd_resp_mode(&self) -> CMD_RESP_MODE_R
pub fn cmd_resp_mode(&self) -> CMD_RESP_MODE_R
Bit 12 - Determines CMD_RESP mode of operation: ‘0’: CMD_RESP mode disabled. ‘1’: CMD_RESP mode enabled (also requires EC_AM_MODE and EC_OP_MODE to be set to ‘1’).
Sourcepub fn mem_width(&self) -> MEM_WIDTH_R
pub fn mem_width(&self) -> MEM_WIDTH_R
Bits 14:15 - Determines the number of bits per FIFO data element.
Sourcepub fn addr_accept(&self) -> ADDR_ACCEPT_R
pub fn addr_accept(&self) -> ADDR_ACCEPT_R
Bit 16 - Determines whether a received matching address is accepted in the RX FIFO (‘1’) or not (‘0’). In I2C mode, this field is used to allow the slave to put the received slave address or general call address in the RX FIFO. Note that a received matching address is put in the RX FIFO when this bit is ‘1’ for both I2C read and write transfers. In multi-processor UART receiver mode, this field is used to allow the receiver to put the received address in the RX FIFO. Note: non-matching addresses are never put in the RX FIFO.
Sourcepub fn block(&self) -> BLOCK_R
pub fn block(&self) -> BLOCK_R
Bit 17 - Only used in externally clocked mode. If the externally clocked logic and the internal CPU accesses to EZ memory coincide/collide, this bit determines whether the CPU access should block and result in bus wait states (‘BLOCK is 1’) or not (BLOCK is ‘0’). IF BLOCK is ‘0’ and the accesses collide, CPU read operations return 0xffff:ffff and CPU write operations are ignored. Colliding accesses are registered as interrupt causes: INTR_TX.BLOCKED and INTR_RX.BLOCKED.
Sourcepub fn ec_access(&self) -> EC_ACCESS_R
pub fn ec_access(&self) -> EC_ACCESS_R
Bit 28 - EC_ACCESS is used to enable I2CS_EC or SPIS_EC access to internal EZ memory. 1: enable clk_scb 0: disable clk_scb Before going to deepsleep this field should be set to 1. when waking up from DeepSleep power mode, and PLL is locked (clk_scb is at expected frequency), this filed should be set to 0.
Sourcepub fn enabled(&self) -> ENABLED_R
pub fn enabled(&self) -> ENABLED_R
Bit 31 - SCB block is enabled (‘1’) or not (‘0’). The proper order in which to initialize SCB is as follows: - Program protocol specific information using SPI_CTRL, UART_CTRL (and UART_TX_CTRL and UART_RX_CTRL) or I2C_CTRL registers. This includes selection of a submode, master/slave functionality and transmitter/receiver functionality when applicable. - Program generic transmitter (TX_CTRL) and receiver (RX_CTRL) information. This includes enabling of the transmitter and receiver functionality. - Program transmitter FIFO (TX_FIFO_CTRL) and receiver FIFO (RX_FIFO_CTRL) information. - Program CTRL register to enable SCB, select the specific operation mode and oversampling factor. Generally when this block is enabled, no control information should be changed. Changes should be made AFTER disabling this block, e.g. to modify the operation mode (from I2C to SPI) or to go from externally to internally clocked. The change takes effect after the block is re-enabled. Note that disabling the block will cause re-initialization of the design and associated state is lost (e.g. FIFO content). Specific to SPI master case, when SCB is idle, below registers can be changed without disabling SCB block, TX_CTRL TX_FIFO_CTRL RX_CTRL RX_FIFO_CTRL SPI_CTRL.SSEL,