![]() |
Dataflow Runtime API
3.1.1.0
|
Classes | |
struct | CanConfigMessageObject |
Structure to configure a CAN message object. More... | |
struct | CanRxFrame |
Structure of a received CAN frame. More... | |
struct | CanTxFrame |
Structure of a CAN frame to transmit. More... | |
Functions | |
void | CAN_Init (const CanModuleAddress moduleBaseAddress, const CanBitRate bitRate) |
Initialize the CAN module. More... | |
void | CAN_ConfigureMessage (const CanModuleAddress moduleBaseAddress, const CanMessageObjectNumber messageNumber, const CanConfigMessageObject *pConfig) |
Configure a can message. More... | |
void | CAN_StartTransmission (const CanModuleAddress moduleBaseAddress, const CanMessageObjectNumber messageNumber, const CanTxFrame *pTxMessage) |
Transfer the data bytes of a message into a message object. More... | |
uint16_t | CAN_GetInterruptIdentifier (const CanModuleAddress moduleBaseAddress) |
Returns the interrupt identifier (the number indicates the source of the interrupt). More... | |
void | CAN_ReadReceivedData (const CanModuleAddress moduleBaseAddress, const CanMessageObjectNumber messageNumber, CanRxFrame *pRxMessage) |
Get the data bytes of a message from a message object. More... | |
CanBusError | CAN_GetCanBusError (const CanModuleAddress moduleBaseAddress) |
Returns a CAN bus error code. More... | |
bool | CAN_IsInitBitSet (const CanModuleAddress moduleBaseAddress) |
Returns true if the Init bit of the CTL register is set, false otherwise. More... | |
bool | CAN_IsBusOffBitSet (const CanModuleAddress moduleBaseAddress) |
Returns true if the BOff bit of the ES register is set, false otherwise. More... | |
void | CAN_StartBusOffRecoverySequence (const CanModuleAddress moduleBaseAddress) |
Start the Bus off recovery sequence described in the TRM SPRUH73K Chapter 23.3.8.2.2. More... | |
enum CanBitRate |
enum CanBusError |
Enumeration of the available CAN message object numbers.
There are up to 64 message objects available on the AM335x. Message object number 1 has the highest priority.
enum CanModuleAddress |
Controller Area Network (CAN).
The Controller Area Network is a serial communications protocol which efficiently supports distributed realtime control with a high level of security. The DCAN module supports bitrates up to 1 Mbit/s and is compliant to the CAN 2.0B protocol specification. The core IP within DCAN is provided by Bosch. This device includes two instantiations of the DCAN controller: DCAN0 and DCAN1. Enumeration of the available CAN modules
Enumerator | |
---|---|
CanModuleAddress_Can0 | |
CanModuleAddress_Can1 |
void CAN_ConfigureMessage | ( | const CanModuleAddress | moduleBaseAddress, |
const CanMessageObjectNumber | messageNumber, | ||
const CanConfigMessageObject * | pConfig | ||
) |
Configure a can message.
moduleBaseAddress | |
messageNumber | |
pConfig |
CanBusError CAN_GetCanBusError | ( | const CanModuleAddress | moduleBaseAddress | ) |
Returns a CAN bus error code.
moduleBaseAddress |
uint16_t CAN_GetInterruptIdentifier | ( | const CanModuleAddress | moduleBaseAddress | ) |
Returns the interrupt identifier (the number indicates the source of the interrupt).
If several interrupts are pending, the CAN interrupt register will point to the pending interrupt with the highest priority. Among the message interrupts, the message object's interrupt priority decreases with increasing message number.
moduleBaseAddress |
void CAN_Init | ( | const CanModuleAddress | moduleBaseAddress, |
const CanBitRate | bitRate | ||
) |
Initialize the CAN module.
1) Message and Error interrupts are enabled at DCANx_INT0 2) Automatic retransmission is enabled 3) There are up to 64 messages available, for each message a message object has to be configured 4) Non-configured messages will be ignored and filtered by hardware
moduleBaseAddress | |
bitRate |
bool CAN_IsBusOffBitSet | ( | const CanModuleAddress | moduleBaseAddress | ) |
Returns true if the BOff bit of the ES register is set, false otherwise.
moduleBaseAddress |
bool CAN_IsInitBitSet | ( | const CanModuleAddress | moduleBaseAddress | ) |
Returns true if the Init bit of the CTL register is set, false otherwise.
moduleBaseAddress |
void CAN_ReadReceivedData | ( | const CanModuleAddress | moduleBaseAddress, |
const CanMessageObjectNumber | messageNumber, | ||
CanRxFrame * | pRxMessage | ||
) |
Get the data bytes of a message from a message object.
moduleBaseAddress | |
messageNumber | |
pRxMessage |
void CAN_StartBusOffRecoverySequence | ( | const CanModuleAddress | moduleBaseAddress | ) |
Start the Bus off recovery sequence described in the TRM SPRUH73K Chapter 23.3.8.2.2.
moduleBaseAddress |
void CAN_StartTransmission | ( | const CanModuleAddress | moduleBaseAddress, |
const CanMessageObjectNumber | messageNumber, | ||
const CanTxFrame * | pTxMessage | ||
) |
Transfer the data bytes of a message into a message object.
moduleBaseAddress | |
messageNumber | |
pTxMessage |