TCAN4550
1p2
|
#include "TCAN4550.h"
Go to the source code of this file.
Functions | |
bool | TCAN4x5x_MCAN_EnableProtectedRegisters (void) |
Enable Protected MCAN Registers. More... | |
bool | TCAN4x5x_MCAN_DisableProtectedRegisters (void) |
Disable Protected MCAN Registers. More... | |
bool | TCAN4x5x_MCAN_ConfigureCCCRRegister (TCAN4x5x_MCAN_CCCR_Config *cccrConfig) |
Configure the MCAN CCCR Register. More... | |
void | TCAN4x5x_MCAN_ReadCCCRRegister (TCAN4x5x_MCAN_CCCR_Config *cccrConfig) |
Read the MCAN CCCR configuration register. More... | |
void | TCAN4x5x_MCAN_ReadDataTimingFD_Simple (TCAN4x5x_MCAN_Data_Timing_Simple *dataTiming) |
Reads the MCAN data time settings, using the simple struct. More... | |
void | TCAN4x5x_MCAN_ReadDataTimingFD_Raw (TCAN4x5x_MCAN_Data_Timing_Raw *dataTiming) |
Reads the MCAN data time settings, using the raw MCAN struct. More... | |
bool | TCAN4x5x_MCAN_ConfigureDataTiming_Simple (TCAN4x5x_MCAN_Data_Timing_Simple *dataTiming) |
Writes the MCAN data time settings, using the simple data timing struct. More... | |
bool | TCAN4x5x_MCAN_ConfigureDataTiming_Raw (TCAN4x5x_MCAN_Data_Timing_Raw *dataTiming) |
Writes the MCAN data time settings, using the raw MCAN data timing struct. More... | |
void | TCAN4x5x_MCAN_ReadNominalTiming_Simple (TCAN4x5x_MCAN_Nominal_Timing_Simple *nomTiming) |
Reads the MCAN nominal/arbitration time settings, using the simple timing struct. More... | |
void | TCAN4x5x_MCAN_ReadNominalTiming_Raw (TCAN4x5x_MCAN_Nominal_Timing_Raw *nomTiming) |
Reads the MCAN nominal/arbitration time settings, using the raw MCAN timing struct. More... | |
bool | TCAN4x5x_MCAN_ConfigureNominalTiming_Simple (TCAN4x5x_MCAN_Nominal_Timing_Simple *nomTiming) |
Writes the MCAN nominal timing settings, using the simple nominal timing struct. More... | |
bool | TCAN4x5x_MCAN_ConfigureNominalTiming_Raw (TCAN4x5x_MCAN_Nominal_Timing_Raw *nomTiming) |
Writes the MCAN nominal timing settings, using the raw MCAN nominal timing struct. More... | |
bool | TCAN4x5x_MCAN_ConfigureGlobalFilter (TCAN4x5x_MCAN_Global_Filter_Configuration *gfc) |
Configures the MCAN global filter configuration register, using the passed Global Filter Configuration struct. More... | |
bool | TCAN4x5x_MRAM_Configure (TCAN4x5x_MRAM_Config *MRAMConfig) |
Configures the MRAM registers. More... | |
void | TCAN4x5x_MRAM_Clear (void) |
Clear (Zero-fill) the contents of MRAM. More... | |
uint8_t | TCAN4x5x_MCAN_ReadNextFIFO (TCAN4x5x_MCAN_FIFO_Enum FIFODefine, TCAN4x5x_MCAN_RX_Header *header, uint8_t dataPayload[]) |
Read the next MCAN FIFO element. More... | |
uint8_t | TCAN4x5x_MCAN_ReadRXBuffer (uint8_t bufIndex, TCAN4x5x_MCAN_RX_Header *header, uint8_t dataPayload[]) |
Read the specified RX buffer element. More... | |
uint32_t | TCAN4x5x_MCAN_WriteTXBuffer (uint8_t bufIndex, TCAN4x5x_MCAN_TX_Header *header, uint8_t dataPayload[]) |
Write CAN message to the specified TX buffer. More... | |
bool | TCAN4x5x_MCAN_TransmitBufferContents (uint8_t bufIndex) |
Transmit TX buffer contents of the specified tx buffer. More... | |
bool | TCAN4x5x_MCAN_WriteSIDFilter (uint8_t filterIndex, TCAN4x5x_MCAN_SID_Filter *filter) |
Write MCAN Standard ID filter into MRAM. More... | |
bool | TCAN4x5x_MCAN_ReadSIDFilter (uint8_t filterIndex, TCAN4x5x_MCAN_SID_Filter *filter) |
Read a MCAN Standard ID filter from MRAM. More... | |
bool | TCAN4x5x_MCAN_WriteXIDFilter (uint8_t filterIndex, TCAN4x5x_MCAN_XID_Filter *filter) |
Write MCAN Extended ID filter into MRAM. More... | |
bool | TCAN4x5x_MCAN_ReadXIDFilter (uint8_t filterIndex, TCAN4x5x_MCAN_XID_Filter *filter) |
Read MCAN Extended ID filter from MRAM. More... | |
void | TCAN4x5x_MCAN_ReadInterrupts (TCAN4x5x_MCAN_Interrupts *ir) |
Read the MCAN interrupts. More... | |
void | TCAN4x5x_MCAN_ClearInterrupts (TCAN4x5x_MCAN_Interrupts *ir) |
Clear the MCAN interrupts. More... | |
void | TCAN4x5x_MCAN_ClearInterruptsAll (void) |
Clear all MCAN interrupts. More... | |
void | TCAN4x5x_MCAN_ReadInterruptEnable (TCAN4x5x_MCAN_Interrupt_Enable *ie) |
Read the MCAN interrupt enable register. More... | |
void | TCAN4x5x_MCAN_ConfigureInterruptEnable (TCAN4x5x_MCAN_Interrupt_Enable *ie) |
Configures the MCAN interrupt enable register. More... | |
uint8_t | TCAN4x5x_MCAN_DLCtoBytes (uint8_t inputDLC) |
Converts the CAN message DLC hex value to the number of bytes it corresponds to. More... | |
uint8_t | TCAN4x5x_MCAN_TXRXESC_DataByteValue (uint8_t inputESCValue) |
Converts the MCAN ESC (Element Size) value to number of bytes that it corresponds to. More... | |
uint16_t | TCAN4x5x_Device_ReadDeviceVersion (void) |
Read the TCAN4x5x device version register. More... | |
bool | TCAN4x5x_Device_Configure (TCAN4x5x_DEV_CONFIG *devCfg) |
Configures the device mode and pin register. More... | |
void | TCAN4x5x_Device_ReadConfig (TCAN4x5x_DEV_CONFIG *devCfg) |
Reads the device mode and pin register. More... | |
void | TCAN4x5x_Device_ReadInterrupts (TCAN4x5x_Device_Interrupts *ir) |
Read the device interrupts. More... | |
void | TCAN4x5x_Device_ClearInterrupts (TCAN4x5x_Device_Interrupts *ir) |
Clear the device interrupts. More... | |
void | TCAN4x5x_Device_ClearInterruptsAll (void) |
Clear all device interrupts. More... | |
void | TCAN4x5x_Device_ClearSPIERR (void) |
Clears a SPIERR flag that may be set. More... | |
void | TCAN4x5x_Device_ReadInterruptEnable (TCAN4x5x_Device_Interrupt_Enable *ie) |
Read the device interrupt enable register. More... | |
bool | TCAN4x5x_Device_ConfigureInterruptEnable (TCAN4x5x_Device_Interrupt_Enable *ie) |
Configures the device interrupt enable register. More... | |
bool | TCAN4x5x_Device_SetMode (TCAN4x5x_Device_Mode_Enum modeDefine) |
Sets the TCAN4x5x device mode. More... | |
TCAN4x5x_Device_Mode_Enum | TCAN4x5x_Device_ReadMode (void) |
Reads the TCAN4x5x device mode. More... | |
bool | TCAN4x5x_Device_EnableTestMode (TCAN4x5x_Device_Test_Mode_Enum modeDefine) |
Sets the TCAN4x5x device test mode. More... | |
bool | TCAN4x5x_Device_DisableTestMode (void) |
Disables the TCAN4x5x device test mode. More... | |
TCAN4x5x_Device_Test_Mode_Enum | TCAN4x5x_Device_ReadTestMode (void) |
Reads the TCAN4x5x device test mode. More... | |
bool | TCAN4x5x_WDT_Configure (TCAN4x5x_WDT_Timer_Enum WDTtimeout) |
Configure the watchdog. More... | |
TCAN4x5x_WDT_Timer_Enum | TCAN4x5x_WDT_Read (void) |
Read the watchdog configuration. More... | |
bool | TCAN4x5x_WDT_Enable (void) |
Enable the watchdog timer. More... | |
bool | TCAN4x5x_WDT_Disable (void) |
Disable the watchdog timer. More... | |
void | TCAN4x5x_WDT_Reset (void) |
Reset the watchdog timer. More... | |
Variables | |
uint32_t | TCAN4x5x_MCAN_CACHE [9] |
void TCAN4x5x_Device_ClearInterrupts | ( | TCAN4x5x_Device_Interrupts * | ir | ) |
Clear the device interrupts.
Will attempt to clear any interrupts that are marked as a '1' in the passed TCAN4x5x_Device_Interrupts
struct
*ir | is a pointer to a TCAN4x5x_Device_Interrupts struct containing the interrupt bit fields that will be updated |
Definition at line 1581 of file TCAN4550.c.
References AHB_WRITE_32(), REG_DEV_IR, and TCAN4x5x_Device_Interrupts::word.
void TCAN4x5x_Device_ClearInterruptsAll | ( | void | ) |
Clear all device interrupts.
Clears all device interrupts
Definition at line 1593 of file TCAN4550.c.
References AHB_WRITE_32(), and REG_DEV_IR.
void TCAN4x5x_Device_ClearSPIERR | ( | void | ) |
Clears a SPIERR flag that may be set.
Definition at line 1603 of file TCAN4550.c.
References AHB_WRITE_32(), and REG_SPI_STATUS.
bool TCAN4x5x_Device_Configure | ( | TCAN4x5x_DEV_CONFIG * | devCfg | ) |
Configures the device mode and pin register.
Configures the device mode and pin register based on the passed TCAN4x5x_DEV_CONFIG
struct, but will mask out the reserved bits on a write
*devCfg | is a pointer to a TCAN4x5x_DEV_CONFIG struct containing the desired device mode and pin register values |
true
if configuration successfully done, false
if not Definition at line 1505 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), REG_BITS_DEVICE_MODE_DEVICE_RESET, REG_BITS_DEVICE_MODE_FAIL_SAFE_MASK, REG_BITS_DEVICE_MODE_FORCED_SET_BITS, REG_BITS_DEVICE_MODE_GPO1_FUNC_MASK, REG_BITS_DEVICE_MODE_GPO1_MODE_MASK, REG_BITS_DEVICE_MODE_GPO2_MASK, REG_BITS_DEVICE_MODE_INH_MASK, REG_BITS_DEVICE_MODE_NWKRQ_CONFIG_MASK, REG_BITS_DEVICE_MODE_NWKRQ_VOLT_MASK, REG_BITS_DEVICE_MODE_SWE_MASK, REG_BITS_DEVICE_MODE_TESTMODE_ENMASK, REG_BITS_DEVICE_MODE_WAKE_PIN_MASK, REG_BITS_DEVICE_MODE_WD_CLK_MASK, REG_BITS_DEVICE_MODE_WDT_ACTION_MASK, REG_BITS_DEVICE_MODE_WDT_MASK, REG_BITS_DEVICE_MODE_WDT_RESET_BIT, REG_DEV_MODES_AND_PINS, TCAN4x5x_DEV_CONFIG::RESERVED0, TCAN4x5x_DEV_CONFIG::RESERVED1, TCAN4x5x_DEV_CONFIG::RESERVED2, TCAN4x5x_DEV_CONFIG::RESERVED3, TCAN4x5x_DEV_CONFIG::RESERVED4, TCAN4x5x_DEV_CONFIG::RESERVED5, and TCAN4x5x_DEV_CONFIG::word.
bool TCAN4x5x_Device_ConfigureInterruptEnable | ( | TCAN4x5x_Device_Interrupt_Enable * | ie | ) |
Configures the device interrupt enable register.
Configures the device interrupt enable register based on the passed TCAN4x5x_Device_Interrupt_Enable
struct
*ie | is a pointer to a TCAN4x5x_Device_Interrupt_Enable struct containing the desired enabled interrupt bits |
true
if configuration successfully done, false
if not Definition at line 1633 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), REG_BITS_DEVICE_IE_MASK, REG_DEV_IE, and TCAN4x5x_Device_Interrupt_Enable::word.
bool TCAN4x5x_Device_DisableTestMode | ( | void | ) |
Disables the TCAN4x5x device test mode.
true
if disabling test mode was successful, false
if not Definition at line 1767 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), REG_BITS_DEVICE_MODE_TESTMODE_ENMASK, REG_BITS_DEVICE_MODE_TESTMODE_MASK, and REG_DEV_MODES_AND_PINS.
Referenced by TCAN4x5x_Device_EnableTestMode().
bool TCAN4x5x_Device_EnableTestMode | ( | TCAN4x5x_Device_Test_Mode_Enum | modeDefine | ) |
Sets the TCAN4x5x device test mode.
Sets the TCAN4x5x device test mode based on the input modeDefine
enum
modeDefine | is an TCAN4x5x_Device_Test_Mode_Enum enum |
true
if configuration successfully done, false
if not Definition at line 1728 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), REG_BITS_DEVICE_MODE_TESTMODE_CONTROLLER, REG_BITS_DEVICE_MODE_TESTMODE_EN, REG_BITS_DEVICE_MODE_TESTMODE_MASK, REG_BITS_DEVICE_MODE_TESTMODE_PHY, REG_DEV_MODES_AND_PINS, TCAN4x5x_Device_DisableTestMode(), TCAN4x5x_DEVICE_TEST_MODE_CONTROLLER, TCAN4x5x_DEVICE_TEST_MODE_NORMAL, and TCAN4x5x_DEVICE_TEST_MODE_PHY.
void TCAN4x5x_Device_ReadConfig | ( | TCAN4x5x_DEV_CONFIG * | devCfg | ) |
Reads the device mode and pin register.
Reads the device mode and pin register and updates the passed TCAN4x5x_DEV_CONFIG
struct
*devCfg | is a pointer to a TCAN4x5x_DEV_CONFIG struct to be updated with the current mode and pin register values |
Definition at line 1553 of file TCAN4550.c.
References AHB_READ_32(), REG_DEV_MODES_AND_PINS, and TCAN4x5x_DEV_CONFIG::word.
uint16_t TCAN4x5x_Device_ReadDeviceVersion | ( | void | ) |
Read the TCAN4x5x device version register.
Definition at line 1485 of file TCAN4550.c.
References AHB_READ_32(), and REG_SPI_REVISION.
void TCAN4x5x_Device_ReadInterruptEnable | ( | TCAN4x5x_Device_Interrupt_Enable * | ie | ) |
Read the device interrupt enable register.
Reads the device interrupt enable register and updates the passed TCAN4x5x_Device_Interrupt_Enable
struct
*ie | is a pointer to a TCAN4x5x_Device_Interrupt_Enable struct containing the interrupt bit fields that will be updated |
Definition at line 1617 of file TCAN4550.c.
References AHB_READ_32(), REG_DEV_IE, and TCAN4x5x_Device_Interrupt_Enable::word.
void TCAN4x5x_Device_ReadInterrupts | ( | TCAN4x5x_Device_Interrupts * | ir | ) |
Read the device interrupts.
Reads the device interrupts and updates a TCAN4x5x_Device_Interrupts
struct that is passed to the function
*ir | is a pointer to a TCAN4x5x_Device_Interrupts struct containing the interrupt bit fields that will be updated |
Definition at line 1567 of file TCAN4550.c.
References AHB_READ_32(), REG_DEV_IR, and TCAN4x5x_Device_Interrupts::word.
TCAN4x5x_Device_Mode_Enum TCAN4x5x_Device_ReadMode | ( | void | ) |
Reads the TCAN4x5x device mode.
Reads the TCAN4x5x device mode and returns a modeDefine
enum
TCAN4x5x_Device_Mode_Enum
enum of the current state Definition at line 1698 of file TCAN4550.c.
References AHB_READ_32(), REG_BITS_DEVICE_MODE_DEVICEMODE_MASK, REG_BITS_DEVICE_MODE_DEVICEMODE_NORMAL, REG_BITS_DEVICE_MODE_DEVICEMODE_SLEEP, REG_BITS_DEVICE_MODE_DEVICEMODE_STANDBY, REG_DEV_MODES_AND_PINS, TCAN4x5x_DEVICE_MODE_NORMAL, TCAN4x5x_DEVICE_MODE_SLEEP, and TCAN4x5x_DEVICE_MODE_STANDBY.
Referenced by TCAN4x5x_MCAN_ConfigureCCCRRegister().
TCAN4x5x_Device_Test_Mode_Enum TCAN4x5x_Device_ReadTestMode | ( | void | ) |
Reads the TCAN4x5x device test mode.
TCAN4x5x_Device_Test_Mode_Enum
of the current device test mode Definition at line 1788 of file TCAN4550.c.
References AHB_READ_32(), REG_BITS_DEVICE_MODE_TESTMODE_CONTROLLER, REG_BITS_DEVICE_MODE_TESTMODE_ENMASK, REG_DEV_MODES_AND_PINS, TCAN4x5x_DEVICE_TEST_MODE_CONTROLLER, TCAN4x5x_DEVICE_TEST_MODE_NORMAL, and TCAN4x5x_DEVICE_TEST_MODE_PHY.
bool TCAN4x5x_Device_SetMode | ( | TCAN4x5x_Device_Mode_Enum | modeDefine | ) |
Sets the TCAN4x5x device mode.
Sets the TCAN4x5x device mode based on the input modeDefine
enum
modeDefine | is an TCAN4x5x_Device_Mode_Enum enum |
true
if configuration successfully done, false
if not Definition at line 1657 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), REG_BITS_DEVICE_MODE_DEVICEMODE_MASK, REG_BITS_DEVICE_MODE_DEVICEMODE_NORMAL, REG_BITS_DEVICE_MODE_DEVICEMODE_SLEEP, REG_BITS_DEVICE_MODE_DEVICEMODE_STANDBY, REG_DEV_MODES_AND_PINS, TCAN4x5x_DEVICE_MODE_NORMAL, TCAN4x5x_DEVICE_MODE_SLEEP, and TCAN4x5x_DEVICE_MODE_STANDBY.
void TCAN4x5x_MCAN_ClearInterrupts | ( | TCAN4x5x_MCAN_Interrupts * | ir | ) |
Clear the MCAN interrupts.
Will attempt to clear any interrupts that are marked as a '1' in the passed TCAN4x5x_MCAN_Interrupts
struct
*ir | is a pointer to a TCAN4x5x_MCAN_Interrupts struct containing the interrupt bit fields that will be updated |
Definition at line 1388 of file TCAN4550.c.
References AHB_WRITE_32(), REG_MCAN_IR, and TCAN4x5x_MCAN_Interrupts::word.
void TCAN4x5x_MCAN_ClearInterruptsAll | ( | void | ) |
Clear all MCAN interrupts.
Clears all MCAN interrupts
Definition at line 1400 of file TCAN4550.c.
References AHB_WRITE_32(), and REG_MCAN_IR.
bool TCAN4x5x_MCAN_ConfigureCCCRRegister | ( | TCAN4x5x_MCAN_CCCR_Config * | cccrConfig | ) |
Configure the MCAN CCCR Register.
Configures the bits of the CCCR register to match the CCCR config struct
TCAN4x5x_MCAN_EnableProtectedRegisters()
and TCAN4x5x_MCAN_DisableProtectedRegisters()
be used to lock the registers after configuration*cccrConfig | is a pointer to a TCAN4x5x_MCAN_CCCR_Config struct containing the configuration bits |
true
if successfully enabled, otherwise return false
Definition at line 150 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), TCAN4x5x_MCAN_CCCR_Config::CSR, REG_BITS_MCAN_CCCR_CCE, REG_BITS_MCAN_CCCR_CSA, REG_BITS_MCAN_CCCR_CSR, REG_BITS_MCAN_CCCR_INIT, REG_BITS_MCAN_CCCR_RESERVED_MASK, REG_MCAN_CCCR, TCAN4x5x_DEVICE_MODE_STANDBY, TCAN4x5x_Device_ReadMode(), and TCAN4x5x_MCAN_CCCR_Config::word.
bool TCAN4x5x_MCAN_ConfigureDataTiming_Raw | ( | TCAN4x5x_MCAN_Data_Timing_Raw * | dataTiming | ) |
Writes the MCAN data time settings, using the raw MCAN data timing struct.
Writes the data timing information to MCAN using the input from the *dataTiming
pointer
TCAN4x5x_MCAN_EnableProtectedRegisters()
and TCAN4x5x_MCAN_DisableProtectedRegisters()
be used to lock the registers after configuration*dataTiming | is a pointer of a TCAN4x5x_MCAN_Data_Timing_Raw struct containing the raw data timing information |
true
if successfully enabled, otherwise return false
Definition at line 352 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), TCAN4x5x_MCAN_Data_Timing_Raw::DataBitRatePrescaler, TCAN4x5x_MCAN_Data_Timing_Raw::DataSyncJumpWidth, TCAN4x5x_MCAN_Data_Timing_Raw::DataTimeSeg1andProp, TCAN4x5x_MCAN_Data_Timing_Raw::DataTimeSeg2, REG_BITS_MCAN_DBTP_TDC_EN, REG_BITS_MCAN_TSCC_COUNTER_EXTERNAL, REG_MCAN_DBTP, REG_MCAN_TDCR, REG_MCAN_TSCC, TCAN4x5x_MCAN_Data_Timing_Raw::TDCFilter, and TCAN4x5x_MCAN_Data_Timing_Raw::TDCOffset.
bool TCAN4x5x_MCAN_ConfigureDataTiming_Simple | ( | TCAN4x5x_MCAN_Data_Timing_Simple * | dataTiming | ) |
Writes the MCAN data time settings, using the simple data timing struct.
Writes the data timing information to MCAN using the input from the *dataTiming
pointer
TCAN4x5x_MCAN_EnableProtectedRegisters()
and TCAN4x5x_MCAN_DisableProtectedRegisters()
be used to lock the registers after configuration*dataTiming | is a pointer of a TCAN4x5x_MCAN_Data_Timing_Simple struct containing the simplified data timing information |
true
if successfully enabled, otherwise return false
Definition at line 277 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), TCAN4x5x_MCAN_Data_Timing_Simple::DataBitRatePrescaler, TCAN4x5x_MCAN_Data_Timing_Simple::DataTqAfterSamplePoint, TCAN4x5x_MCAN_Data_Timing_Simple::DataTqBeforeSamplePoint, REG_BITS_MCAN_DBTP_TDC_EN, REG_BITS_MCAN_TSCC_COUNTER_EXTERNAL, REG_MCAN_DBTP, REG_MCAN_TDCR, and REG_MCAN_TSCC.
bool TCAN4x5x_MCAN_ConfigureGlobalFilter | ( | TCAN4x5x_MCAN_Global_Filter_Configuration * | gfc | ) |
Configures the MCAN global filter configuration register, using the passed Global Filter Configuration struct.
Configures the default behavior of the MCAN controller when receiving messages. This can include accepting or rejecting CAN messages by default.
TCAN4x5x_MCAN_EnableProtectedRegisters()
and TCAN4x5x_MCAN_DisableProtectedRegisters()
be used to lock the registers after configuration*gfc | is a pointer of a TCAN4x5x_MCAN_Global_Filter_Configuration struct containing the register values |
true
if successfully enabled, otherwise return false
Definition at line 547 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), REG_BITS_MCAN_GFC_MASK, REG_MCAN_GFC, and TCAN4x5x_MCAN_Global_Filter_Configuration::word.
void TCAN4x5x_MCAN_ConfigureInterruptEnable | ( | TCAN4x5x_MCAN_Interrupt_Enable * | ie | ) |
Configures the MCAN interrupt enable register.
Configures the MCAN interrupt enable register based on the passed TCAN4x5x_MCAN_Interrupt_Enable
struct Also enables MCAN interrupts out to the INT1 pin.
*ie | is a pointer to a TCAN4x5x_MCAN_Interrupt_Enable struct containing the desired enabled interrupt bits |
Definition at line 1429 of file TCAN4550.c.
References AHB_WRITE_32(), REG_BITS_MCAN_ILE_EINT0, REG_MCAN_IE, REG_MCAN_ILE, and TCAN4x5x_MCAN_Interrupt_Enable::word.
bool TCAN4x5x_MCAN_ConfigureNominalTiming_Raw | ( | TCAN4x5x_MCAN_Nominal_Timing_Raw * | nomTiming | ) |
Writes the MCAN nominal timing settings, using the raw MCAN nominal timing struct.
Writes the data timing information to MCAN using the input from the *nomTiming
pointer
TCAN4x5x_MCAN_EnableProtectedRegisters()
and TCAN4x5x_MCAN_DisableProtectedRegisters()
be used to lock the registers after configuration*nomTiming | is a pointer of a TCAN4x5x_MCAN_Nominal_Timing_Raw struct containing the raw MCAN nominal timing information |
true
if successfully enabled, otherwise return false
Definition at line 514 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), TCAN4x5x_MCAN_Nominal_Timing_Raw::NominalBitRatePrescaler, TCAN4x5x_MCAN_Nominal_Timing_Raw::NominalSyncJumpWidth, TCAN4x5x_MCAN_Nominal_Timing_Raw::NominalTimeSeg1andProp, TCAN4x5x_MCAN_Nominal_Timing_Raw::NominalTimeSeg2, and REG_MCAN_NBTP.
bool TCAN4x5x_MCAN_ConfigureNominalTiming_Simple | ( | TCAN4x5x_MCAN_Nominal_Timing_Simple * | nomTiming | ) |
Writes the MCAN nominal timing settings, using the simple nominal timing struct.
Writes the data timing information to MCAN using the input from the *nomTiming
pointer
TCAN4x5x_MCAN_EnableProtectedRegisters()
and TCAN4x5x_MCAN_DisableProtectedRegisters()
be used to lock the registers after configuration*nomTiming | is a pointer of a TCAN4x5x_MCAN_Nominal_Timing_Simple struct containing the simplified nominal timing information |
true
if successfully enabled, otherwise return false
Definition at line 457 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), TCAN4x5x_MCAN_Nominal_Timing_Simple::NominalBitRatePrescaler, TCAN4x5x_MCAN_Nominal_Timing_Simple::NominalTqAfterSamplePoint, TCAN4x5x_MCAN_Nominal_Timing_Simple::NominalTqBeforeSamplePoint, and REG_MCAN_NBTP.
bool TCAN4x5x_MCAN_DisableProtectedRegisters | ( | void | ) |
Disable Protected MCAN Registers.
Attempts to disable CCCR.CCE and CCCR.INIT to disallow writes to protected registers
true
if successfully enabled, otherwise return false
Definition at line 113 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), REG_BITS_MCAN_CCCR_CCE, REG_BITS_MCAN_CCCR_CSA, REG_BITS_MCAN_CCCR_CSR, REG_BITS_MCAN_CCCR_INIT, and REG_MCAN_CCCR.
uint8_t TCAN4x5x_MCAN_DLCtoBytes | ( | uint8_t | inputDLC | ) |
Converts the CAN message DLC hex value to the number of bytes it corresponds to.
inputDLC | is the DLC value from/to a CAN message struct |
Definition at line 1443 of file TCAN4550.c.
Referenced by TCAN4x5x_MCAN_ReadNextFIFO(), TCAN4x5x_MCAN_ReadRXBuffer(), and TCAN4x5x_MCAN_WriteTXBuffer().
bool TCAN4x5x_MCAN_EnableProtectedRegisters | ( | void | ) |
Enable Protected MCAN Registers.
Attempts to enable CCCR.CCE and CCCR.INIT to allow writes to protected registers, needed for MCAN configuration
true
if successfully enabled, otherwise return false
Definition at line 79 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), REG_BITS_MCAN_CCCR_CCE, REG_BITS_MCAN_CCCR_CSA, REG_BITS_MCAN_CCCR_CSR, REG_BITS_MCAN_CCCR_INIT, and REG_MCAN_CCCR.
void TCAN4x5x_MCAN_ReadCCCRRegister | ( | TCAN4x5x_MCAN_CCCR_Config * | cccrConfig | ) |
Read the MCAN CCCR configuration register.
Reads the MCAN CCCR configuration register and updates the passed TCAN4x5x_MCAN_CCCR_Config
struct
*cccrConfig | is a pointer to a TCAN4x5x_MCAN_CCCR_Config struct containing the CCCR bit fields that will be updated |
Definition at line 200 of file TCAN4550.c.
References AHB_READ_32(), REG_MCAN_CCCR, and TCAN4x5x_MCAN_CCCR_Config::word.
void TCAN4x5x_MCAN_ReadDataTimingFD_Raw | ( | TCAN4x5x_MCAN_Data_Timing_Raw * | dataTiming | ) |
Reads the MCAN data time settings, using the raw MCAN struct.
Reads the MCAN data timing registers and updates the *dataTiming
struct
*dataTiming | is a pointer of a TCAN4x5x_MCAN_Data_Timing_Simple struct containing the raw data timing information |
Definition at line 239 of file TCAN4550.c.
References AHB_READ_32(), TCAN4x5x_MCAN_Data_Timing_Raw::DataBitRatePrescaler, TCAN4x5x_MCAN_Data_Timing_Raw::DataSyncJumpWidth, TCAN4x5x_MCAN_Data_Timing_Raw::DataTimeSeg1andProp, TCAN4x5x_MCAN_Data_Timing_Raw::DataTimeSeg2, REG_BITS_MCAN_DBTP_TDC_EN, REG_MCAN_DBTP, REG_MCAN_TDCR, TCAN4x5x_MCAN_Data_Timing_Raw::TDCFilter, and TCAN4x5x_MCAN_Data_Timing_Raw::TDCOffset.
void TCAN4x5x_MCAN_ReadDataTimingFD_Simple | ( | TCAN4x5x_MCAN_Data_Timing_Simple * | dataTiming | ) |
Reads the MCAN data time settings, using the simple struct.
Reads the MCAN data timing registers and updates the *dataTiming
struct
TCAN4x5x_MCAN_EnableProtectedRegisters()
and TCAN4x5x_MCAN_DisableProtectedRegisters()
be used to lock the registers after configuration*dataTiming | is a pointer of a TCAN4x5x_MCAN_Data_Timing_Simple struct containing the simplified data timing information |
Definition at line 217 of file TCAN4550.c.
References AHB_READ_32(), TCAN4x5x_MCAN_Data_Timing_Simple::DataBitRatePrescaler, TCAN4x5x_MCAN_Data_Timing_Simple::DataTqAfterSamplePoint, TCAN4x5x_MCAN_Data_Timing_Simple::DataTqBeforeSamplePoint, and REG_MCAN_DBTP.
void TCAN4x5x_MCAN_ReadInterruptEnable | ( | TCAN4x5x_MCAN_Interrupt_Enable * | ie | ) |
Read the MCAN interrupt enable register.
Reads the MCAN interrupt enable register and updates the passed TCAN4x5x_MCAN_Interrupt_Enable
struct
*ie | is a pointer to a TCAN4x5x_MCAN_Interrupt_Enable struct containing the interrupt bit fields that will be updated |
Definition at line 1414 of file TCAN4550.c.
References AHB_READ_32(), REG_MCAN_IE, and TCAN4x5x_MCAN_Interrupt_Enable::word.
void TCAN4x5x_MCAN_ReadInterrupts | ( | TCAN4x5x_MCAN_Interrupts * | ir | ) |
Read the MCAN interrupts.
Reads the MCAN interrupts and updates a TCAN4x5x_MCAN_Interrupts
struct that is passed to the function
*ir | is a pointer to a TCAN4x5x_MCAN_Interrupts struct containing the interrupt bit fields that will be updated |
Definition at line 1374 of file TCAN4550.c.
References AHB_READ_32(), REG_MCAN_IR, and TCAN4x5x_MCAN_Interrupts::word.
uint8_t TCAN4x5x_MCAN_ReadNextFIFO | ( | TCAN4x5x_MCAN_FIFO_Enum | FIFODefine, |
TCAN4x5x_MCAN_RX_Header * | header, | ||
uint8_t | dataPayload[] | ||
) |
Read the next MCAN FIFO element.
This function will read the next MCAN FIFO element specified and return the corresponding header information and data payload. The start address of the elment is automatically calculated by looking at the MCAN's register that says where the next element to read exists.
FIFODefine | is an TCAN4x5x_MCAN_FIFO_Enum enum corresponding to either RXFIFO0 or RXFIFO1 |
*header | is a pointer to a TCAN4x5x_MCAN_RX_Header struct containing the CAN-specific header information |
dataPayload[] | is a byte array that will be updated with the read data |
dataPayload
[] must be at least as big as the largest possible data payload, otherwise writing to out of bounds memory may occurdataPayload
[] Definition at line 828 of file TCAN4550.c.
References AHB_READ_32(), AHB_READ_BURST_END(), AHB_READ_BURST_READ(), AHB_READ_BURST_START(), AHB_WRITE_32(), TCAN4x5x_MCAN_RX_Header::ANMF, TCAN4x5x_MCAN_RX_Header::BRS, TCAN4x5x_MCAN_RX_Header::DLC, TCAN4x5x_MCAN_RX_Header::ESI, TCAN4x5x_MCAN_RX_Header::FDF, TCAN4x5x_MCAN_RX_Header::FIDX, TCAN4x5x_MCAN_RX_Header::ID, REG_MCAN_RXESC, REG_MCAN_RXF0A, REG_MCAN_RXF0C, REG_MCAN_RXF0S, REG_MCAN_RXF1A, REG_MCAN_RXF1C, REG_MCAN_RXF1S, REG_MRAM, TCAN4x5x_MCAN_RX_Header::RTR, RXFIFO1, TCAN4x5x_MCAN_RX_Header::RXTS, TCAN4x5x_MCAN_CACHE, TCAN4x5x_MCAN_CACHE_RXESC, TCAN4x5x_MCAN_CACHE_RXF0C, TCAN4x5x_MCAN_CACHE_RXF1C, TCAN4x5x_MCAN_DLCtoBytes(), TCAN4x5x_MCAN_TXRXESC_DataByteValue(), and TCAN4x5x_MCAN_RX_Header::XTD.
void TCAN4x5x_MCAN_ReadNominalTiming_Raw | ( | TCAN4x5x_MCAN_Nominal_Timing_Raw * | nomTiming | ) |
Reads the MCAN nominal/arbitration time settings, using the raw MCAN timing struct.
Reads the MCAN nominal timing registers and updates the *nomTiming
struct
*nomTiming | is a pointer of a TCAN4x5x_MCAN_Nominal_Timing_Raw struct containing the raw MCAN nominal timing information |
Definition at line 431 of file TCAN4550.c.
References AHB_READ_32(), TCAN4x5x_MCAN_Nominal_Timing_Raw::NominalBitRatePrescaler, TCAN4x5x_MCAN_Nominal_Timing_Raw::NominalSyncJumpWidth, TCAN4x5x_MCAN_Nominal_Timing_Raw::NominalTimeSeg1andProp, TCAN4x5x_MCAN_Nominal_Timing_Raw::NominalTimeSeg2, and REG_MCAN_NBTP.
void TCAN4x5x_MCAN_ReadNominalTiming_Simple | ( | TCAN4x5x_MCAN_Nominal_Timing_Simple * | nomTiming | ) |
Reads the MCAN nominal/arbitration time settings, using the simple timing struct.
Reads the MCAN nominal timing registers and updates the *nomTiming
struct
*nomTiming | is a pointer of a TCAN4x5x_MCAN_Nominal_Timing_Simple struct containing the simplified nominal timing information |
Definition at line 410 of file TCAN4550.c.
References AHB_READ_32(), TCAN4x5x_MCAN_Nominal_Timing_Simple::NominalBitRatePrescaler, TCAN4x5x_MCAN_Nominal_Timing_Simple::NominalTqAfterSamplePoint, TCAN4x5x_MCAN_Nominal_Timing_Simple::NominalTqBeforeSamplePoint, and REG_MCAN_NBTP.
uint8_t TCAN4x5x_MCAN_ReadRXBuffer | ( | uint8_t | bufIndex, |
TCAN4x5x_MCAN_RX_Header * | header, | ||
uint8_t | dataPayload[] | ||
) |
Read the specified RX buffer element.
This function will read the specified MCAN buffer element and return the corresponding header information and data payload. The start address of the element is automatically calculated.
bufIndex | is the RX buffer index to read from (starts at 0) |
*header | is a pointer to a TCAN4x5x_MCAN_RX_Header struct containing the CAN-specific header information |
dataPayload[] | is a byte array that will be updated with the read data |
dataPayload
[] must be at least as big as the largest possible data payload, otherwise writing to out of bounds memory may occurdataPayload
[] Definition at line 964 of file TCAN4550.c.
References AHB_READ_32(), AHB_READ_BURST_END(), AHB_READ_BURST_READ(), AHB_READ_BURST_START(), AHB_WRITE_32(), TCAN4x5x_MCAN_RX_Header::ANMF, TCAN4x5x_MCAN_RX_Header::BRS, TCAN4x5x_MCAN_RX_Header::DLC, TCAN4x5x_MCAN_RX_Header::ESI, TCAN4x5x_MCAN_RX_Header::FDF, TCAN4x5x_MCAN_RX_Header::FIDX, TCAN4x5x_MCAN_RX_Header::ID, REG_MCAN_NDAT1, REG_MCAN_NDAT2, REG_MCAN_RXBC, REG_MCAN_RXESC, REG_MRAM, TCAN4x5x_MCAN_RX_Header::RTR, TCAN4x5x_MCAN_RX_Header::RXTS, TCAN4x5x_MCAN_CACHE, TCAN4x5x_MCAN_CACHE_RXBC, TCAN4x5x_MCAN_CACHE_RXESC, TCAN4x5x_MCAN_DLCtoBytes(), TCAN4x5x_MCAN_TXRXESC_DataByteValue(), and TCAN4x5x_MCAN_RX_Header::XTD.
bool TCAN4x5x_MCAN_ReadSIDFilter | ( | uint8_t | filterIndex, |
TCAN4x5x_MCAN_SID_Filter * | filter | ||
) |
Read a MCAN Standard ID filter from MRAM.
This function will read a standard ID MCAN filter from a specified filter element
filterIndex | is the SID filter index in MRAM to read from (starts at 0) |
*filter | is a pointer to a TCAN4x5x_MCAN_SID_Filter struct that will be updated with the read MCAN filter |
true
if read was successful, false
if not Definition at line 1241 of file TCAN4550.c.
References AHB_READ_32(), REG_MCAN_SIDFC, REG_MRAM, TCAN4x5x_MCAN_CACHE, TCAN4x5x_MCAN_CACHE_SIDFC, and TCAN4x5x_MCAN_SID_Filter::word.
bool TCAN4x5x_MCAN_ReadXIDFilter | ( | uint8_t | filterIndex, |
TCAN4x5x_MCAN_XID_Filter * | filter | ||
) |
Read MCAN Extended ID filter from MRAM.
This function will read an extended ID MCAN filter from a specified filter element
filterIndex | is the XID filter index in MRAM to read from (starts at 0) |
*filter | is a pointer to a TCAN4x5x_MCAN_XID_Filter struct that will be updated with information from MRAM |
true
if read was successful, false
if not Definition at line 1332 of file TCAN4550.c.
References AHB_READ_32(), AHB_READ_BURST_READ(), AHB_READ_BURST_START(), TCAN4x5x_MCAN_XID_Filter::EFEC, TCAN4x5x_MCAN_XID_Filter::EFID1, TCAN4x5x_MCAN_XID_Filter::EFID2, TCAN4x5x_MCAN_XID_Filter::EFT, REG_MCAN_XIDFC, REG_MRAM, TCAN4x5x_MCAN_CACHE, and TCAN4x5x_MCAN_CACHE_XIDFC.
bool TCAN4x5x_MCAN_TransmitBufferContents | ( | uint8_t | bufIndex | ) |
Transmit TX buffer contents of the specified tx buffer.
Writes the specified buffer index bit value into the TXBAR register to request a message to send
bufIndex | is the TX buffer index to write to (starts at 0) |
true
if the request was queued, false
if the buffer value was invalid (out of range) Definition at line 1173 of file TCAN4550.c.
References AHB_WRITE_32(), and REG_MCAN_TXBAR.
uint8_t TCAN4x5x_MCAN_TXRXESC_DataByteValue | ( | uint8_t | inputESCValue | ) |
Converts the MCAN ESC (Element Size) value to number of bytes that it corresponds to.
inputESCValue | is the value from an element size configuration register |
Definition at line 1465 of file TCAN4550.c.
Referenced by TCAN4x5x_MCAN_ReadNextFIFO(), TCAN4x5x_MCAN_ReadRXBuffer(), TCAN4x5x_MCAN_WriteTXBuffer(), and TCAN4x5x_MRAM_Configure().
bool TCAN4x5x_MCAN_WriteSIDFilter | ( | uint8_t | filterIndex, |
TCAN4x5x_MCAN_SID_Filter * | filter | ||
) |
Write MCAN Standard ID filter into MRAM.
This function will write a standard ID MCAN filter to a specified filter element
filterIndex | is the SID filter index in MRAM to write to (starts at 0) |
*filter | is a pointer to a TCAN4x5x_MCAN_SID_Filter struct containing the MCAN filter information |
true
if write was successful, false
if not Definition at line 1199 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), REG_MCAN_SIDFC, REG_MRAM, TCAN4x5x_MCAN_CACHE, TCAN4x5x_MCAN_CACHE_SIDFC, and TCAN4x5x_MCAN_SID_Filter::word.
uint32_t TCAN4x5x_MCAN_WriteTXBuffer | ( | uint8_t | bufIndex, |
TCAN4x5x_MCAN_TX_Header * | header, | ||
uint8_t | dataPayload[] | ||
) |
Write CAN message to the specified TX buffer.
This function will write a CAN message to a specified TX buffer that can be transmitted at a later time with the TCAN4x5x_MCAN_TransmitBufferContents()
function
bufIndex | is the TX buffer index to write to (starts at 0) |
*header | is a pointer to a TCAN4x5x_MCAN_TX_Header struct containing the CAN-specific header information |
dataPayload[] | is a byte array that contains the data payload |
dataPayload
[] must be at least as big as the specified DLC size inside the *header
structdataPayload
[] Definition at line 1064 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_BURST_END(), AHB_WRITE_BURST_START(), AHB_WRITE_BURST_WRITE(), TCAN4x5x_MCAN_TX_Header::BRS, TCAN4x5x_MCAN_TX_Header::DLC, TCAN4x5x_MCAN_TX_Header::EFC, TCAN4x5x_MCAN_TX_Header::ESI, TCAN4x5x_MCAN_TX_Header::FDF, TCAN4x5x_MCAN_TX_Header::ID, TCAN4x5x_MCAN_TX_Header::MM, REG_MCAN_TXBC, REG_MCAN_TXESC, TCAN4x5x_MCAN_TX_Header::RTR, TCAN4x5x_MCAN_CACHE, TCAN4x5x_MCAN_CACHE_TXBC, TCAN4x5x_MCAN_CACHE_TXESC, TCAN4x5x_MCAN_DLCtoBytes(), TCAN4x5x_MCAN_TXRXESC_DataByteValue(), and TCAN4x5x_MCAN_TX_Header::XTD.
bool TCAN4x5x_MCAN_WriteXIDFilter | ( | uint8_t | filterIndex, |
TCAN4x5x_MCAN_XID_Filter * | filter | ||
) |
Write MCAN Extended ID filter into MRAM.
This function will write an extended ID MCAN filter to a specified filter element
filterIndex | is the XID filter index in MRAM to write to (starts at 0) |
*filter | is a pointer to a TCAN4x5x_MCAN_XID_Filter struct containing the MCAN filter information |
true
if write was successful, false
if not Definition at line 1277 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), TCAN4x5x_MCAN_XID_Filter::EFEC, TCAN4x5x_MCAN_XID_Filter::EFID1, TCAN4x5x_MCAN_XID_Filter::EFID2, TCAN4x5x_MCAN_XID_Filter::EFT, REG_MCAN_XIDFC, REG_MRAM, TCAN4x5x_MCAN_CACHE, and TCAN4x5x_MCAN_CACHE_XIDFC.
void TCAN4x5x_MRAM_Clear | ( | void | ) |
Clear (Zero-fill) the contents of MRAM.
Write 0s to every address in MRAM. Useful for initializing the MRAM to known values during initial configuration so that accidental ECC errors do not happen
Definition at line 796 of file TCAN4550.c.
References AHB_WRITE_32(), MRAM_SIZE, and REG_MRAM.
bool TCAN4x5x_MRAM_Configure | ( | TCAN4x5x_MRAM_Config * | MRAMConfig | ) |
Configures the MRAM registers.
Uses the *MRAMConfig
pointer to set up the various sections of the MRAM memory space. There are several different elements that may be configured in the MRAM, including their number of elements, as well as size of elements. This function will automatically generate the start addresses for each of the appropriate MRAM sections, attempting to place them immediately back-to-back. This function will check for over allocated memory conditions, and return false
if this is found to be the case.
TCAN4x5x_MCAN_EnableProtectedRegisters()
and TCAN4x5x_MCAN_DisableProtectedRegisters()
be used to lock the registers after configuration*MRAMConfig | is a pointer of a TCAN4x5x_MRAM_Config struct containing the desired MRAM configuration |
true
if successful, otherwise return false
Definition at line 584 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), MRAM_SIZE, REG_BITS_MCAN_RXF0C_F0OM_OVERWRITE, REG_BITS_MCAN_TXBC_TFQM, REG_MCAN_RXBC, REG_MCAN_RXESC, REG_MCAN_RXF0C, REG_MCAN_RXF1C, REG_MCAN_SIDFC, REG_MCAN_TXBC, REG_MCAN_TXEFC, REG_MCAN_TXESC, REG_MCAN_XIDFC, REG_MRAM, TCAN4x5x_MRAM_Config::Rx0ElementSize, TCAN4x5x_MRAM_Config::Rx0NumElements, TCAN4x5x_MRAM_Config::Rx1ElementSize, TCAN4x5x_MRAM_Config::Rx1NumElements, TCAN4x5x_MRAM_Config::RxBufElementSize, TCAN4x5x_MRAM_Config::RxBufNumElements, TCAN4x5x_MRAM_Config::SIDNumElements, TCAN4x5x_MCAN_CACHE, TCAN4x5x_MCAN_CACHE_RXBC, TCAN4x5x_MCAN_CACHE_RXESC, TCAN4x5x_MCAN_CACHE_RXF0C, TCAN4x5x_MCAN_CACHE_RXF1C, TCAN4x5x_MCAN_CACHE_SIDFC, TCAN4x5x_MCAN_CACHE_TXBC, TCAN4x5x_MCAN_CACHE_TXEFC, TCAN4x5x_MCAN_CACHE_TXESC, TCAN4x5x_MCAN_CACHE_XIDFC, TCAN4x5x_MCAN_TXRXESC_DataByteValue(), TCAN4x5x_MRAM_Config::TxBufferElementSize, TCAN4x5x_MRAM_Config::TxBufferNumElements, TCAN4x5x_MRAM_Config::TxEventFIFONumElements, and TCAN4x5x_MRAM_Config::XIDNumElements.
bool TCAN4x5x_WDT_Configure | ( | TCAN4x5x_WDT_Timer_Enum | WDTtimeout | ) |
Configure the watchdog.
WDTtimeout | is an TCAN4x5x_WDT_Timer_Enum enum of different times for the watch dog window |
true
if successfully configured, or false
otherwise Definition at line 1814 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), REG_BITS_DEVICE_MODE_WD_TIMER_3S, REG_BITS_DEVICE_MODE_WD_TIMER_600MS, REG_BITS_DEVICE_MODE_WD_TIMER_60MS, REG_BITS_DEVICE_MODE_WD_TIMER_6S, REG_BITS_DEVICE_MODE_WD_TIMER_MASK, REG_DEV_MODES_AND_PINS, TCAN4x5x_WDT_3S, TCAN4x5x_WDT_600MS, TCAN4x5x_WDT_60MS, and TCAN4x5x_WDT_6S.
bool TCAN4x5x_WDT_Disable | ( | void | ) |
Disable the watchdog timer.
true
if successfully disabled, or false
otherwise Definition at line 1908 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), REG_BITS_DEVICE_MODE_WDT_EN, and REG_DEV_MODES_AND_PINS.
bool TCAN4x5x_WDT_Enable | ( | void | ) |
Enable the watchdog timer.
true
if successfully enabled, or false
otherwise Definition at line 1887 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), REG_BITS_DEVICE_MODE_WDT_EN, and REG_DEV_MODES_AND_PINS.
TCAN4x5x_WDT_Timer_Enum TCAN4x5x_WDT_Read | ( | void | ) |
Read the watchdog configuration.
TCAN4x5x_WDT_Timer_Enum
enum of the currently configured time window Definition at line 1857 of file TCAN4550.c.
References AHB_READ_32(), REG_BITS_DEVICE_MODE_WD_TIMER_3S, REG_BITS_DEVICE_MODE_WD_TIMER_600MS, REG_BITS_DEVICE_MODE_WD_TIMER_60MS, REG_BITS_DEVICE_MODE_WD_TIMER_6S, REG_BITS_DEVICE_MODE_WD_TIMER_MASK, REG_DEV_MODES_AND_PINS, TCAN4x5x_WDT_3S, TCAN4x5x_WDT_600MS, TCAN4x5x_WDT_60MS, and TCAN4x5x_WDT_6S.
void TCAN4x5x_WDT_Reset | ( | void | ) |
Reset the watchdog timer.
Definition at line 1927 of file TCAN4550.c.
References AHB_READ_32(), AHB_WRITE_32(), REG_BITS_DEVICE_MODE_WDT_RESET_BIT, and REG_DEV_MODES_AND_PINS.
uint32_t TCAN4x5x_MCAN_CACHE[9] |
Definition at line 68 of file TCAN4550.c.
Referenced by TCAN4x5x_MCAN_ReadNextFIFO(), TCAN4x5x_MCAN_ReadRXBuffer(), TCAN4x5x_MCAN_ReadSIDFilter(), TCAN4x5x_MCAN_ReadXIDFilter(), TCAN4x5x_MCAN_WriteSIDFilter(), TCAN4x5x_MCAN_WriteTXBuffer(), TCAN4x5x_MCAN_WriteXIDFilter(), and TCAN4x5x_MRAM_Configure().