canfd6 2.0.0.0
canfd6.h File Reference

This file contains API for CAN FD 6 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  canfd6_t
 CAN FD 6 Click context object. More...
 
struct  canfd6_cfg_t
 CAN FD 6 Click configuration object. More...
 
struct  canfd6_mcan_data_timing_simple_t
 CAN FD 6 Click data timing simple structure. More...
 
struct  canfd6_mcan_data_timing_raw_t
 CAN FD 6 Click data timing raw structure. More...
 
struct  canfd6_mcan_nominal_timing_simple_t
 CAN FD 6 Click nominal timing simple structure. More...
 
struct  canfd6_mcan_nominal_timing_raw_t
 CAN FD 6 Click nominal timing raw structure. More...
 
struct  canfd6_mram_config_t
 CAN FD 6 Click MRAM config. More...
 
struct  canfd6_mcan_cccr_config_t
 CAN FD 6 Click CCCR config. More...
 
struct  canfd6_mcan_interrupts_t
 CAN FD 6 Click MCAN interrupts. More...
 
struct  canfd6_mcan_interrupt_enable_t
 CAN FD 6 Click MCAN interrupt enable. More...
 
struct  canfd6_mcan_rx_header_t
 CAN FD 6 Click CAN message header. More...
 
struct  canfd6_mcan_tx_header_t
 CAN FD 6 Click CAN message header for transmitted messages. More...
 
struct  canfd6_mcan_sid_filter_t
 CAN FD 6 Click standard ID filter struct. More...
 
struct  canfd6_mcan_xid_filter_t
 CAN FD 6 Click extended ID filter struct. More...
 
struct  canfd6_mcan_global_filter_configuration_t
 CAN FD 6 Click Global Filter Configuration Register struct. More...
 
struct  canfd6_device_interrupts_t
 CAN FD 6 Click device interrupt bit field struct. More...
 
struct  canfd6_device_interrupt_enable_t
 CAN FD 6 Click device interrupt enable bit field struct. More...
 
struct  canfd6_dev_config_t
 CAN FD 6 Click device config struct. More...
 

Macros

#define CANFD6_MCAN_CACHE_CONFIGURATION
 CAN FD 6 MCAN cache configuration.
 
#define CANFD6_MCAN_CACHE_SIDFC   0
 
#define CANFD6_MCAN_CACHE_XIDFC   1
 
#define CANFD6_MCAN_CACHE_RXF0C   2
 
#define CANFD6_MCAN_CACHE_RXF1C   3
 
#define CANFD6_MCAN_CACHE_RXBC   4
 
#define CANFD6_MCAN_CACHE_TXEFC   5
 
#define CANFD6_MCAN_CACHE_TXBC   6
 
#define CANFD6_MCAN_CACHE_RXESC   7
 
#define CANFD6_MCAN_CACHE_TXESC   8
 
#define CANFD6_MRAM_SIZE   2048
 CAN FD 6 MRAM size.
 
#define CANFD6_REG_SPI_CONFIG   0x0000
 
#define CANFD6_REG_DEV_CONFIG   0x0800
 
#define CANFD6_REG_MCAN   0x1000
 
#define CANFD6_REG_MRAM   0x8000
 
#define CANFD6_REG_SPI_DEVICE_ID0   0x0000
 
#define CANFD6_REG_SPI_DEVICE_ID1   0x0004
 
#define CANFD6_REG_SPI_REVISION   0x0008
 
#define CANFD6_REG_SPI_STATUS   0x000C
 
#define CANFD6_REG_SPI_ERROR_STATUS_MASK   0x0010
 
#define CANFD6_REG_DEV_MODES_AND_PINS   0x0800
 
#define CANFD6_REG_DEV_TIMESTAMP_PRESCALER   0x0804
 
#define CANFD6_REG_DEV_TEST_REGISTERS   0x0808
 
#define CANFD6_REG_DEV_IR   0x0820
 
#define CANFD6_REG_DEV_IE   0x0830
 
#define CANFD6_REG_MCAN_CREL   0x1000
 
#define CANFD6_REG_MCAN_ENDN   0x1004
 
#define CANFD6_REG_MCAN_CUST   0x1008
 
#define CANFD6_REG_MCAN_DBTP   0x100C
 
#define CANFD6_REG_MCAN_TEST   0x1010
 
#define CANFD6_REG_MCAN_RWD   0x1014
 
#define CANFD6_REG_MCAN_CCCR   0x1018
 
#define CANFD6_REG_MCAN_NBTP   0x101C
 
#define CANFD6_REG_MCAN_TSCC   0x1020
 
#define CANFD6_REG_MCAN_TSCV   0x1024
 
#define CANFD6_REG_MCAN_TOCC   0x1028
 
#define CANFD6_REG_MCAN_TOCV   0x102C
 
#define CANFD6_REG_MCAN_ECR   0x1040
 
#define CANFD6_REG_MCAN_PSR   0x1044
 
#define CANFD6_REG_MCAN_TDCR   0x1048
 
#define CANFD6_REG_MCAN_IR   0x1050
 
#define CANFD6_REG_MCAN_IE   0x1054
 
#define CANFD6_REG_MCAN_ILS   0x1058
 
#define CANFD6_REG_MCAN_ILE   0x105C
 
#define CANFD6_REG_MCAN_GFC   0x1080
 
#define CANFD6_REG_MCAN_SIDFC   0x1084
 
#define CANFD6_REG_MCAN_XIDFC   0x1088
 
#define CANFD6_REG_MCAN_XIDAM   0x1090
 
#define CANFD6_REG_MCAN_HPMS   0x1094
 
#define CANFD6_REG_MCAN_NDAT1   0x1098
 
#define CANFD6_REG_MCAN_NDAT2   0x109C
 
#define CANFD6_REG_MCAN_RXF0C   0x10A0
 
#define CANFD6_REG_MCAN_RXF0S   0x10A4
 
#define CANFD6_REG_MCAN_RXF0A   0x10A8
 
#define CANFD6_REG_MCAN_RXBC   0x10AC
 
#define CANFD6_REG_MCAN_RXF1C   0x10B0
 
#define CANFD6_REG_MCAN_RXF1S   0x10B4
 
#define CANFD6_REG_MCAN_RXF1A   0x10B8
 
#define CANFD6_REG_MCAN_RXESC   0x10BC
 
#define CANFD6_REG_MCAN_TXBC   0x10C0
 
#define CANFD6_REG_MCAN_TXFQS   0x10C4
 
#define CANFD6_REG_MCAN_TXESC   0x10C8
 
#define CANFD6_REG_MCAN_TXBRP   0x10CC
 
#define CANFD6_REG_MCAN_TXBAR   0x10D0
 
#define CANFD6_REG_MCAN_TXBCR   0x10D4
 
#define CANFD6_REG_MCAN_TXBTO   0x10D8
 
#define CANFD6_REG_MCAN_TXBCF   0x10DC
 
#define CANFD6_REG_MCAN_TXBTIE   0x10E0
 
#define CANFD6_REG_MCAN_TXBCIE   0x10E4
 
#define CANFD6_REG_MCAN_TXEFC   0x10F0
 
#define CANFD6_REG_MCAN_TXEFS   0x10F4
 
#define CANFD6_REG_MCAN_TXEFA   0x10F8
 
#define CANFD6_MCAN_DLC_0B   0x00000000
 
#define CANFD6_MCAN_DLC_1B   0x00000001
 
#define CANFD6_MCAN_DLC_2B   0x00000002
 
#define CANFD6_MCAN_DLC_3B   0x00000003
 
