CC27xxDriverLibrary
[can.h] Controller Area Network
Collaboration diagram for [can.h] Controller Area Network:

Macros

#define CANSS_CTRL_EXT_TIMESTAMP_EN   (CANFD_MCANSS_CTRL_EXT_TS_CNTR_EN_M)
 External Timestamp Counter Enable. More...
 
#define CANSS_CTRL_AUTOWAKEUP_EN   (CANFD_MCANSS_CTRL_AUTOWAKEUP_M)
 Automatic Wakeup Enable. More...
 
#define CANSS_CTRL_WAKEUP_REQ_EN   (CANFD_MCANSS_CTRL_WAKEUPREQEN_M)
 Wakeup Request Enable. More...
 
#define CANSS_CTRL_DEBUG_SUSPEND_EN   (CANFD_MCANSS_CTRL_DBGSUSP_FREE_M)
 Debug Suspend Enable. More...
 
#define CANSS_STATUS_ENABLE_FDOE   (CANFD_MCANSS_STAT_ENABLE_FDOE_M)
 CAN FD Operation Enabled. More...
 
#define CANSS_STATUS_MEM_INIT_DONE   (CANFD_MCANSS_STAT_MEM_INIT_DONE_M)
 Memory Initialization Done. More...
 
#define CANSS_INT_EXT_TIMESTAMP_OVERFLOW   (CANFD_MCANSS_IRS_EXT_TS_CNTR_OVFL_M)
 External Timestamp Counter Overflow Interrupt. More...
 
#define CANSS_EOI_EXT_TIMESTAMP   0U
 End Of Interrupt for External Timestamp. More...
 
#define CANSS_EOI_MCAN0   1U
 End Of Interrupt for MCAN Interrupt Line 0. More...
 
#define CANSS_EOI_MCAN1   2U
 End Of Interrupt for MCAN Interrupt Line 1. More...
 
#define CAN_INT_LINE0   0U
 Interrupt Line 0. More...
 
#define CAN_INT_LINE1   1U
 Interrupt Line 1. More...
 
#define CAN_INT_DMA_DONE1   (CANFD_IMASK0_DMA_DONE1_M)
 DMA Done Channel 1 Event Interrupt. More...
 
#define CAN_INT_DMA_DONE0   (CANFD_IMASK0_DMA_DONE0_M)
 DMA Done Channel 0 Event Interrupt. More...
 
#define CAN_INT_FILTER_EVENT2   (CANFD_IMASK0_FE2_M)
 Rx Buffer Filter Event 2 Interrupt. More...
 
#define CAN_INT_EXT_TS_OR_WAKE   (CANFD_IMASK0_EXT_TS_OR_WAKE_M)
 External Timestamp or Wake Event Interrupt. More...
 
#define CAN_INT_DED   (CANFD_IMASK0_DED_M)
 Double Error Detected Event Interrupt. More...
 
#define CAN_INT_SEC   (CANFD_IMASK0_SEC_M)
 Single Error Corrected Event Interrupt. More...
 
#define CAN_INT_INTL1   (CANFD_IMASK0_INTL1_M)
 MCAN Interrupt Line 1 Event Interrupt. More...
 
#define CAN_INT_INTL0   (CANFD_IMASK0_INTL0_M)
 MCAN Interrupt Line 0 Event Interrupt. More...
 
#define CAN_INT_MASK   (0x0000000FU)
 Mask of all interrupts. More...
 
#define CANSS_CLK_DIVIDE_BY_1   0U
 Divides input clock by 1. More...
 
#define CANSS_CLK_DIVIDE_BY_2   1U
 Divides input clock by 2. More...
 
#define CANSS_CLK_DIVIDE_BY_4   2U
 Divides input clock by 4. More...
 
#define CANSS_CLKCTRL_WAKEUP_GLITCH_FILTER_EN   (CANFD_MCANSS_CLKCTL_WKUP_GLTFLT_EN_M)
 Wakeup Glitch Filter Enable. More...
 
#define CANSS_CLKCTRL_WAKEUP_INT_EN   (CANFD_MCANSS_CLKCTL_WAKEUP_INT_EN_M)
 Wakeup Interrupt Enable. More...
 
