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

Description

Error Counter Register

Register Layout

Bits Access Reset Description
[7:0] R 0x0 Transmit Error Counter
[14:8] R 0x0 Receive Error Counter
[15] R 0x0 Receive Error Passive
[31:16] ??? 0x0 UNDEFINED

Field : Transmit Error Counter - TEC

Actual state of the Transmit Error Counter. Values between 0 and 255.

Field Access Macros:

#define ALT_CAN_PROTO_CERC_TEC_LSB   0
 
#define ALT_CAN_PROTO_CERC_TEC_MSB   7
 
#define ALT_CAN_PROTO_CERC_TEC_WIDTH   8
 
#define ALT_CAN_PROTO_CERC_TEC_SET_MSK   0x000000ff
 
#define ALT_CAN_PROTO_CERC_TEC_CLR_MSK   0xffffff00
 
#define ALT_CAN_PROTO_CERC_TEC_RESET   0x0
 
#define ALT_CAN_PROTO_CERC_TEC_GET(value)   (((value) & 0x000000ff) >> 0)
 
#define ALT_CAN_PROTO_CERC_TEC_SET(value)   (((value) << 0) & 0x000000ff)
 

Field : Receive Error Counter - REC

Actual state of the Receive Error Counter. Values between 0 and 127.

Field Access Macros:

#define ALT_CAN_PROTO_CERC_REC_LSB   8
 
#define ALT_CAN_PROTO_CERC_REC_MSB   14
 
#define ALT_CAN_PROTO_CERC_REC_WIDTH   7
 
#define ALT_CAN_PROTO_CERC_REC_SET_MSK   0x00007f00
 
#define ALT_CAN_PROTO_CERC_REC_CLR_MSK   0xffff80ff
 
#define ALT_CAN_PROTO_CERC_REC_RESET   0x0
 
#define ALT_CAN_PROTO_CERC_REC_GET(value)   (((value) & 0x00007f00) >> 8)
 
#define ALT_CAN_PROTO_CERC_REC_SET(value)   (((value) << 8) & 0x00007f00)
 

Field : Receive Error Passive - RP

Field Enumeration Values:

Enum Value Description
ALT_CAN_PROTO_CERC_RP_E_BELOW 0x0 The Receive Error Counter is below the error
: passive level.
ALT_CAN_PROTO_CERC_RP_E_REACHED 0x1 The Receive Error Counter has reached the error
: passive level as defined in the CAN
: Specification.

Field Access Macros:

#define ALT_CAN_PROTO_CERC_RP_E_BELOW   0x0
 
#define ALT_CAN_PROTO_CERC_RP_E_REACHED   0x1
 
#define ALT_CAN_PROTO_CERC_RP_LSB   15
 
#define ALT_CAN_PROTO_CERC_RP_MSB   15
 
#define ALT_CAN_PROTO_CERC_RP_WIDTH   1
 
#define ALT_CAN_PROTO_CERC_RP_SET_MSK   0x00008000
 
#define ALT_CAN_PROTO_CERC_RP_CLR_MSK   0xffff7fff
 
#define ALT_CAN_PROTO_CERC_RP_RESET   0x0
 
#define ALT_CAN_PROTO_CERC_RP_GET(value)   (((value) & 0x00008000) >> 15)
 
#define ALT_CAN_PROTO_CERC_RP_SET(value)   (((value) << 15) & 0x00008000)
 

Data Structures

struct  ALT_CAN_PROTO_CERC_s
 

Macros

#define ALT_CAN_PROTO_CERC_OFST   0x8
 
#define ALT_CAN_PROTO_CERC_ADDR(base)   ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_CAN_PROTO_CERC_OFST))
 

Typedefs

typedef struct ALT_CAN_PROTO_CERC_s ALT_CAN_PROTO_CERC_t
 

Data Structure Documentation

struct ALT_CAN_PROTO_CERC_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_CAN_PROTO_CERC.

Data Fields
const uint32_t TEC: 8 Transmit Error Counter
const uint32_t REC: 7 Receive Error Counter
const uint32_t RP: 1 Receive Error Passive
uint32_t __pad0__: 16 UNDEFINED

Macro Definitions