#define CANFD6_MCAN_DLC_4B   0x00000004
 
#define CANFD6_MCAN_DLC_5B   0x00000005
 
#define CANFD6_MCAN_DLC_6B   0x00000006
 
#define CANFD6_MCAN_DLC_7B   0x00000007
 
#define CANFD6_MCAN_DLC_8B   0x00000008
 
#define CANFD6_MCAN_DLC_12B   0x00000009
 
#define CANFD6_MCAN_DLC_16B   0x0000000A
 
#define CANFD6_MCAN_DLC_20B   0x0000000B
 
#define CANFD6_MCAN_DLC_24B   0x0000000C
 
#define CANFD6_MCAN_DLC_32B   0x0000000D
 
#define CANFD6_MCAN_DLC_48B   0x0000000E
 
#define CANFD6_MCAN_DLC_64B   0x0000000F
 
#define CANFD6_REG_BITS_MCAN_DBTP_TDC_EN   0x00800000
 CAN FD 6 DBTP.
 
#define CANFD6_REG_BITS_MCAN_TEST_RX_DOM   0x00000000
 
#define CANFD6_REG_BITS_MCAN_TEST_RX_REC   0x00000080
 
#define CANFD6_REG_BITS_MCAN_TEST_TX_SP   0x00000020
 
#define CANFD6_REG_BITS_MCAN_TEST_TX_DOM   0x00000040
 
#define CANFD6_REG_BITS_MCAN_TEST_TX_REC   0x00000060
 
#define CANFD6_REG_BITS_MCAN_TEST_LOOP_BACK   0x00000010
 
#define CANFD6_REG_BITS_MCAN_CCCR_RESERVED_MASK   0xFFFF0C00
 
#define CANFD6_REG_BITS_MCAN_CCCR_NISO_ISO   0x00000000
 
#define CANFD6_REG_BITS_MCAN_CCCR_NISO_BOSCH   0x00008000
 
#define CANFD6_REG_BITS_MCAN_CCCR_TXP   0x00004000
 
#define CANFD6_REG_BITS_MCAN_CCCR_EFBI   0x00002000
 
#define CANFD6_REG_BITS_MCAN_CCCR_PXHD_DIS   0x00001000
 
#define CANFD6_REG_BITS_MCAN_CCCR_BRSE   0x00000200
 
#define CANFD6_REG_BITS_MCAN_CCCR_FDOE   0x00000100
 
#define CANFD6_REG_BITS_MCAN_CCCR_TEST   0x00000080
 
#define CANFD6_REG_BITS_MCAN_CCCR_DAR_DIS   0x00000040
 
#define CANFD6_REG_BITS_MCAN_CCCR_MON   0x00000020
 
#define CANFD6_REG_BITS_MCAN_CCCR_CSR   0x00000010
 
#define CANFD6_REG_BITS_MCAN_CCCR_CSA   0x00000008
 
#define CANFD6_REG_BITS_MCAN_CCCR_ASM   0x00000004
 
#define CANFD6_REG_BITS_MCAN_CCCR_CCE   0x00000002
 
#define CANFD6_REG_BITS_MCAN_CCCR_INIT   0x00000001
 
#define CANFD6_REG_BITS_MCAN_IE_ARAE   0x20000000
 
#define CANFD6_REG_BITS_MCAN_IE_PEDE   0x10000000
 
#define CANFD6_REG_BITS_MCAN_IE_PEAE   0x08000000
 
#define CANFD6_REG_BITS_MCAN_IE_WDIE   0x04000000
 
#define CANFD6_REG_BITS_MCAN_IE_BOE   0x02000000
 
#define CANFD6_REG_BITS_MCAN_IE_EWE   0x01000000
 
#define CANFD6_REG_BITS_MCAN_IE_EPE   0x00800000
 
#define CANFD6_REG_BITS_MCAN_IE_ELOE   0x00400000
 
#define CANFD6_REG_BITS_MCAN_IE_BEUE   0x00200000
 
#define CANFD6_REG_BITS_MCAN_IE_BECE   0x00100000
 
#define CANFD6_REG_BITS_MCAN_IE_DRXE   0x00080000
 
#define CANFD6_REG_BITS_MCAN_IE_TOOE   0x00040000
 
#define CANFD6_REG_BITS_MCAN_IE_MRAFE   0x00020000
 
#define CANFD6_REG_BITS_MCAN_IE_TSWE   0x00010000
 
#define CANFD6_REG_BITS_MCAN_IE_TEFLE   0x00008000
 
#define CANFD6_REG_BITS_MCAN_IE_TEFFE   0x00004000
 
#define CANFD6_REG_BITS_MCAN_IE_TEFWE   0x00002000
 
#define CANFD6_REG_BITS_MCAN_IE_TEFNE   0x00001000
 
#define CANFD6_REG_BITS_MCAN_IE_TFEE   0x00000800
 
#define CANFD6_REG_BITS_MCAN_IE_TCFE   0x00000400
 
#define CANFD6_REG_BITS_MCAN_IE_TCE   0x00000200
 
#define CANFD6_REG_BITS_MCAN_IE_HPME   0x00000100
 
#define CANFD6_REG_BITS_MCAN_IE_RF1LE   0x00000080
 
#define CANFD6_REG_BITS_MCAN_IE_RF1FE   0x00000040
 
#define CANFD6_REG_BITS_MCAN_IE_RF1WE   0x00000020
 
#define CANFD6_REG_BITS_MCAN_IE_RF1NE   0x00000010
 
#define CANFD6_REG_BITS_MCAN_IE_RF0LE   0x00000008
 
#define CANFD6_REG_BITS_MCAN_IE_RF0FE   0x00000004
 
#define CANFD6_REG_BITS_MCAN_IE_RF0WE   0x00000002
 
#define CANFD6_REG_BITS_MCAN_IE_RF0NE   0x00000001
 
#define CANFD6_REG_BITS_MCAN_IR_ARA   0x20000000
 
#define CANFD6_REG_BITS_MCAN_IR_PED   0x10000000
 
#define CANFD6_REG_BITS_MCAN_IR_PEA   0x08000000
 
#define CANFD6_REG_BITS_MCAN_IR_WDI   0x04000000
 
#define CANFD6_REG_BITS_MCAN_IR_BO   0x02000000
 
#define CANFD6_REG_BITS_MCAN_IR_EW   0x01000000
 
#define CANFD6_REG_BITS_MCAN_IR_EP   0x00800000
 
#define CANFD6_REG_BITS_MCAN_IR_ELO   0x00400000
 
#define CANFD6_REG_BITS_MCAN_IR_BEU   0x00200000
 
#define CANFD6_REG_BITS_MCAN_IR_BEC   0x00100000
 
#define CANFD6_REG_BITS_MCAN_IR_DRX   0x00080000
 
#define CANFD6_REG_BITS_MCAN_IR_TOO   0x00040000
 
#define CANFD6_REG_BITS_MCAN_IR_MRAF   0x00020000
 
#define CANFD6_REG_BITS_MCAN_IR_TSW   0x00010000
 
#define CANFD6_REG_BITS_MCAN_IR_TEFL   0x00008000
 
#define CANFD6_REG_BITS_MCAN_IR_TEFF   0x00004000
 
#define CANFD6_REG_BITS_MCAN_IR_TEFW   0x00002000
 
#define CANFD6_REG_BITS_MCAN_IR_TEFN   0x00001000
 
#define CANFD6_REG_BITS_MCAN_IR_TFE   0x00000800
 
#define CANFD6_REG_BITS_MCAN_IR_TCF   0x00000400
 