#define CANSS_CLKCTRL_STOP_REQ   (CANFD_MCANSS_CLKCTL_STOPREQ_M)
 Clock Stop Request. More...
 
#define CANSS_CLKSTAT_CLKSTOP_REQ_OVR   (CANFD_MCANSS_CLKSTS_STOPREQ_HW_OVR_M)
 Clock Stop Request Hardware Override (1 = Request cleared by HW) More...
 
#define CANSS_CLKSTAT_CLKSTOP_ACK   (CANFD_MCANSS_CLKSTS_CLKSTOP_ACKSTS_M)
 Clock Stop Acknowledge. More...
 

Functions

__STATIC_INLINE void CANSSSetControl (uint32_t flags)
 Sets the specified CAN Subsystem control feature flag(s). More...
 
__STATIC_INLINE void CANSSClearControl (uint32_t flags)
 Clears the specified CAN Subsystem control feature flag(s). More...
 
__STATIC_INLINE uint32_t CANSSGetStatus (void)
 Gets the CAN Subsystem status. More...
 
__STATIC_INLINE uint32_t CANSSGetMaskedIntStatus (void)
 Gets the CAN Subsystem masked interrupt status. More...
 
__STATIC_INLINE uint32_t CANSSGetRawIntStatus (void)
 Gets the CAN Subsystem raw interrupt status. More...
 
__STATIC_INLINE void CANSSClearInt (uint32_t flags)
 Clears the specified CAN Subsytem interrupt enable(s). More...
 
__STATIC_INLINE void CANSSEnableInt (uint32_t flags)
 Enables the specified CAN Subsytem interrupt(s). More...
 
__STATIC_INLINE void CANSSDisableInt (uint32_t flags)
 Disables the specified CAN Subsytem interrupt(s). More...
 
void CANSSSetEndOfInt (uint32_t eoi) __attribute__((weak))
 Sets the CAN Subsystem End Of Interrupt (EOI). More...
 
__STATIC_INLINE void CANSSSetExtTimestampPrescaler (uint32_t prescaler)
 Sets the CAN Subsystem external timestamp prescaler. More...
 
__STATIC_INLINE uint32_t CANSSGetExtTSUnservicedIntCounter (void)
 Gets the CAN Subsystem external timestamp unserviced interrupts counter. More...
 
__STATIC_INLINE void CANSetIntMask (uint32_t lineNum, uint32_t flags)
 Sets the CAN peripheral interrupt mask. More...
 
__STATIC_INLINE void CANClearIntMask (uint8_t lineNum, uint32_t flags)
 Clears the CAN peripheral interrupt mask. More...
 
__STATIC_INLINE uint32_t CANGetMaskedIntStatus (uint8_t lineNum)
 Gets the CAN masked peripheral interrupt status. More...
 
__STATIC_INLINE uint32_t CANGetRawIntStatus (uint8_t lineNum)
 Gets the CAN raw peripheral interrupt status. More...
 
void CANClearInt (uint8_t lineNum, uint32_t flags) __attribute__((weak))
 Clears the specified CAN peripheral interrupt(s). More...
 
__STATIC_INLINE void CANSSSetClockDivider (uint32_t ratio)
 Sets the CAN Subsystem clock divider ratio for the functional clock input. More...
 
void CANSSSetClkStopCtrl (uint32_t flags) __attribute__((weak))
 Sets the CAN Subsystem clock stop control feature flag(s). More...
 
void CANSSClearClkStopCtrl (uint32_t flags) __attribute__((weak))
 Clears the CAN Subsystem clock stop control feature flag(s). More...
 
__STATIC_INLINE uint32_t CANSSGetClkStopCtrlStatus (void)
 Gets the CAN Subsystem clock stop control status. More...
 

Detailed Description

Macro Definition Documentation

§ CANSS_CTRL_EXT_TIMESTAMP_EN

#define CANSS_CTRL_EXT_TIMESTAMP_EN   (CANFD_MCANSS_CTRL_EXT_TS_CNTR_EN_M)

External Timestamp Counter Enable.

§ CANSS_CTRL_AUTOWAKEUP_EN

#define CANSS_CTRL_AUTOWAKEUP_EN   (CANFD_MCANSS_CTRL_AUTOWAKEUP_M)

Automatic Wakeup Enable.

