Altera SoCAL  16.0
The Altera SoC Abstraction Layer (SoCAL) API Reference Manual
 All Data Structures Variables Typedefs Groups
Register : ic_fs_scl_lcnt

Description

Name: Fast Mode or Fast Mode Plus I2C Clock SCL Low Count Register

Size: 16 bits

Address Offset: 0x20

Read/Write Access: Read/Write

Register Layout

Bits Access Reset Description
[15:0] RW 0x82 ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT
[31:16] ??? 0x0 UNDEFINED

Field : ic_fs_scl_lcnt

This register must be set before any I2C bus transaction can take place to

ensure proper I/O timing. This register sets the SCL clock low period count

for fast speed. It is used in high-speed mode to send the Master Code and

START BYTE or General CALL.

This register goes away and becomes read-only returning 0s if

IC_MAX_SPEED_MODE = standard.

This register can be written only when the I2C interface is disabled, which

corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times

have no effect.

The minimum valid value is 8; hardware prevents values less than this

being written, and if attempted results in 8 being set. For designs with

APB_DATA_WIDTH = 8 the order of programming is important to ensure

the correct operation of the DW_apb_i2c. The lower byte must be

programmed first. Then the upper byte is programmed. If the value is less

than 8 then the count value gets changed to 8.

When the configuration parameter IC_HC_COUNT_VALUES is set to 1,

this register is read only.

Reset value: IC_FS_SCL_LOW_COUNT configuration parameter

Field Access Macros:

#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_LSB   0
 
#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_MSB   15
 
#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_WIDTH   16
 
#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_SET_MSK   0x0000ffff
 
#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_CLR_MSK   0xffff0000
 
#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_RESET   0x82
 
#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_GET(value)   (((value) & 0x0000ffff) >> 0)
 
#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_SET(value)   (((value) << 0) & 0x0000ffff)
 

Data Structures

struct  ALT_I2C_FS_SCL_LCNT_s
 

Macros

#define ALT_I2C_FS_SCL_LCNT_RESET   0x00000082
 
#define ALT_I2C_FS_SCL_LCNT_OFST   0x20
 
#define ALT_I2C_FS_SCL_LCNT_ADDR(base)   ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_I2C_FS_SCL_LCNT_OFST))
 

Typedefs

typedef struct
ALT_I2C_FS_SCL_LCNT_s 
ALT_I2C_FS_SCL_LCNT_t
 

Data Structure Documentation

struct ALT_I2C_FS_SCL_LCNT_s

WARNING: The C register and register group struct declarations are provided for convenience and illustrative purposes. They should, however, be used with caution as the C language standard provides no guarantees about the alignment or atomicity of device memory accesses. The recommended practice for writing hardware drivers is to use the SoCAL access macros and alt_read_word() and alt_write_word() functions.

The struct declaration for register ALT_I2C_FS_SCL_LCNT.

Data Fields
uint32_t ic_fs_scl_lcnt: 16 ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT
uint32_t __pad0__: 16 UNDEFINED

Macro Definitions

#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_LSB   0

The Least Significant Bit (LSB) position of the ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT register field.

#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_MSB   15

The Most Significant Bit (MSB) position of the ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT register field.

#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_WIDTH   16

The width in bits of the ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT register field.

#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_SET_MSK   0x0000ffff

The mask used to set the ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT register field value.

#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_CLR_MSK   0xffff0000

The mask used to clear the ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT register field value.

#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_RESET   0x82

The reset value of the ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT register field.

#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_GET (   value)    (((value) & 0x0000ffff) >> 0)

Extracts the ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT field value from a register.

#define ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT_SET (   value)    (((value) << 0) & 0x0000ffff)

Produces a ALT_I2C_FS_SCL_LCNT_IC_FS_SCL_LCNT register field value suitable for setting the register.

#define ALT_I2C_FS_SCL_LCNT_RESET   0x00000082

The reset value of the ALT_I2C_FS_SCL_LCNT register.

#define ALT_I2C_FS_SCL_LCNT_OFST   0x20

The byte offset of the ALT_I2C_FS_SCL_LCNT register from the beginning of the component.

#define ALT_I2C_FS_SCL_LCNT_ADDR (   base)    ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_I2C_FS_SCL_LCNT_OFST))

The address of the ALT_I2C_FS_SCL_LCNT register.

Typedef Documentation

The typedef declaration for register ALT_I2C_FS_SCL_LCNT.