#define CANFD6_REG_BITS_MCAN_IR_TC   0x00000200
 
#define CANFD6_REG_BITS_MCAN_IR_HPM   0x00000100
 
#define CANFD6_REG_BITS_MCAN_IR_RF1L   0x00000080
 
#define CANFD6_REG_BITS_MCAN_IR_RF1F   0x00000040
 
#define CANFD6_REG_BITS_MCAN_IR_RF1W   0x00000020
 
#define CANFD6_REG_BITS_MCAN_IR_RF1N   0x00000010
 
#define CANFD6_REG_BITS_MCAN_IR_RF0L   0x00000008
 
#define CANFD6_REG_BITS_MCAN_IR_RF0F   0x00000004
 
#define CANFD6_REG_BITS_MCAN_IR_RF0W   0x00000002
 
#define CANFD6_REG_BITS_MCAN_IR_RF0N   0x00000001
 
#define CANFD6_REG_BITS_MCAN_IE_ARAL   0x20000000
 
#define CANFD6_REG_BITS_MCAN_IE_PEDL   0x10000000
 
#define CANFD6_REG_BITS_MCAN_IE_PEAL   0x08000000
 
#define CANFD6_REG_BITS_MCAN_IE_WDIL   0x04000000
 
#define CANFD6_REG_BITS_MCAN_IE_BOL   0x02000000
 
#define CANFD6_REG_BITS_MCAN_IE_EWL   0x01000000
 
#define CANFD6_REG_BITS_MCAN_IE_EPL   0x00800000
 
#define CANFD6_REG_BITS_MCAN_IE_ELOL   0x00400000
 
#define CANFD6_REG_BITS_MCAN_IE_BEUL   0x00200000
 
#define CANFD6_REG_BITS_MCAN_IE_BECL   0x00100000
 
#define CANFD6_REG_BITS_MCAN_IE_DRXL   0x00080000
 
#define CANFD6_REG_BITS_MCAN_IE_TOOL   0x00040000
 
#define CANFD6_REG_BITS_MCAN_IE_MRAFL   0x00020000
 
#define CANFD6_REG_BITS_MCAN_IE_TSWL   0x00010000
 
#define CANFD6_REG_BITS_MCAN_IE_TEFLL   0x00008000
 
#define CANFD6_REG_BITS_MCAN_IE_TEFFL   0x00004000
 
#define CANFD6_REG_BITS_MCAN_IE_TEFWL   0x00002000
 
#define CANFD6_REG_BITS_MCAN_IE_TEFNL   0x00001000
 
#define CANFD6_REG_BITS_MCAN_IE_TFEL   0x00000800
 
#define CANFD6_REG_BITS_MCAN_IE_TCFL   0x00000400
 
#define CANFD6_REG_BITS_MCAN_IE_TCL   0x00000200
 
#define CANFD6_REG_BITS_MCAN_IE_HPML   0x00000100
 
#define CANFD6_REG_BITS_MCAN_IE_RF1LL   0x00000080
 
#define CANFD6_REG_BITS_MCAN_IE_RF1FL   0x00000040
 
#define CANFD6_REG_BITS_MCAN_IE_RF1WL   0x00000020
 
#define CANFD6_REG_BITS_MCAN_IE_RF1NL   0x00000010
 
#define CANFD6_REG_BITS_MCAN_IE_RF0LL   0x00000008
 
#define CANFD6_REG_BITS_MCAN_IE_RF0FL   0x00000004
 
#define CANFD6_REG_BITS_MCAN_IE_RF0WL   0x00000002
 
#define CANFD6_REG_BITS_MCAN_IE_RF0NL   0x00000001
 
#define CANFD6_REG_BITS_MCAN_ILE_EINT1   0x00000002
 
#define CANFD6_REG_BITS_MCAN_ILE_EINT0   0x00000001
 
#define CANFD6_REG_BITS_MCAN_GFC_ANFS_FIFO0   0x00000000
 
#define CANFD6_REG_BITS_MCAN_GFC_ANFS_FIFO1   0x00000010
 
#define CANFD6_REG_BITS_MCAN_GFC_ANFE_FIFO0   0x00000000
 
#define CANFD6_REG_BITS_MCAN_GFC_ANFE_FIFO1   0x00000004
 
#define CANFD6_REG_BITS_MCAN_GFC_RRFS   0x00000002
 
#define CANFD6_REG_BITS_MCAN_GFC_RRFE   0x00000001
 
#define CANFD6_REG_BITS_MCAN_GFC_MASK   0x0000003F
 
#define CANFD6_REG_BITS_MCAN_RXF0C_F0OM_OVERWRITE   0x80000000
 CAN FD 6 MCAN RXF0C overwrite bit.
 
#define CANFD6_REG_BITS_MCAN_RXESC_RBDS_8B   0x00000000
 
#define CANFD6_REG_BITS_MCAN_RXESC_RBDS_12B   0x00000100
 
#define CANFD6_REG_BITS_MCAN_RXESC_RBDS_16B   0x00000200
 
#define CANFD6_REG_BITS_MCAN_RXESC_RBDS_20B   0x00000300
 
#define CANFD6_REG_BITS_MCAN_RXESC_RBDS_24B   0x00000400
 
#define CANFD6_REG_BITS_MCAN_RXESC_RBDS_32B   0x00000500
 
#define CANFD6_REG_BITS_MCAN_RXESC_RBDS_48B   0x00000600
 
#define CANFD6_REG_BITS_MCAN_RXESC_RBDS_64B   0x00000700
 
#define CANFD6_REG_BITS_MCAN_RXESC_F1DS_8B   0x00000000
 
#define CANFD6_REG_BITS_MCAN_RXESC_F1DS_12B   0x00000010
 
#define CANFD6_REG_BITS_MCAN_RXESC_F1DS_16B   0x00000020
 
#define CANFD6_REG_BITS_MCAN_RXESC_F1DS_20B   0x00000030
 
#define CANFD6_REG_BITS_MCAN_RXESC_F1DS_24B   0x00000040
 
#define CANFD6_REG_BITS_MCAN_RXESC_F1DS_32B   0x00000050
 
#define CANFD6_REG_BITS_MCAN_RXESC_F1DS_48B   0x00000060
 
#define CANFD6_REG_BITS_MCAN_RXESC_F1DS_64B   0x00000070
 
#define CANFD6_REG_BITS_MCAN_RXESC_F0DS_8B   0x00000000
 
#define CANFD6_REG_BITS_MCAN_RXESC_F0DS_12B   0x00000001
 
#define CANFD6_REG_BITS_MCAN_RXESC_F0DS_16B   0x00000002
 
#define CANFD6_REG_BITS_MCAN_RXESC_F0DS_20B   0x00000003
 
#define CANFD6_REG_BITS_MCAN_RXESC_F0DS_24B   0x00000004
 
#define CANFD6_REG_BITS_MCAN_RXESC_F0DS_32B   0x00000005
 
#define CANFD6_REG_BITS_MCAN_RXESC_F0DS_48B   0x00000006
 
#define CANFD6_REG_BITS_MCAN_RXESC_F0DS_64B   0x00000007
 
#define CANFD6_REG_BITS_MCAN_TXBC_TFQM   0x40000000
 CAN FD 6 TXBC bit.
 
#define CANFD6_REG_BITS_MCAN_TXESC_TBDS_8   0x00000000
 
#define CANFD6_REG_BITS_MCAN_TXESC_TBDS_12   0x00000001
 
#define CANFD6_REG_BITS_MCAN_TXESC_TBDS_16   0x00000002
 