§ CANSS_CTRL_WAKEUP_REQ_EN

#define CANSS_CTRL_WAKEUP_REQ_EN   (CANFD_MCANSS_CTRL_WAKEUPREQEN_M)

Wakeup Request Enable.

§ CANSS_CTRL_DEBUG_SUSPEND_EN

#define CANSS_CTRL_DEBUG_SUSPEND_EN   (CANFD_MCANSS_CTRL_DBGSUSP_FREE_M)

Debug Suspend Enable.

§ CANSS_STATUS_ENABLE_FDOE

#define CANSS_STATUS_ENABLE_FDOE   (CANFD_MCANSS_STAT_ENABLE_FDOE_M)

CAN FD Operation Enabled.

§ CANSS_STATUS_MEM_INIT_DONE

#define CANSS_STATUS_MEM_INIT_DONE   (CANFD_MCANSS_STAT_MEM_INIT_DONE_M)

Memory Initialization Done.

§ CANSS_INT_EXT_TIMESTAMP_OVERFLOW

#define CANSS_INT_EXT_TIMESTAMP_OVERFLOW   (CANFD_MCANSS_IRS_EXT_TS_CNTR_OVFL_M)

External Timestamp Counter Overflow Interrupt.

§ CANSS_EOI_EXT_TIMESTAMP

#define CANSS_EOI_EXT_TIMESTAMP   0U

End Of Interrupt for External Timestamp.

§ CANSS_EOI_MCAN0

#define CANSS_EOI_MCAN0   1U

End Of Interrupt for MCAN Interrupt Line 0.

§ CANSS_EOI_MCAN1

#define CANSS_EOI_MCAN1   2U

End Of Interrupt for MCAN Interrupt Line 1.

§ CAN_INT_LINE0

#define CAN_INT_LINE0   0U

§ CAN_INT_LINE1

#define CAN_INT_LINE1   1U

Interrupt Line 1.

§ CAN_INT_DMA_DONE1

#define CAN_INT_DMA_DONE1   (CANFD_IMASK0_DMA_DONE1_M)

DMA Done Channel 1 Event Interrupt.

§ CAN_INT_DMA_DONE0

#define CAN_INT_DMA_DONE0   (CANFD_IMASK0_DMA_DONE0_M)

DMA Done Channel 0 Event Interrupt.

§ CAN_INT_FILTER_EVENT2

#define CAN_INT_FILTER_EVENT2   (CANFD_IMASK0_FE2_M)

Rx Buffer Filter Event 2 Interrupt.

§ CAN_INT_EXT_TS_OR_WAKE

#define CAN_INT_EXT_TS_OR_WAKE   (CANFD_IMASK0_EXT_TS_OR_WAKE_M)

External Timestamp or Wake Event Interrupt.

§ CAN_INT_DED

#define CAN_INT_DED   (CANFD_IMASK0_DED_M)

Double Error Detected Event Interrupt.

§ CAN_INT_SEC

#define CAN_INT_SEC   (CANFD_IMASK0_SEC_M)

Single Error Corrected Event Interrupt.

§ CAN_INT_INTL1

#define CAN_INT_INTL1   (CANFD_IMASK0_INTL1_M)

MCAN Interrupt Line 1 Event Interrupt.

§ CAN_INT_INTL0

#define CAN_INT_INTL0   (CANFD_IMASK0_INTL0_M)

MCAN Interrupt Line 0 Event Interrupt.

§ CAN_INT_MASK

#define CAN_INT_MASK   (0x0000000FU)

Mask of all interrupts.

§ CANSS_CLK_DIVIDE_BY_1

#define CANSS_CLK_DIVIDE_BY_1   0U

Divides input clock by 1.

§ CANSS_CLK_DIVIDE_BY_2

#define CANSS_CLK_DIVIDE_BY_2   1U

Divides input clock by 2.

§ CANSS_CLK_DIVIDE_BY_4

#define CANSS_CLK_DIVIDE_BY_4   2U

Divides input clock by 4.

§ CANSS_CLKCTRL_WAKEUP_GLITCH_FILTER_EN

#define CANSS_CLKCTRL_WAKEUP_GLITCH_FILTER_EN   (CANFD_MCANSS_CLKCTL_WKUP_GLTFLT_EN_M)

