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

Description

The Function Register controls the features RAM_Initialisation and Power_Down also by application register.

The CAN module can be prepared for Power_Down by setting the port CAN_CLKSTOP_REQ to one or writing to CFR.ClkStReq a one. The power down state is left by setting port CAN_CLKSTOP_REQ to zero or writing to CFR.ClkStReq a zero, acknowledged by CAN_CLKSTOP_ACK is going to zero as well as CFR.ClkStAck. The CCTRL.Init bit is left one and has to be written by the application to re-enable CAN transfers.

Note: It's recommended to use either the ports CAN_CLKSTOP_REQ and CAN_CLKSTOP_ACK or the CCTRL.ClkStReq and CFR.ClkStAck. The application CFR.ClkStReq showsalso the actual status of the portCAN_CLKSTOP_REQ.

Register Layout

Bits Access Reset Description
[0] R 0x0 Clock Stop Acknowledgement
[1] RW 0x0 Clock Stop Request
[2] ??? 0x0 UNDEFINED
[3] RW 0x0 Request for automatic RAM Initialization
[31:4] ??? 0x0 UNDEFINED

Field : Clock Stop Acknowledgement - ClkStAck

Clock Stop Acknowledgement

Field Access Macros:

#define ALT_CAN_PROTO_CFR_CLKSTACK_LSB   0
 
#define ALT_CAN_PROTO_CFR_CLKSTACK_MSB   0
 
#define ALT_CAN_PROTO_CFR_CLKSTACK_WIDTH   1
 
#define ALT_CAN_PROTO_CFR_CLKSTACK_SET_MSK   0x00000001
 
#define ALT_CAN_PROTO_CFR_CLKSTACK_CLR_MSK   0xfffffffe
 
#define ALT_CAN_PROTO_CFR_CLKSTACK_RESET   0x0
 
#define ALT_CAN_PROTO_CFR_CLKSTACK_GET(value)   (((value) & 0x00000001) >> 0)
 
#define ALT_CAN_PROTO_CFR_CLKSTACK_SET(value)   (((value) << 0) & 0x00000001)
 

Field : Clock Stop Request - ClkStReq

Clock Stop Request

Field Access Macros:

#define ALT_CAN_PROTO_CFR_CLKSTREQ_LSB   1
 
#define ALT_CAN_PROTO_CFR_CLKSTREQ_MSB   1
 
#define ALT_CAN_PROTO_CFR_CLKSTREQ_WIDTH   1
 
#define ALT_CAN_PROTO_CFR_CLKSTREQ_SET_MSK   0x00000002
 
#define ALT_CAN_PROTO_CFR_CLKSTREQ_CLR_MSK   0xfffffffd
 
#define ALT_CAN_PROTO_CFR_CLKSTREQ_RESET   0x0
 
#define ALT_CAN_PROTO_CFR_CLKSTREQ_GET(value)   (((value) & 0x00000002) >> 1)
 
#define ALT_CAN_PROTO_CFR_CLKSTREQ_SET(value)   (((value) << 1) & 0x00000002)
 

Field : Request for automatic RAM Initialization - RAMinit

Request for automatic RAM Initialization

Field Enumeration Values:

Enum Value Description
ALT_CAN_PROTO_CFR_RAMINIT_E_NOAUTO 0x0 No automatic RAM Initialization is requested, if
: once a ram initialization is started a write of
: a zero will be ignored. The Bit is cleared by
: hardware, after RAM Initialization is completed.
ALT_CAN_PROTO_CFR_RAMINIT_E_STARTAUTO 0x1 Start automatic RAM Initialization. All message
: objects will be written with zeros and the
: parity bits will be set. The RAMInit Bit will
: return to zero after the RAM-Initialization
: process is completed. A RAM Initialization
: Request is only possible if CCTRL.Init is set.
: The duration of the automatic RAM Initialization
: is messagebuffer-size + 4 host_clock cycles.

Field Access Macros:

#define ALT_CAN_PROTO_CFR_RAMINIT_E_NOAUTO   0x0
 
#define ALT_CAN_PROTO_CFR_RAMINIT_E_STARTAUTO   0x1
 
#define ALT_CAN_PROTO_CFR_RAMINIT_LSB   3
 
#define ALT_CAN_PROTO_CFR_RAMINIT_MSB   3
 
#define ALT_CAN_PROTO_CFR_RAMINIT_WIDTH   1
 
#define ALT_CAN_PROTO_CFR_RAMINIT_SET_MSK   0x00000008
 
#define ALT_CAN_PROTO_CFR_RAMINIT_CLR_MSK   0xfffffff7
 
#define ALT_CAN_PROTO_CFR_RAMINIT_RESET   0x0
 
#define ALT_CAN_PROTO_CFR_RAMINIT_GET(value)   (((value) & 0x00000008) >> 3)
 
#define ALT_CAN_PROTO_CFR_RAMINIT_SET(value)   (((value) << 3) & 0x00000008)
 

Data Structures

struct  ALT_CAN_PROTO_CFR_s
 

Macros

#define ALT_CAN_PROTO_CFR_OFST   0x18
 
#define ALT_CAN_PROTO_CFR_ADDR(base)   ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_CAN_PROTO_CFR_OFST))
 

Typedefs

typedef struct ALT_CAN_PROTO_CFR_s ALT_CAN_PROTO_CFR_t
 

Data Structure Documentation