#define CANFD6_REG_BITS_MCAN_TXESC_TBDS_20   0x00000003
 
#define CANFD6_REG_BITS_MCAN_TXESC_TBDS_24   0x00000004
 
#define CANFD6_REG_BITS_MCAN_TXESC_TBDS_32   0x00000005
 
#define CANFD6_REG_BITS_MCAN_TXESC_TBDS_48   0x00000006
 
#define CANFD6_REG_BITS_MCAN_TXESC_TBDS_64   0x00000007
 
#define CANFD6_REG_BITS_MCAN_TSCC_PRESCALER_MASK   0x000F0000
 
#define CANFD6_REG_BITS_MCAN_TSCC_COUNTER_ALWAYS_0   0x00000000
 
#define CANFD6_REG_BITS_MCAN_TSCC_COUNTER_USE_TCP   0x00000001
 
#define CANFD6_REG_BITS_MCAN_TSCC_COUNTER_EXTERNAL   0x00000002
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR31   0x80000000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR30   0x40000000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR29   0x20000000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR28   0x10000000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR27   0x08000000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR26   0x04000000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR25   0x02000000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR24   0x01000000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR23   0x00800000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR22   0x00400000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR21   0x00200000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR20   0x00100000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR19   0x00080000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR18   0x00040000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR17   0x00020000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR16   0x00010000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR15   0x00008000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR14   0x00004000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR13   0x00002000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR12   0x00001000
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR11   0x00000800
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR10   0x00000400
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR9   0x00000200
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR8   0x00000100
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR7   0x00000080
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR6   0x00000040
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR5   0x00000020
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR4   0x00000010
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR3   0x00000008
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR2   0x00000004
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR1   0x00000002
 
#define CANFD6_REG_BITS_MCAN_TXBAR_AR0   0x00000001
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR31   0x80000000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR30   0x40000000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR29   0x20000000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR28   0x10000000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR27   0x08000000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR26   0x04000000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR25   0x02000000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR24   0x01000000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR23   0x00800000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR22   0x00400000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR21   0x00200000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR20   0x00100000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR19   0x00080000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR18   0x00040000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR17   0x00020000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR16   0x00010000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR15   0x00008000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR14   0x00004000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR13   0x00002000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR12   0x00001000
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR11   0x00000800
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR10   0x00000400
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR9   0x00000200
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR8   0x00000100
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR7   0x00000080
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR6   0x00000040
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR5   0x00000020
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR4   0x00000010
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR3   0x00000008
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR2   0x00000004
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR1   0x00000002
 
#define CANFD6_REG_BITS_MCAN_TXBCR_CR0   0x00000001
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE31   0x80000000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE30   0x40000000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE29   0x20000000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE28   0x10000000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE27   0x08000000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE26   0x04000000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE25   0x02000000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE24   0x01000000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE23   0x00800000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE22   0x00400000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE21   0x00200000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE20   0x00100000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE19   0x00080000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE18   0x00040000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE17   0x00020000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE16   0x00010000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE15   0x00008000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE14   0x00004000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE13   0x00002000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE12   0x00001000
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE11   0x00000800
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE10   0x00000400
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE9   0x00000200
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE8   0x00000100
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE7   0x00000080
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE6   0x00000040
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE5   0x00000020
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE4   0x00000010
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE3   0x00000008
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE2   0x00000004
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE1   0x00000002
 
#define CANFD6_REG_BITS_MCAN_TXBTIE_TIE0   0x00000001
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE31   0x80000000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE30   0x40000000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE29   0x20000000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE28   0x10000000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE27   0x08000000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE26   0x04000000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE25   0x02000000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE24   0x01000000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE23   0x00800000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE22   0x00400000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE21   0x00200000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE20   0x00100000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE19   0x00080000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE18   0x00040000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE17   0x00020000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE16   0x00010000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE15   0x00008000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE14   0x00004000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE13   0x00002000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE12   0x00001000
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE11   0x00000800
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE10   0x00000400
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE9   0x00000200
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE8   0x00000100
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE7   0x00000080
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE6   0x00000040
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE5   0x00000020
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE4   0x00000010
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE3   0x00000008
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE2   0x00000004
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE1   0x00000002
 
#define CANFD6_REG_BITS_MCAN_TXBCIE_CFIE0   0x00000001
 
#define CANFD6_REG_BITS_DEVICE_MODE_FORCED_SET_BITS   0x00000020
 
#define CANFD6_REG_BITS_DEVICE_MODE_WAKE_PIN_MASK   0xC0000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WAKE_PIN_DIS   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WAKE_PIN_RISING   0x40000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WAKE_PIN_FALLING   0x80000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WAKE_PIN_BOTHEDGES   0xC0000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WD_TIMER_MASK   0x30000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WD_TIMER_60MS   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WD_TIMER_600MS   0x10000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WD_TIMER_3S   0x20000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WD_TIMER_6S   0x30000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WD_CLK_MASK   0x08000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WD_CLK_20MHZ   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WD_CLK_40MHZ   0x08000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_GPO2_MASK   0x00C00000
 
#define CANFD6_REG_BITS_DEVICE_MODE_GPO2_CAN_FAULT   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_GPO2_MCAN_INT0   0x00400000
 
#define CANFD6_REG_BITS_DEVICE_MODE_GPO2_WDT   0x00800000
 
#define CANFD6_REG_BITS_DEVICE_MODE_GPO2_NINT   0x00C00000
 
#define CANFD6_REG_BITS_DEVICE_MODE_TESTMODE_ENMASK   0x00200000
 
#define CANFD6_REG_BITS_DEVICE_MODE_TESTMODE_EN   0x00200000
 
#define CANFD6_REG_BITS_DEVICE_MODE_TESTMODE_DIS   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_NWKRQ_VOLT_MASK   0x00080000
 
#define CANFD6_REG_BITS_DEVICE_MODE_NWKRQ_VOLT_INTERNAL   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_NWKRQ_VOLT_VIO   0x00080000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WDT_RESET_BIT   0x00040000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WDT_ACTION_MASK   0x00020000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WDT_ACTION_INT   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WDT_ACTION_INH_PULSE   0x00010000
 
#define CANFD6_REG_BITS_DEVICE_MODE_WDT_ACTION_WDT_PULSE   0x00020000
 
#define CANFD6_REG_BITS_DEVICE_MODE_GPO1_MODE_MASK   0x0000C000
 
#define CANFD6_REG_BITS_DEVICE_MODE_GPO1_MODE_GPO   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_GPO1_MODE_CLKOUT   0x00004000
 
#define CANFD6_REG_BITS_DEVICE_MODE_GPO1_MODE_GPI   0x00008000
 
#define CANFD6_REG_BITS_DEVICE_MODE_FAIL_SAFE_MASK   0x00002000
 
#define CANFD6_REG_BITS_DEVICE_MODE_FAIL_SAFE_EN   0x00002000
 
#define CANFD6_REG_BITS_DEVICE_MODE_FAIL_SAFE_DIS   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_CLKOUT_MASK   0x00001000
 
#define CANFD6_REG_BITS_DEVICE_MODE_CLKOUT_DIV1   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_CLKOUT_DIV2   0x00001000
 
#define CANFD6_REG_BITS_DEVICE_MODE_GPO1_FUNC_MASK   0x00000C00
 
#define CANFD6_REG_BITS_DEVICE_MODE_GPO1_FUNC_SPI_INT   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_GPO1_FUNC_MCAN_INT1   0x00000400
 