Wakeup Glitch Filter Enable.

§ CANSS_CLKCTRL_WAKEUP_INT_EN

#define CANSS_CLKCTRL_WAKEUP_INT_EN   (CANFD_MCANSS_CLKCTL_WAKEUP_INT_EN_M)

Wakeup Interrupt Enable.

§ CANSS_CLKCTRL_STOP_REQ

#define CANSS_CLKCTRL_STOP_REQ   (CANFD_MCANSS_CLKCTL_STOPREQ_M)

Clock Stop Request.

§ CANSS_CLKSTAT_CLKSTOP_REQ_OVR

#define CANSS_CLKSTAT_CLKSTOP_REQ_OVR   (CANFD_MCANSS_CLKSTS_STOPREQ_HW_OVR_M)

Clock Stop Request Hardware Override (1 = Request cleared by HW)

§ CANSS_CLKSTAT_CLKSTOP_ACK

#define CANSS_CLKSTAT_CLKSTOP_ACK   (CANFD_MCANSS_CLKSTS_CLKSTOP_ACKSTS_M)

Clock Stop Acknowledge.

Function Documentation

§ CANSSSetControl()

__STATIC_INLINE void CANSSSetControl ( uint32_t  flags)

Sets the specified CAN Subsystem control feature flag(s).

Parameters
flagsis a bit mask of the features to enable. The parameter is the bitwise OR of any of the following values:
See also
CANSSClearControl()
Returns
None

§ CANSSClearControl()

__STATIC_INLINE void CANSSClearControl ( uint32_t  flags)

Clears the specified CAN Subsystem control feature flag(s).

Parameters
flagsis a bit mask of the features to disable. The parameter is the bitwise OR of any of the following values:
See also
CANSSSetControl()
Returns
None

§ CANSSGetStatus()

__STATIC_INLINE uint32_t CANSSGetStatus ( void  )

Gets the CAN Subsystem status.

Note
After reset, SW must wait for 'Memory Initialization Done' before the MCAN core is configured and activated.
Returns
A bit mask of the CAN Subsystem status:

§ CANSSGetMaskedIntStatus()

__STATIC_INLINE uint32_t CANSSGetMaskedIntStatus ( void  )

Gets the CAN Subsystem masked interrupt status.

Returns
The CAN Subsystem masked interrupt status, enumerated as a bit field of:

§ CANSSGetRawIntStatus()

__STATIC_INLINE uint32_t CANSSGetRawIntStatus ( void  )

Gets the CAN Subsystem raw interrupt status.

Returns
The CAN Subsystem raw interrupt status, enumerated as a bit field of:

§ CANSSClearInt()

__STATIC_INLINE void CANSSClearInt ( uint32_t  flags)

Clears the specified CAN Subsytem interrupt enable(s).

Parameters
flagsA bit mask of the CAN interrupts to clear: The parameter is the bitwise OR of any of the following values:
Returns
None

§ CANSSEnableInt()

__STATIC_INLINE void CANSSEnableInt ( uint32_t  flags)

Enables the specified CAN Subsytem interrupt(s).

Parameters
flagsA bit mask of the CAN Subsytem interrupts: The parameter is the bitwise OR of any of the following values:
See also
CANSSDisableInt()
Returns
None

§ CANSSDisableInt()

__STATIC_INLINE void CANSSDisableInt ( uint32_t  flags)

Disables the specified CAN Subsytem interrupt(s).

Parameters
flagsA bit mask of the CAN Subsytem interrupts: The parameter is the bitwise OR of any of the following values:
See also
CANSSEnableInt()
Returns
None

References __attribute__(), and CANSSSetEndOfInt().

§ CANSSSetEndOfInt()

void CANSSSetEndOfInt ( uint32_t  eoi)

Sets the CAN Subsystem End Of Interrupt (EOI).

Note
Setting the EOI will clear the associated interrupt. If the unserviced interrupt counter is > 1, another interrupt is generated. For MCAN Interrupts, this function should be called after clearing the flags in MCAN.IR.
Parameters
eoiis one of the following:
Returns
None

Referenced by CANSSDisableInt().

§ CANSSSetExtTimestampPrescaler()

__STATIC_INLINE void CANSSSetExtTimestampPrescaler ( uint32_t  prescaler)

