![]() |
Altera SoCAL
16.0
The Altera SoC Abstraction Layer (SoCAL) API Reference Manual
|
The data bytes of CAN messages are stored in the IF1/2 registers in the following order. In a CAN Data Frame, Data(0) is the first, Data(7) is the last byte to be transmitted or received. In CAN's serial bit stream, the MSB of each byte will be transmitted first.
Register Layout
Bits | Access | Reset | Description |
---|---|---|---|
[7:0] | RW | 0x0 | Data 0 |
[15:8] | RW | 0x0 | Data 1 |
[23:16] | RW | 0x0 | Data 2 |
[31:24] | RW | 0x0 | Data 3 |
Field : Data 0 - Data4 | |
5th data byte of a CAN Data Frame Field Access Macros: | |
#define | ALT_CAN_MSGIF_IF2DB_DATA4_LSB 0 |
#define | ALT_CAN_MSGIF_IF2DB_DATA4_MSB 7 |
#define | ALT_CAN_MSGIF_IF2DB_DATA4_WIDTH 8 |
#define | ALT_CAN_MSGIF_IF2DB_DATA4_SET_MSK 0x000000ff |
#define | ALT_CAN_MSGIF_IF2DB_DATA4_CLR_MSK 0xffffff00 |
#define | ALT_CAN_MSGIF_IF2DB_DATA4_RESET 0x0 |
#define | ALT_CAN_MSGIF_IF2DB_DATA4_GET(value) (((value) & 0x000000ff) >> 0) |
#define | ALT_CAN_MSGIF_IF2DB_DATA4_SET(value) (((value) << 0) & 0x000000ff) |
Field : Data 1 - Data5 | |
6th data byte of a CAN Data Frame Field Access Macros: | |
#define | ALT_CAN_MSGIF_IF2DB_DATA5_LSB 8 |
#define | ALT_CAN_MSGIF_IF2DB_DATA5_MSB 15 |
#define | ALT_CAN_MSGIF_IF2DB_DATA5_WIDTH 8 |
#define | ALT_CAN_MSGIF_IF2DB_DATA5_SET_MSK 0x0000ff00 |
#define | ALT_CAN_MSGIF_IF2DB_DATA5_CLR_MSK 0xffff00ff |
#define | ALT_CAN_MSGIF_IF2DB_DATA5_RESET 0x0 |
#define | ALT_CAN_MSGIF_IF2DB_DATA5_GET(value) (((value) & 0x0000ff00) >> 8) |
#define | ALT_CAN_MSGIF_IF2DB_DATA5_SET(value) (((value) << 8) & 0x0000ff00) |
Field : Data 2 - Data6 | |
7th data byte of a CAN Data Frame Field Access Macros: | |
#define | ALT_CAN_MSGIF_IF2DB_DATA6_LSB 16 |
#define | ALT_CAN_MSGIF_IF2DB_DATA6_MSB 23 |
#define | ALT_CAN_MSGIF_IF2DB_DATA6_WIDTH 8 |
#define | ALT_CAN_MSGIF_IF2DB_DATA6_SET_MSK 0x00ff0000 |
#define | ALT_CAN_MSGIF_IF2DB_DATA6_CLR_MSK 0xff00ffff |
#define | ALT_CAN_MSGIF_IF2DB_DATA6_RESET 0x0 |
#define | ALT_CAN_MSGIF_IF2DB_DATA6_GET(value) (((value) & 0x00ff0000) >> 16) |
#define | ALT_CAN_MSGIF_IF2DB_DATA6_SET(value) (((value) << 16) & 0x00ff0000) |
Field : Data 3 - Data7 | |
8th data byte of a CAN Data Frame Field Access Macros: | |
#define | ALT_CAN_MSGIF_IF2DB_DATA7_LSB 24 |
#define | ALT_CAN_MSGIF_IF2DB_DATA7_MSB 31 |
#define | ALT_CAN_MSGIF_IF2DB_DATA7_WIDTH 8 |
#define | ALT_CAN_MSGIF_IF2DB_DATA7_SET_MSK 0xff000000 |
#define | ALT_CAN_MSGIF_IF2DB_DATA7_CLR_MSK 0x00ffffff |
#define | ALT_CAN_MSGIF_IF2DB_DATA7_RESET 0x0 |
#define | ALT_CAN_MSGIF_IF2DB_DATA7_GET(value) (((value) & 0xff000000) >> 24) |
#define | ALT_CAN_MSGIF_IF2DB_DATA7_SET(value) (((value) << 24) & 0xff000000) |
Data Structures | |
struct | ALT_CAN_MSGIF_IF2DB_s |
Macros | |
#define | ALT_CAN_MSGIF_IF2DB_OFST 0x34 |
#define | ALT_CAN_MSGIF_IF2DB_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_CAN_MSGIF_IF2DB_OFST)) |
Typedefs | |
typedef struct ALT_CAN_MSGIF_IF2DB_s | ALT_CAN_MSGIF_IF2DB_t |
struct ALT_CAN_MSGIF_IF2DB_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_MSGIF_IF2DB.
Data Fields | ||
---|---|---|
uint32_t | Data4: 8 | Data 0 |
uint32_t | Data5: 8 | Data 1 |
uint32_t | Data6: 8 | Data 2 |
uint32_t | Data7: 8 | Data 3 |
#define ALT_CAN_MSGIF_IF2DB_DATA4_LSB 0 |
The Least Significant Bit (LSB) position of the ALT_CAN_MSGIF_IF2DB_DATA4 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA4_MSB 7 |
The Most Significant Bit (MSB) position of the ALT_CAN_MSGIF_IF2DB_DATA4 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA4_WIDTH 8 |
The width in bits of the ALT_CAN_MSGIF_IF2DB_DATA4 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA4_SET_MSK 0x000000ff |
The mask used to set the ALT_CAN_MSGIF_IF2DB_DATA4 register field value.
#define ALT_CAN_MSGIF_IF2DB_DATA4_CLR_MSK 0xffffff00 |
The mask used to clear the ALT_CAN_MSGIF_IF2DB_DATA4 register field value.
#define ALT_CAN_MSGIF_IF2DB_DATA4_RESET 0x0 |
The reset value of the ALT_CAN_MSGIF_IF2DB_DATA4 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA4_GET | ( | value | ) | (((value) & 0x000000ff) >> 0) |
Extracts the ALT_CAN_MSGIF_IF2DB_DATA4 field value from a register.
#define ALT_CAN_MSGIF_IF2DB_DATA4_SET | ( | value | ) | (((value) << 0) & 0x000000ff) |
Produces a ALT_CAN_MSGIF_IF2DB_DATA4 register field value suitable for setting the register.
#define ALT_CAN_MSGIF_IF2DB_DATA5_LSB 8 |
The Least Significant Bit (LSB) position of the ALT_CAN_MSGIF_IF2DB_DATA5 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA5_MSB 15 |
The Most Significant Bit (MSB) position of the ALT_CAN_MSGIF_IF2DB_DATA5 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA5_WIDTH 8 |
The width in bits of the ALT_CAN_MSGIF_IF2DB_DATA5 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA5_SET_MSK 0x0000ff00 |
The mask used to set the ALT_CAN_MSGIF_IF2DB_DATA5 register field value.
#define ALT_CAN_MSGIF_IF2DB_DATA5_CLR_MSK 0xffff00ff |
The mask used to clear the ALT_CAN_MSGIF_IF2DB_DATA5 register field value.
#define ALT_CAN_MSGIF_IF2DB_DATA5_RESET 0x0 |
The reset value of the ALT_CAN_MSGIF_IF2DB_DATA5 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA5_GET | ( | value | ) | (((value) & 0x0000ff00) >> 8) |
Extracts the ALT_CAN_MSGIF_IF2DB_DATA5 field value from a register.
#define ALT_CAN_MSGIF_IF2DB_DATA5_SET | ( | value | ) | (((value) << 8) & 0x0000ff00) |
Produces a ALT_CAN_MSGIF_IF2DB_DATA5 register field value suitable for setting the register.
#define ALT_CAN_MSGIF_IF2DB_DATA6_LSB 16 |
The Least Significant Bit (LSB) position of the ALT_CAN_MSGIF_IF2DB_DATA6 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA6_MSB 23 |
The Most Significant Bit (MSB) position of the ALT_CAN_MSGIF_IF2DB_DATA6 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA6_WIDTH 8 |
The width in bits of the ALT_CAN_MSGIF_IF2DB_DATA6 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA6_SET_MSK 0x00ff0000 |
The mask used to set the ALT_CAN_MSGIF_IF2DB_DATA6 register field value.
#define ALT_CAN_MSGIF_IF2DB_DATA6_CLR_MSK 0xff00ffff |
The mask used to clear the ALT_CAN_MSGIF_IF2DB_DATA6 register field value.
#define ALT_CAN_MSGIF_IF2DB_DATA6_RESET 0x0 |
The reset value of the ALT_CAN_MSGIF_IF2DB_DATA6 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA6_GET | ( | value | ) | (((value) & 0x00ff0000) >> 16) |
Extracts the ALT_CAN_MSGIF_IF2DB_DATA6 field value from a register.
#define ALT_CAN_MSGIF_IF2DB_DATA6_SET | ( | value | ) | (((value) << 16) & 0x00ff0000) |
Produces a ALT_CAN_MSGIF_IF2DB_DATA6 register field value suitable for setting the register.
#define ALT_CAN_MSGIF_IF2DB_DATA7_LSB 24 |
The Least Significant Bit (LSB) position of the ALT_CAN_MSGIF_IF2DB_DATA7 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA7_MSB 31 |
The Most Significant Bit (MSB) position of the ALT_CAN_MSGIF_IF2DB_DATA7 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA7_WIDTH 8 |
The width in bits of the ALT_CAN_MSGIF_IF2DB_DATA7 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA7_SET_MSK 0xff000000 |
The mask used to set the ALT_CAN_MSGIF_IF2DB_DATA7 register field value.
#define ALT_CAN_MSGIF_IF2DB_DATA7_CLR_MSK 0x00ffffff |
The mask used to clear the ALT_CAN_MSGIF_IF2DB_DATA7 register field value.
#define ALT_CAN_MSGIF_IF2DB_DATA7_RESET 0x0 |
The reset value of the ALT_CAN_MSGIF_IF2DB_DATA7 register field.
#define ALT_CAN_MSGIF_IF2DB_DATA7_GET | ( | value | ) | (((value) & 0xff000000) >> 24) |
Extracts the ALT_CAN_MSGIF_IF2DB_DATA7 field value from a register.
#define ALT_CAN_MSGIF_IF2DB_DATA7_SET | ( | value | ) | (((value) << 24) & 0xff000000) |
Produces a ALT_CAN_MSGIF_IF2DB_DATA7 register field value suitable for setting the register.
#define ALT_CAN_MSGIF_IF2DB_OFST 0x34 |
The byte offset of the ALT_CAN_MSGIF_IF2DB register from the beginning of the component.
#define ALT_CAN_MSGIF_IF2DB_ADDR | ( | base | ) | ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_CAN_MSGIF_IF2DB_OFST)) |
The address of the ALT_CAN_MSGIF_IF2DB register.
typedef struct ALT_CAN_MSGIF_IF2DB_s ALT_CAN_MSGIF_IF2DB_t |
The typedef declaration for register ALT_CAN_MSGIF_IF2DB.