#define CANFD6_REG_BITS_DEVICE_MODE_GPO1_FUNC_UVLO_THERM   0x00000800
 
#define CANFD6_REG_BITS_DEVICE_MODE_INH_MASK   0x00000200
 
#define CANFD6_REG_BITS_DEVICE_MODE_INH_DIS   0x00000200
 
#define CANFD6_REG_BITS_DEVICE_MODE_INH_EN   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_NWKRQ_CONFIG_MASK   0x00000100
 
#define CANFD6_REG_BITS_DEVICE_MODE_NWKRQ_CONFIG_INH   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_NWKRQ_CONFIG_WKRQ   0x00000100
 
#define CANFD6_REG_BITS_DEVICE_MODE_DEVICEMODE_MASK   0x000000C0
 
#define CANFD6_REG_BITS_DEVICE_MODE_DEVICEMODE_SLEEP   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_DEVICEMODE_STANDBY   0x00000040
 
#define CANFD6_REG_BITS_DEVICE_MODE_DEVICEMODE_NORMAL   0x00000080
 
#define CANFD6_REG_BITS_DEVICE_MODE_WDT_MASK   0x00000008
 
#define CANFD6_REG_BITS_DEVICE_MODE_WDT_EN   0x00000008
 
#define CANFD6_REG_BITS_DEVICE_MODE_WDT_DIS   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_DEVICE_RESET   0x00000004
 
#define CANFD6_REG_BITS_DEVICE_MODE_SWE_MASK   0x00000002
 
#define CANFD6_REG_BITS_DEVICE_MODE_SWE_DIS   0x00000002
 
#define CANFD6_REG_BITS_DEVICE_MODE_SWE_EN   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_TESTMODE_MASK   0x00000001
 
#define CANFD6_REG_BITS_DEVICE_MODE_TESTMODE_PHY   0x00000000
 
#define CANFD6_REG_BITS_DEVICE_MODE_TESTMODE_CONTROLLER   0x00000001
 
#define CANFD6_REG_BITS_DEVICE_IR_CANLGND   0x08000000
 
#define CANFD6_REG_BITS_DEVICE_IR_CANBUSOPEN   0x04000000
 
#define CANFD6_REG_BITS_DEVICE_IR_CANBUSGND   0x02000000
 
#define CANFD6_REG_BITS_DEVICE_IR_CANBUSBAT   0x01000000
 
#define CANFD6_REG_BITS_DEVICE_IR_UVSUP   0x00400000
 
#define CANFD6_REG_BITS_DEVICE_IR_UVIO   0x00200000
 
#define CANFD6_REG_BITS_DEVICE_IR_PWRON   0x00100000
 
#define CANFD6_REG_BITS_DEVICE_IR_TSD   0x00080000
 
#define CANFD6_REG_BITS_DEVICE_IR_WDTO   0x00040000
 
#define CANFD6_REG_BITS_DEVICE_IR_ECCERR   0x00010000
 
#define CANFD6_REG_BITS_DEVICE_IR_CANINT   0x00008000
 
#define CANFD6_REG_BITS_DEVICE_IR_LWU   0x00004000
 
#define CANFD6_REG_BITS_DEVICE_IR_WKERR   0x00002000
 
#define CANFD6_REG_BITS_DEVICE_IR_FRAME_OVF   0x00001000
 
#define CANFD6_REG_BITS_DEVICE_IR_CANSLNT   0x00000400
 
#define CANFD6_REG_BITS_DEVICE_IR_CANDOM   0x00000100
 
#define CANFD6_REG_BITS_DEVICE_IR_GLOBALERR   0x00000080
 
#define CANFD6_REG_BITS_DEVICE_IR_nWKRQ   0x00000040
 
#define CANFD6_REG_BITS_DEVICE_IR_CANERR   0x00000020
 
#define CANFD6_REG_BITS_DEVICE_IR_CANBUSFAULT   0x00000010
 
#define CANFD6_REG_BITS_DEVICE_IR_SPIERR   0x00000008
 
#define CANFD6_REG_BITS_DEVICE_IR_SWERR   0x00000004
 
#define CANFD6_REG_BITS_DEVICE_IR_M_CAN_INT   0x00000002
 
#define CANFD6_REG_BITS_DEVICE_IR_VTWD   0x00000001
 
#define CANFD6_REG_BITS_DEVICE_IE_UVCCOUT   0x00800000
 
#define CANFD6_REG_BITS_DEVICE_IE_UVSUP   0x00400000
 
#define CANFD6_REG_BITS_DEVICE_IE_UVIO   0x00200000
 
#define CANFD6_REG_BITS_DEVICE_IE_PWRON   0x00100000
 
#define CANFD6_REG_BITS_DEVICE_IE_TSD   0x00080000
 
#define CANFD6_REG_BITS_DEVICE_IE_WDTO   0x00040000
 
#define CANFD6_REG_BITS_DEVICE_IE_ECCERR   0x00010000
 
#define CANFD6_REG_BITS_DEVICE_IE_CANINT   0x00008000
 
#define CANFD6_REG_BITS_DEVICE_IE_LWU   0x00004000
 
#define CANFD6_REG_BITS_DEVICE_IE_WKERR   0x00002000
 
#define CANFD6_REG_BITS_DEVICE_IE_FRAME_OVF   0x00001000
 
#define CANFD6_REG_BITS_DEVICE_IE_CANSLNT   0x00000400
 
#define CANFD6_REG_BITS_DEVICE_IE_CANDOM   0x00000100
 
#define CANFD6_REG_BITS_DEVICE_IE_MASK   0x7F69D700
 
#define CANFD6_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  canfd6_return_value_t { CANFD6_OK = 0 , CANFD6_ERROR = -1 }
 CAN FD 6 Click return value data. More...
 
enum  canfd6_pin_state_t { CANFD6_PIN_STATE_LOW = 0 , CANFD6_PIN_STATE_HIGH }
 CAN FD 6 Click pin states. More...
 
enum  canfd6_mcan_fifo_enum_t { CANFD6_RXFIFO0 , CANFD6_RXFIFO1 }
 CAN FD 6 Click RX FIFO enum. More...
 
enum  canfd6_wdt_timer_enum_t { CANFD6_WDT_60MS , CANFD6_WDT_600MS , CANFD6_WDT_3S , CANFD6_WDT_6S }
 CAN FD 6 Click WDT timer enum. More...
 
enum  canfd6_device_test_mode_enum_t { CANFD6_DEVICE_TEST_MODE_NORMAL , CANFD6_DEVICE_TEST_MODE_PHY , CANFD6_DEVICE_TEST_MODE_CONTROLLER }
 CAN FD 6 Click device test enum. More...
 
enum  canfd6_device_mode_enum_t { CANFD6_DEVICE_MODE_NORMAL , CANFD6_DEVICE_MODE_STANDBY , CANFD6_DEVICE_MODE_SLEEP }
 CAN FD 6 Click device mode enum. More...
 
enum  canfd6_mram_elem_data_size_t {
  CANFD6_MRAM_8_Byte_Data = 0 , CANFD6_MRAM_12_Byte_Data = 0x1 , CANFD6_MRAM_16_Byte_Data = 0x2 , CANFD6_MRAM_20_Byte_Data = 0x3 ,
  CANFD6_MRAM_24_Byte_Data = 0x4 , CANFD6_MRAM_32_Byte_Data = 0x5 , CANFD6_MRAM_48_Byte_Data = 0x6 , CANFD6_MRAM_64_Byte_Data = 0x7
}
 CAN FD 6 Click MRAM element data size. More...
 