Sets the CAN Subsystem external timestamp prescaler.

Parameters
prescalerthe external timestamp count rate is the host (system) clock rate divided by this value, except in the case of 0. A zero value will act identically to a value of 0x000001.
Returns
None

§ CANSSGetExtTSUnservicedIntCounter()

__STATIC_INLINE uint32_t CANSSGetExtTSUnservicedIntCounter ( void  )

Gets the CAN Subsystem external timestamp unserviced interrupts counter.

Returns
The number of external timestamp unserviced rollover interrupts.

§ CANSetIntMask()

__STATIC_INLINE void CANSetIntMask ( uint32_t  lineNum,
uint32_t  flags 
)

Sets the CAN peripheral interrupt mask.

Parameters
lineNumInterrupt Line to set the interrupt mask for:
flagsA bit mask of the CAN interrupts: The parameter is the bitwise OR of any of the following values:
See also
CANClearIntMask()
Returns
None

References CAN_INT_LINE0.

§ CANClearIntMask()

__STATIC_INLINE void CANClearIntMask ( uint8_t  lineNum,
uint32_t  flags 
)

Clears the CAN peripheral interrupt mask.

Parameters
lineNumInterrupt Line to clear the interrupt mask for:
flagsA bit mask of the CAN interrupts: The parameter is the bitwise OR of any of the following values:
See also
CANSetIntMask()
Returns
None

References CAN_INT_LINE0.

§ CANGetMaskedIntStatus()

__STATIC_INLINE uint32_t CANGetMaskedIntStatus ( uint8_t  lineNum)

Gets the CAN masked peripheral interrupt status.

Parameters
lineNumis the interrupt line number to get the interrupt status for:
Returns
The CAN masked interrupt status, enumerated as a bit field of:

References CAN_INT_LINE0.

§ CANGetRawIntStatus()

__STATIC_INLINE uint32_t CANGetRawIntStatus ( uint8_t  lineNum)

Gets the CAN raw peripheral interrupt status.

Parameters
lineNumis the interrupt line number to get the interrupt status for:
Returns
The CAN raw interrupt status, enumerated as a bit field of:

References __attribute__(), CAN_INT_LINE0, and CANClearInt().

§ CANClearInt()

void CANClearInt ( uint8_t  lineNum,
uint32_t  flags 
)

Clears the specified CAN peripheral interrupt(s).

Note
For MCAN Interrupts, this function should be called before clearing the flags in MCAN.IR.
Parameters
lineNumInterrupt Line to clear the interrupt mask for:
flagsA bit mask of the CAN interrupts to clear: The parameter is the bitwise OR of any of the following values:
Returns
None

Referenced by __attribute__(), and CANGetRawIntStatus().

§ CANSSSetClockDivider()

__STATIC_INLINE void CANSSSetClockDivider ( uint32_t  ratio)

Sets the CAN Subsystem clock divider ratio for the functional clock input.

Note
The functional clock input frequency is 80 MHz.
Parameters
ratiois one of the following clock divider ratios:
Returns
None

References __attribute__(), CANSSClearClkStopCtrl(), and CANSSSetClkStopCtrl().

§ CANSSSetClkStopCtrl()

void CANSSSetClkStopCtrl ( uint32_t  flags)

Sets the CAN Subsystem clock stop control feature flag(s).

Parameters
flagsis a bit mask of the features to enable. The parameter is the bitwise OR of any of the following values:
See also
CANSSClearClkStopCtrl
Returns
None

Referenced by __attribute__(), and CANSSSetClockDivider().

§ CANSSClearClkStopCtrl()

void CANSSClearClkStopCtrl ( uint32_t  flags)

Clears the CAN Subsystem clock stop control feature flag(s).

Parameters
flagsis a bit mask of the features to disable. The parameter is the bitwise OR of any of the following values:
See also
CANSSSetClkStopCtrl
Returns
None

Referenced by __attribute__(), and CANSSSetClockDivider().

§ CANSSGetClkStopCtrlStatus()

__STATIC_INLINE uint32_t CANSSGetClkStopCtrlStatus ( void  )

Gets the CAN Subsystem clock stop control status.

Returns
The CAN Subsystem clock stop control status, enumerated as a bit field of:
None