AGHAF  4.5.1
Annecy electronique Generic Hardware Access Framework
aghaf_can_enums.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

AGHAF_CAN_PERIODIC_FLAGS

#define AGHAF_CAN_PERIODIC_NO_RESTART   (1<<0)
 Don't restart period.
 
AGHAF_CAN_MSG_FLAGS

#define AGHAF_CAN_MSG_BRS   (1<<3)
 Bit Rate Switch (Only evaluated if FD format is enabled)
 
#define AGHAF_CAN_MSG_ESI   (1<<4)
 Error State Indicator (Only evaluated if FD format is enabled)
 
#define AGHAF_CAN_MSG_EVENT_DATA   (1<<5)
 Report Tx data in CanEventMessage / Event CanEventMessage has valid data according to dataLen.
 
#define AGHAF_CAN_MSG_FDF   (1<<2)
 FD format.
 
#define AGHAF_CAN_MSG_RTR   (1<<1)
 Remote Transmission request (Message is transmitted according to ISO11898-1 even if FD format is set)
 
#define AGHAF_CAN_MSG_XTD   (1<<0)
 Extended identifier (29-bit CAN ID)
 

Enumerations

enum  AGHAF_CAN_Error {
  AGHAF_CAN_ERROR_NONE = 0 , AGHAF_CAN_ERROR_STUFF , AGHAF_CAN_ERROR_FORM , AGHAF_CAN_ERROR_ACK ,
  AGHAF_CAN_ERROR_BIT1 , AGHAF_CAN_ERROR_BIT0 , AGHAF_CAN_ERROR_CRC
}
 Enumerator to describe the error on the bus. More...
 
enum  AGHAF_CAN_Mode { AGHAF_CAN_MODE_FD = 0x00 , AGHAF_CAN_MODE_HS = 0x01 , AGHAF_CAN_MODE_LS = 0x02 }
 Possible modes for CAN. More...
 
enum  AGHAF_CAN_Param {
  CAN_PARAM_MODE , CAN_PARAM_BAUDRATE , CAN_PARAM_BAUDRATE_FD , CAN_PARAM_SAMPLEPOINT ,
  CAN_PARAM_SAMPLEPOINT_FD , CAN_PARAM_SYNCJUMP_WIDTH , CAN_PARAM_SYNCJUMP_WIDTH_FD , CAN_PARAM_LISTEN_ONLY ,
  CAN_PARAM_TERMINATION , CAN_PARAM_TERMINATION_LS , CAN_PARAM_NO_EVENT
}
 List of parameters used to configure a CAN bus. More...
 

Enumeration Type Documentation

◆ AGHAF_CAN_Error

Enumerator to describe the error on the bus.

Enumerator
AGHAF_CAN_ERROR_NONE 

No error.

AGHAF_CAN_ERROR_STUFF 

More than 5 equal bits in a sequence have occurred in a part of a received message where this is not allowed.

AGHAF_CAN_ERROR_FORM 

A fixed format part of a received frame has the wrong format.

AGHAF_CAN_ERROR_ACK 

The message transmitted by the device was not acknowledged by another node.

AGHAF_CAN_ERROR_BIT1 

Device tried to send a recessive level but the monitored bus value was dominant.

AGHAF_CAN_ERROR_BIT0 

Device tried to send a dominant level but the monitored bus value was recessive.

AGHAF_CAN_ERROR_CRC 

The CRC check sum of a received message was incorrect.

◆ AGHAF_CAN_Mode

Possible modes for CAN.

Enumerator
AGHAF_CAN_MODE_FD 

CAN FD

Enable CAN High Speed and FD transmition and reception.
Use CAN High Speed and FD termination settings (CAN_PARAM_TERMINATION).

AGHAF_CAN_MODE_HS 

CAN High Speed

Enable CAN High Speed transmition and reception.
Use CAN High Speed and FD termination settings (CAN_PARAM_TERMINATION).

AGHAF_CAN_MODE_LS 

CAN Low Speed

Enable CAN Low Speed transmition and reception.
Use CAN Low Speed termination settings (CAN_PARAM_TERMINATION_LS).

◆ AGHAF_CAN_Param

List of parameters used to configure a CAN bus.

Enumerator
CAN_PARAM_MODE 

CAN mode settings.

Use: AGHAF_CAN_Mode
Default: AGHAF_CAN_MODE_FD

CAN_PARAM_BAUDRATE 

Nominal CAN baudrate in bps

Max: 1000000 bps (1 Mbps)
Default: 500000 bps (500 kbps)

CAN_PARAM_BAUDRATE_FD 

Baudrate to be used during the high bitrate phase of CAN FD frame

Max: 5000000 bps (5 Mbps)
Default: 1000000 bps (1 Mbps)

CAN_PARAM_SAMPLEPOINT 

Desired bit sample point as a percentage of the bit time

Range: [0, 100] %
Default: 80 %

CAN_PARAM_SAMPLEPOINT_FD 

Desired bit sample point as a percentage of the bit time
to be used during the high bitrate phase of CAN FD frame

Range: [0, 100] %
Default: 80 %

CAN_PARAM_SYNCJUMP_WIDTH 

Desired synchronization jump bit has a percentage of bit time

Range: [0, 100] %
Default: 15 %

CAN_PARAM_SYNCJUMP_WIDTH_FD 

Desired synchronization jump bit has a percentage of bit time
to be used during the high bitrate phase of CAN FD frame

Range: [0, 100] %
Default: 15 %

CAN_PARAM_LISTEN_ONLY 

Enable listen only mode.
CAN controler will no longer acknowledge received frames.

Range: [0, 1]
Default: 0 (disabled)

CAN_PARAM_TERMINATION 

CAN High Speed and FD termination settings.
Use one of the value returned by supported CAN termination function.

0 no termination
Default: 0 (no termination)

CAN_PARAM_TERMINATION_LS 

CAN Low Speed termination settings.
Use one of the value returned by supported CAN Low Speed termination function.

0 no termination
Default: 0 (no termination)

CAN_PARAM_NO_EVENT 

Disable CAN events reporting.
This will significantly reduce the load on the USB bus if you don't need these events.
Protocols requiring CAN will continue to function normally (e.g. DoCAN).

Range: [0, 1]
Default: 0 (report CAN events)