enum  canfd6_sid_sfec_values_t {
  CANFD6_SID_SFEC_DISABLED = 0x0 , CANFD6_SID_SFEC_STORERX0 = 0x1 , CANFD6_SID_SFEC_STORERX1 = 0x2 , CANFD6_SID_SFEC_REJECTMATCH = 0x3 ,
  CANFD6_SID_SFEC_PRIORITY = 0x4 , CANFD6_SID_SFEC_PRIORITYSTORERX0 = 0x5 , CANFD6_SID_SFEC_PRIORITYSTORERX1 = 0x6 , CANFD6_SID_SFEC_STORERXBUFORDEBUG = 0x7
}
 CAN FD 6 SID SFEC enum. More...
 
enum  canfd6_sid_sft_values_t { CANFD6_SID_SFT_DISABLED = 0x3 , CANFD6_SID_SFT_CLASSIC = 0x2 , CANFD6_SID_SFT_DUALID = 0x1 , CANFD6_SID_SFT_RANGE = 0x0 }
 CAN FD 6 SID SFT enum. More...
 
enum  canfd6_xid_efec_values_t {
  CANFD6_XID_EFEC_DISABLED = 0x0 , CANFD6_XID_EFEC_STORERX0 = 0x1 , CANFD6_XID_EFEC_STORERX1 = 0x2 , CANFD6_XID_EFEC_REJECTMATCH = 0x3 ,
  CANFD6_XID_EFEC_PRIORITY = 0x4 , CANFD6_XID_EFEC_PRIORITYSTORERX0 = 0x5 , CANFD6_XID_EFEC_PRIORITYSTORERX1 = 0x6 , CANFD6_XID_EFEC_STORERXBUFORDEBUG = 0x7
}
 CAN FD 6 XID EFEC enum. More...
 
enum  canfd6_xid_eft_values_t { CANFD6_XID_EFT_RANGENOMASK = 0x3 , CANFD6_XID_EFT_CLASSIC = 0x2 , CANFD6_XID_EFT_DUALID = 0x1 , CANFD6_XID_EFT_RANGE = 0x0 }
 CAN FD 6 XID EFT enum. More...
 
enum  canfd6_gfc_no_match_behavior_t { CANFD6_GFC_ACCEPT_INTO_RXFIFO0 = 0 , CANFD6_GFC_ACCEPT_INTO_RXFIFO1 = 1 , CANFD6_GFC_REJECT = 2 }
 CAN FD 6 GFC enum. More...
 
enum  canfd6_dev_config_gpo1_t { CANFD6_DEV_CONFIG_GPO1_SPI_FAULT_INT = 0 , CANFD6_DEV_CONFIG_GPO1_MCAN_INT1 = 1 , CANFD6_DEV_CONFIG_GPO1_UVO_OR_THERMAL_INT = 2 }
 CAN FD 6 GPO1 config enum. More...
 
enum  canfd6_dev_config_gpio1_t { CANFD6_DEV_CONFIG_GPIO1_CONFIG_GPO = 0 , CANFD6_DEV_CONFIG_GPIO1_CONFIG_WDT_INPUT = 2 }
 CAN FD 6 GPIO1 config enum. More...
 
enum  canfd6_dev_config_wdt_action_t { CANFD6_DEV_CONFIG_WDT_ACTION_nINT = 0 , CANFD6_DEV_CONFIG_WDT_ACTION_PULSE_INH = 1 , CANFD6_DEV_CONFIG_WDT_ACTION_PULSE_WDT_OUT = 2 }
 CAN FD 6 WDT action enum. More...
 
enum  canfd6_dev_config_gpo2_t { CANFD6_DEV_CONFIG_GPO2_NO_ACTION = 0 , CANFD6_DEV_CONFIG_GPO2_MCAN_INT0 = 1 , CANFD6_DEV_CONFIG_GPO2_WATCHDOG = 2 , CANFD6_DEV_CONFIG_GPO2_MIRROR_INT = 3 }
 CAN FD 6 GPO2 config enum. More...
 
enum  canfd6_dev_config_wake_t { CANFD6_DEV_CONFIG_WAKE_DISABLED = 0 , CANFD6_DEV_CONFIG_WAKE_RISING_EDGE = 1 , CANFD6_DEV_CONFIG_WAKE_FALLING_EDGE = 2 , CANFD6_DEV_CONFIG_WAKE_BOTH_EDGES = 3 }
 CAN FD 6 wake config enum. More...
 

Functions

void canfd6_cfg_setup (canfd6_cfg_t *cfg)
 CAN FD 6 configuration object setup function.
 
err_t canfd6_init (canfd6_t *ctx, canfd6_cfg_t *cfg)
 CAN FD 6 initialization function.
 
void canfd6_default_cfg (canfd6_t *ctx)
 CAN FD 6 default configuration function.
 
void canfd6_wkr_pin_state (canfd6_t *ctx, canfd6_pin_state_t state)
 CAN FD 6 wkr pin state function.
 
void canfd6_rst_pin_state (canfd6_t *ctx, canfd6_pin_state_t state)
 CAN FD 6 rst pin state function.
 
void canfd6_wkp_pin_state (canfd6_t *ctx, canfd6_pin_state_t state)
 CAN FD 6 wkp pin state function.
 
uint8_t canfd6_get_int_pin (canfd6_t *ctx)
 CAN FD 6 get int pin function.
 
err_t canfd6_enable_protected_registers (canfd6_t *ctx)
 CAN FD 6 enable protected registers function.
 
err_t canfd6_disable_protected_registers (canfd6_t *ctx)
 CAN FD 6 disable protected registers function.
 
void canfd6_configure_cccr_register (canfd6_t *ctx, canfd6_mcan_cccr_config_t *cccr_config)
 CAN FD 6 configure cccr register function.
 
void canfd6_read_cccr_register (canfd6_t *ctx, canfd6_mcan_cccr_config_t *cccr_config)
 CAN FD 6 read cccr register function.
 
void canfd6_mcan_read_datatimingfd_simple (canfd6_t *ctx, canfd6_mcan_data_timing_simple_t *data_timing)
 CAN FD 6 read data timing fd simple function.
 
void canfd6_mcan_read_datatimingfd_raw (canfd6_t *ctx, canfd6_mcan_data_timing_raw_t *data_timing)
 CAN FD 6 read data timing fd raw function.
 
void canfd6_mcan_configure_datatiming_simple (canfd6_t *ctx, canfd6_mcan_data_timing_simple_t *data_timing)
 CAN FD 6 configure data timing simple function.
 
void canfd6_mcan_configure_datatiming_raw (canfd6_t *ctx, canfd6_mcan_data_timing_raw_t *data_timing)
 CAN FD 6 configure data timing raw function.
 
void canfd6_mcan_read_nominaltiming_simple (canfd6_t *ctx, canfd6_mcan_nominal_timing_simple_t *nom_timing)
 CAN FD 6 read nominal timing simple function.
 
void canfd6_mcan_read_nominaltiming_raw (canfd6_t *ctx, canfd6_mcan_nominal_timing_raw_t *nom_timing)
 CAN FD 6 read nominal timing raw function.
 
void canfd6_mcan_configure_nominaltiming_simple (canfd6_t *ctx, canfd6_mcan_nominal_timing_simple_t *nom_timing)
 CAN FD 6 configure nominal timing simple function.
 
void canfd6_mcan_configure_nominaltiming_raw (canfd6_t *ctx, canfd6_mcan_nominal_timing_raw_t *nom_timing)
 CAN FD 6 configure nominal timing raw function.
 