struct ALT_CAN_PROTO_CFR_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_CFR.

Data Fields
const uint32_t ClkStAck: 1 Clock Stop Acknowledgement
uint32_t ClkStReq: 1 Clock Stop Request
uint32_t __pad0__: 1 UNDEFINED
uint32_t RAMinit: 1 Request for automatic RAM Initialization
uint32_t __pad1__: 28 UNDEFINED

Macro Definitions

#define ALT_CAN_PROTO_CFR_CLKSTACK_LSB   0

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

#define ALT_CAN_PROTO_CFR_CLKSTACK_MSB   0

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

#define ALT_CAN_PROTO_CFR_CLKSTACK_WIDTH   1

The width in bits of the ALT_CAN_PROTO_CFR_CLKSTACK register field.

#define ALT_CAN_PROTO_CFR_CLKSTACK_SET_MSK   0x00000001

The mask used to set the ALT_CAN_PROTO_CFR_CLKSTACK register field value.

#define ALT_CAN_PROTO_CFR_CLKSTACK_CLR_MSK   0xfffffffe

The mask used to clear the ALT_CAN_PROTO_CFR_CLKSTACK register field value.

#define ALT_CAN_PROTO_CFR_CLKSTACK_RESET   0x0

The reset value of the ALT_CAN_PROTO_CFR_CLKSTACK register field.

#define ALT_CAN_PROTO_CFR_CLKSTACK_GET (   value)    (((value) & 0x00000001) >> 0)

Extracts the ALT_CAN_PROTO_CFR_CLKSTACK field value from a register.

#define ALT_CAN_PROTO_CFR_CLKSTACK_SET (   value)    (((value) << 0) & 0x00000001)

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

#define ALT_CAN_PROTO_CFR_CLKSTREQ_LSB   1

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

#define ALT_CAN_PROTO_CFR_CLKSTREQ_MSB   1

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

#define ALT_CAN_PROTO_CFR_CLKSTREQ_WIDTH   1

The width in bits of the ALT_CAN_PROTO_CFR_CLKSTREQ register field.

#define ALT_CAN_PROTO_CFR_CLKSTREQ_SET_MSK   0x00000002

The mask used to set the ALT_CAN_PROTO_CFR_CLKSTREQ register field value.

#define ALT_CAN_PROTO_CFR_CLKSTREQ_CLR_MSK   0xfffffffd

The mask used to clear the ALT_CAN_PROTO_CFR_CLKSTREQ register field value.

#define ALT_CAN_PROTO_CFR_CLKSTREQ_RESET   0x0

The reset value of the ALT_CAN_PROTO_CFR_CLKSTREQ register field.

#define ALT_CAN_PROTO_CFR_CLKSTREQ_GET (   value)    (((value) & 0x00000002) >> 1)

Extracts the ALT_CAN_PROTO_CFR_CLKSTREQ field value from a register.

#define ALT_CAN_PROTO_CFR_CLKSTREQ_SET (   value)    (((value) << 1) & 0x00000002)

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

#define ALT_CAN_PROTO_CFR_RAMINIT_E_NOAUTO   0x0

Enumerated value for register field ALT_CAN_PROTO_CFR_RAMINIT

No automatic RAM Initialization is requested, if once a ram initialization is started a write of a zero will be ignored. The Bit is cleared by hardware, after RAM Initialization is completed.

#define ALT_CAN_PROTO_CFR_RAMINIT_E_STARTAUTO   0x1

Enumerated value for register field ALT_CAN_PROTO_CFR_RAMINIT

Start automatic RAM Initialization. All message objects will be written with zeros and the parity bits will be set. The RAMInit Bit will return to zero after the RAM-Initialization process is completed. A RAM Initialization Request is only possible if CCTRL.Init is set. The duration of the automatic RAM Initialization is messagebuffer-size + 4 host_clock cycles.

#define ALT_CAN_PROTO_CFR_RAMINIT_LSB   3

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

#define ALT_CAN_PROTO_CFR_RAMINIT_MSB   3

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

#define ALT_CAN_PROTO_CFR_RAMINIT_WIDTH   1

The width in bits of the ALT_CAN_PROTO_CFR_RAMINIT register field.

#define ALT_CAN_PROTO_CFR_RAMINIT_SET_MSK   0x00000008

The mask used to set the ALT_CAN_PROTO_CFR_RAMINIT register field value.

#define ALT_CAN_PROTO_CFR_RAMINIT_CLR_MSK   0xfffffff7

The mask used to clear the ALT_CAN_PROTO_CFR_RAMINIT register field value.

#define ALT_CAN_PROTO_CFR_RAMINIT_RESET   0x0

The reset value of the ALT_CAN_PROTO_CFR_RAMINIT register field.

#define ALT_CAN_PROTO_CFR_RAMINIT_GET (   value)    (((value) & 0x00000008) >> 3)

Extracts the ALT_CAN_PROTO_CFR_RAMINIT field value from a register.

#define ALT_CAN_PROTO_CFR_RAMINIT_SET (   value)    (((value) << 3) & 0x00000008)

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

#define ALT_CAN_PROTO_CFR_OFST   0x18

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

#define ALT_CAN_PROTO_CFR_ADDR (   base)    ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_CAN_PROTO_CFR_OFST))

The address of the ALT_CAN_PROTO_CFR register.

Typedef Documentation

The typedef declaration for register ALT_CAN_PROTO_CFR.