#define ALT_CAN_PROTO_CERC_TEC_LSB   0

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

#define ALT_CAN_PROTO_CERC_TEC_MSB   7

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

#define ALT_CAN_PROTO_CERC_TEC_WIDTH   8

The width in bits of the ALT_CAN_PROTO_CERC_TEC register field.

#define ALT_CAN_PROTO_CERC_TEC_SET_MSK   0x000000ff

The mask used to set the ALT_CAN_PROTO_CERC_TEC register field value.

#define ALT_CAN_PROTO_CERC_TEC_CLR_MSK   0xffffff00

The mask used to clear the ALT_CAN_PROTO_CERC_TEC register field value.

#define ALT_CAN_PROTO_CERC_TEC_RESET   0x0

The reset value of the ALT_CAN_PROTO_CERC_TEC register field.

#define ALT_CAN_PROTO_CERC_TEC_GET (   value)    (((value) & 0x000000ff) >> 0)

Extracts the ALT_CAN_PROTO_CERC_TEC field value from a register.

#define ALT_CAN_PROTO_CERC_TEC_SET (   value)    (((value) << 0) & 0x000000ff)

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

#define ALT_CAN_PROTO_CERC_REC_LSB   8

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

#define ALT_CAN_PROTO_CERC_REC_MSB   14

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

#define ALT_CAN_PROTO_CERC_REC_WIDTH   7

The width in bits of the ALT_CAN_PROTO_CERC_REC register field.

#define ALT_CAN_PROTO_CERC_REC_SET_MSK   0x00007f00

The mask used to set the ALT_CAN_PROTO_CERC_REC register field value.

#define ALT_CAN_PROTO_CERC_REC_CLR_MSK   0xffff80ff

The mask used to clear the ALT_CAN_PROTO_CERC_REC register field value.

#define ALT_CAN_PROTO_CERC_REC_RESET   0x0

The reset value of the ALT_CAN_PROTO_CERC_REC register field.

#define ALT_CAN_PROTO_CERC_REC_GET (   value)    (((value) & 0x00007f00) >> 8)

Extracts the ALT_CAN_PROTO_CERC_REC field value from a register.

#define ALT_CAN_PROTO_CERC_REC_SET (   value)    (((value) << 8) & 0x00007f00)

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

#define ALT_CAN_PROTO_CERC_RP_E_BELOW   0x0

Enumerated value for register field ALT_CAN_PROTO_CERC_RP

The Receive Error Counter is below the error passive level.

#define ALT_CAN_PROTO_CERC_RP_E_REACHED   0x1

Enumerated value for register field ALT_CAN_PROTO_CERC_RP

The Receive Error Counter has reached the error passive level as defined in the CAN Specification.

#define ALT_CAN_PROTO_CERC_RP_LSB   15

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

#define ALT_CAN_PROTO_CERC_RP_MSB   15

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

#define ALT_CAN_PROTO_CERC_RP_WIDTH   1

The width in bits of the ALT_CAN_PROTO_CERC_RP register field.

#define ALT_CAN_PROTO_CERC_RP_SET_MSK   0x00008000

The mask used to set the ALT_CAN_PROTO_CERC_RP register field value.

#define ALT_CAN_PROTO_CERC_RP_CLR_MSK   0xffff7fff

The mask used to clear the ALT_CAN_PROTO_CERC_RP register field value.

#define ALT_CAN_PROTO_CERC_RP_RESET   0x0

The reset value of the ALT_CAN_PROTO_CERC_RP register field.

#define ALT_CAN_PROTO_CERC_RP_GET (   value)    (((value) & 0x00008000) >> 15)

Extracts the ALT_CAN_PROTO_CERC_RP field value from a register.

#define ALT_CAN_PROTO_CERC_RP_SET (   value)    (((value) << 15) & 0x00008000)

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

#define ALT_CAN_PROTO_CERC_OFST   0x8

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

#define ALT_CAN_PROTO_CERC_ADDR (   base)    ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_CAN_PROTO_CERC_OFST))

The address of the ALT_CAN_PROTO_CERC register.

Typedef Documentation

The typedef declaration for register ALT_CAN_PROTO_CERC.