void canfd6_mcan_configure_globalfilter (canfd6_t *ctx, canfd6_mcan_global_filter_configuration_t *gfc)
 CAN FD 6 configure global filter function.
 
err_t canfd6_mram_configure (canfd6_t *ctx, canfd6_mram_config_t *mram_config)
 CAN FD 6 mram configure function.
 
void canfd6_mram_clear (canfd6_t *ctx)
 CAN FD 6 mram clear function.
 
uint8_t canfd6_mcan_read_nextfifo (canfd6_t *ctx, canfd6_mcan_fifo_enum_t fifo_def, canfd6_mcan_rx_header_t *header, uint8_t data_payload[])
 CAN FD 6 read next fifo function.
 
uint8_t canfd6_mcan_read_rxbuffer (canfd6_t *ctx, uint8_t buf_index, canfd6_mcan_rx_header_t *header, uint8_t data_payload[])
 CAN FD 6 read rx buffer function.
 
uint32_t canfd6_mcan_write_txbuffer (canfd6_t *ctx, uint8_t buf_index, canfd6_mcan_tx_header_t *header, uint8_t data_payload[])
 CAN FD 6 write tx buffer function.
 
err_t canfd6_mcan_transmit_buffer_contents (canfd6_t *ctx, uint8_t buf_index)
 CAN FD 6 transmit buffer contents function.
 
err_t canfd6_mcan_write_sid_filter (canfd6_t *ctx, uint8_t filter_index, canfd6_mcan_sid_filter_t *filter)
 CAN FD 6 write sid filter function.
 
err_t canfd6_mcan_read_sid_filter (canfd6_t *ctx, uint8_t filter_index, canfd6_mcan_sid_filter_t *filter)
 CAN FD 6 read sid filter function.
 
err_t canfd6_mcan_write_xid_filter (canfd6_t *ctx, uint8_t filter_index, canfd6_mcan_xid_filter_t *filter)
 CAN FD 6 write xid filter function.
 
err_t canfd6_mcan_read_xid_filter (canfd6_t *ctx, uint8_t filter_index, canfd6_mcan_xid_filter_t *filter)
 CAN FD 6 read xid filter function.
 
void canfd6_mcan_read_interrupts (canfd6_t *ctx, canfd6_mcan_interrupts_t *ir)
 CAN FD 6 read interrupts function.
 
void canfd6_mcan_clear_interrupts (canfd6_t *ctx, canfd6_mcan_interrupts_t *ir)
 CAN FD 6 clear interrupts function.
 
void canfd6_mcan_clear_interrupts_all (canfd6_t *ctx)
 CAN FD 6 clear interrupts all function.
 
void canfd6_mcan_read_interrupt_enable (canfd6_t *ctx, canfd6_mcan_interrupt_enable_t *ie)
 CAN FD 6 read interrupt enable function.
 
void canfd6_mcan_configure_interrupt_enable (canfd6_t *ctx, canfd6_mcan_interrupt_enable_t *ie)
 CAN FD 6 configure interrupt enable function.
 
uint8_t canfd6_mcan_dlc_to_bytes (uint8_t input_dlc)
 CAN FD 6 dlc to bytes function.
 
uint8_t canfd6_mcan_txrxesc_data_byte_value (uint8_t input_esc_value)
 CAN FD 6 txrxesc data byte value function.
 
uint16_t canfd6_device_read_version (canfd6_t *ctx)
 CAN FD 6 device read version function.
 
void canfd6_device_configure (canfd6_t *ctx, canfd6_dev_config_t *dev_cfg)
 CAN FD 6 device configure function.
 
void canfd6_device_read_config (canfd6_t *ctx, canfd6_dev_config_t *dev_cfg)
 CAN FD 6 device read config function.
 
void canfd6_device_read_interrupts (canfd6_t *ctx, canfd6_device_interrupts_t *ir)
 CAN FD 6 device read interrupts function.
 
void canfd6_device_clear_interrupts (canfd6_t *ctx, canfd6_device_interrupts_t *ir)
 CAN FD 6 device clear interrupts function.
 
void canfd6_device_clear_interrupts_all (canfd6_t *ctx)
 CAN FD 6 device clear interrupts all function.
 
void canfd6_device_clear_spierr (canfd6_t *ctx)
 CAN FD 6 device clear spierr function.
 
void canfd6_device_read_interrupt_enable (canfd6_t *ctx, canfd6_device_interrupt_enable_t *ie)
 CAN FD 6 device read interrupt enable function.
 
void canfd6_device_configure_ie (canfd6_t *ctx, canfd6_device_interrupt_enable_t *ie)
 CAN FD 6 device configure ie function.
 
err_t canfd6_device_set_mode (canfd6_t *ctx, canfd6_device_mode_enum_t mode_define)
 CAN FD 6 device set mode function.
 
canfd6_device_mode_enum_t canfd6_device_read_mode (canfd6_t *ctx)
 CAN FD 6 device read mode function.
 
err_t canfd6_device_enable_testmode (canfd6_t *ctx, canfd6_device_test_mode_enum_t mode_define)
 CAN FD 6 device enable testmode function.
 
void canfd6_device_disable_testmode (canfd6_t *ctx)
 CAN FD 6 device disable testmode function.
 
canfd6_device_test_mode_enum_t canfd6_device_read_testmode (canfd6_t *ctx)
 CAN FD 6 device read testmode function.
 
err_t canfd6_wdt_configure (canfd6_t *ctx, canfd6_wdt_timer_enum_t wdt_timeout)
 CAN FD 6 wdt configure function.
 
canfd6_wdt_timer_enum_t canfd6_wdt_read (canfd6_t *ctx)
 CAN FD 6 wdt read function.
 
void canfd6_wdt_enable (canfd6_t *ctx)
 CAN FD 6 wdt enable function.
 
void canfd6_wdt_disable (canfd6_t *ctx)
 CAN FD 6 wdt disable function.
 
void canfd6_wdt_reset (canfd6_t *ctx)
 CAN FD 6 wdt reset function.
 

Detailed Description

This file contains API for CAN FD 6 Click Driver.

Enumeration Type Documentation

◆ canfd6_dev_config_gpio1_t

CAN FD 6 GPIO1 config enum.

Predefined GPIO1 config enum values.

Enumerator
CANFD6_DEV_CONFIG_GPIO1_CONFIG_GPO 

Sets GPIO1 as an output. Be sure to see GPIO1_GPO_CONFIG field to set the behavior.

CANFD6_DEV_CONFIG_GPIO1_CONFIG_WDT_INPUT 

Sets GPIO1 as an input for the watchdog timer. Watchdog will need to be enabled.

◆ canfd6_dev_config_gpo1_t

CAN FD 6 GPO1 config enum.

Predefined GPO1 config enum values.

Enumerator
CANFD6_DEV_CONFIG_GPO1_SPI_FAULT_INT 

Active low output for a SPIERR.

CANFD6_DEV_CONFIG_GPO1_MCAN_INT1 

Active low output for MCAN_INT1 output (See MCAN ILE and ILS registers to use).

CANFD6_DEV_CONFIG_GPO1_UVO_OR_THERMAL_INT 

Active low output for any under voltage or over temp interrupt.

◆ canfd6_dev_config_gpo2_t

CAN FD 6 GPO2 config enum.

Predefined GPO2 config enum values.

Enumerator
CANFD6_DEV_CONFIG_GPO2_NO_ACTION 

No action for GPO2.

CANFD6_DEV_CONFIG_GPO2_MCAN_INT0 

Used as an output for MCAN INT0.

CANFD6_DEV_CONFIG_GPO2_WATCHDOG 

Used as a watchdog output.

CANFD6_DEV_CONFIG_GPO2_MIRROR_INT 

Mirror nINT pin.

◆ canfd6_dev_config_wake_t

CAN FD 6 wake config enum.

Predefined wake config enum values.

Enumerator
CANFD6_DEV_CONFIG_WAKE_DISABLED 

Disabled. Wake pin is not used.

CANFD6_DEV_CONFIG_WAKE_RISING_EDGE 

Low to high transition will wake the part.

CANFD6_DEV_CONFIG_WAKE_FALLING_EDGE 

High to low transition will wake the part.

CANFD6_DEV_CONFIG_WAKE_BOTH_EDGES 

Either transition will wake the part.

◆ canfd6_dev_config_wdt_action_t

CAN FD 6 WDT action enum.

Predefined watchdog action enum values.

Enumerator
CANFD6_DEV_CONFIG_WDT_ACTION_nINT 

Sets an interrupt flag and the interrupt pin will be pulled low.

CANFD6_DEV_CONFIG_WDT_ACTION_PULSE_INH 

Pulse INH low for ~300 ms then high.

CANFD6_DEV_CONFIG_WDT_ACTION_PULSE_WDT_OUT 

Pulse the watchdog output pin low for ~300 ms and high.

◆ canfd6_device_mode_enum_t

CAN FD 6 Click device mode enum.

Predefined device mode enum values.

Enumerator
CANFD6_DEVICE_MODE_NORMAL 
CANFD6_DEVICE_MODE_STANDBY 
CANFD6_DEVICE_MODE_SLEEP 

◆ canfd6_device_test_mode_enum_t

CAN FD 6 Click device test enum.

Predefined device test enum values.

Enumerator
CANFD6_DEVICE_TEST_MODE_NORMAL 
CANFD6_DEVICE_TEST_MODE_PHY 
CANFD6_DEVICE_TEST_MODE_CONTROLLER 

◆ canfd6_gfc_no_match_behavior_t

CAN FD 6 GFC enum.

Predefined GFC enum values.

Enumerator
CANFD6_GFC_ACCEPT_INTO_RXFIFO0 

Accept into RXFIFO0.

CANFD6_GFC_ACCEPT_INTO_RXFIFO1 

Accept into RXFIFO1.

CANFD6_GFC_REJECT 

Reject.

◆ canfd6_mcan_fifo_enum_t

CAN FD 6 Click RX FIFO enum.

Predefined RX FIFO enum values.

Enumerator
CANFD6_RXFIFO0 
CANFD6_RXFIFO1 

◆ canfd6_mram_elem_data_size_t

CAN FD 6 Click MRAM element data size.

Predefined MRAM element data size enum values.

Enumerator
CANFD6_MRAM_8_Byte_Data 
CANFD6_MRAM_12_Byte_Data 
CANFD6_MRAM_16_Byte_Data 
CANFD6_MRAM_20_Byte_Data 
CANFD6_MRAM_24_Byte_Data 
CANFD6_MRAM_32_Byte_Data 
CANFD6_MRAM_48_Byte_Data 
CANFD6_MRAM_64_Byte_Data 

◆ canfd6_pin_state_t

CAN FD 6 Click pin states.

Predefined logic level states for pin gpio status.

Enumerator
CANFD6_PIN_STATE_LOW 
CANFD6_PIN_STATE_HIGH 

◆ canfd6_return_value_t

CAN FD 6 Click return value data.

Predefined enum values for driver return values.

Enumerator
CANFD6_OK 
CANFD6_ERROR 

◆ canfd6_sid_sfec_values_t

CAN FD 6 SID SFEC enum.

Predefined SID SFEC enum values.

Enumerator
CANFD6_SID_SFEC_DISABLED 

Disabled filter. This filter will do nothing if it matches a packet.

CANFD6_SID_SFEC_STORERX0 

Store in RX FIFO 0 if the filter matches the incoming message.

CANFD6_SID_SFEC_STORERX1 

Store in RX FIFO 1 if the filter matches the incoming message.

CANFD6_SID_SFEC_REJECTMATCH 

Reject the packet (do not store, do not notify MCU) if the filter matches the incoming message.

CANFD6_SID_SFEC_PRIORITY 

Store in default location but set a high priority message interrupt if the filter matches the incoming message.

CANFD6_SID_SFEC_PRIORITYSTORERX0 

Store in RX FIFO 0 and set a high priority message interrupt if the filter matches the incoming message.

CANFD6_SID_SFEC_PRIORITYSTORERX1 

Store in RX FIFO 1 and set a high priority message interrupt if the filter matches the incoming message.

CANFD6_SID_SFEC_STORERXBUFORDEBUG 

Store in RX Buffer for debug if the filter matches the incoming message. SFT is ignored if this is selected.

◆ canfd6_sid_sft_values_t

CAN FD 6 SID SFT enum.

Predefined SID SFT enum values.

Enumerator
CANFD6_SID_SFT_DISABLED 

Disabled filter. This filter will match nothing.

CANFD6_SID_SFT_CLASSIC 

Classic filter with SFID1 as the ID to match, and SFID2 as the bit mask that applies to SFID1.

CANFD6_SID_SFT_DUALID 

Dual ID filter, where both SFID1 and SFID2 hold IDs that can match (must match exactly).

CANFD6_SID_SFT_RANGE 

Range Filter. SFID1 holds the start address, and SFID2 holds the end address. Any address in between will match.

◆ canfd6_wdt_timer_enum_t

CAN FD 6 Click WDT timer enum.

Predefined watchdog timer enum values.

Enumerator
CANFD6_WDT_60MS 
CANFD6_WDT_600MS 
CANFD6_WDT_3S 
CANFD6_WDT_6S 

◆ canfd6_xid_efec_values_t

CAN FD 6 XID EFEC enum.

Predefined XID EFEC enum values.

Enumerator
CANFD6_XID_EFEC_DISABLED 

Disabled filter. This filter will do nothing if it matches a packet.

CANFD6_XID_EFEC_STORERX0 

Store in RX FIFO 0 if the filter matches the incoming message.

CANFD6_XID_EFEC_STORERX1 

Store in RX FIFO 1 if the filter matches the incoming message.

CANFD6_XID_EFEC_REJECTMATCH 

Reject the packet (do not store, do not notify MCU) if the filter matches the incoming message.

CANFD6_XID_EFEC_PRIORITY 

Store in default location but set a high priority message interrupt if the filter matches the incoming message.

CANFD6_XID_EFEC_PRIORITYSTORERX0 

Store in RX FIFO 0 and set a high priority message interrupt if the filter matches the incoming message.

CANFD6_XID_EFEC_PRIORITYSTORERX1 

Store in RX FIFO 1 and set a high priority message interrupt if the filter matches the incoming message.

CANFD6_XID_EFEC_STORERXBUFORDEBUG 

Store in RX Buffer for debug if the filter matches the incoming message.

◆ canfd6_xid_eft_values_t

CAN FD 6 XID EFT enum.

Predefined XID EFT enum values.

Enumerator
CANFD6_XID_EFT_RANGENOMASK 

Range filter from EFID1 to EFID2, The XIDAM mask is not applied.

CANFD6_XID_EFT_CLASSIC 

Classic Filter, EFID1 is the ID/filter, and EFID2 is the mask.

CANFD6_XID_EFT_DUALID 

Dual ID filter matches if the incoming ID matches EFID1 or EFID2.

CANFD6_XID_EFT_RANGE 

Range filter from EFID1 to EFID2.