Go to the source code of this file.
Data Structures | |
| struct | mcan_bit_timing_param_struct |
| CAN Bit Timing Parameters. More... | |
| struct | mcan_tx_message_struct |
| CAN Transmit Message Frame. More... | |
| struct | mcan_rx_message_struct |
| CAN Receive Message Frame. More... | |
| union | mcan_tx_event_fifo_elem_struct |
| TX Event Fifo Element Structure. More... | |
| union | mcan_filter_config_struct |
| MCAN Filter Configuration. More... | |
| union | mcan_rxfifo_config_struct |
| MCAN RXFIFO Configuration. More... | |
| struct | mcan_rxbuf_config_t |
| MCAN RXBUF Configuration. More... | |
| union | mcan_rx_fifo_or_buf_elem_config_struct |
| MCAN RXBUF or RXFIFO Element Configuration. More... | |
| union | mcan_txbuf_config_struct |
| struct | mcan_txbuf_elem_config_struct |
| union | mcan_tx_evt_fifo_config_t |
| MCAN TX Event FIFO Structure. More... | |
| struct | mcan_ram_flexible_config_struct |
| MCAN RAM Flexible Configuration. More... | |
| struct | mcan_ram_config_struct |
| MCAN RAM configuration. More... | |
| struct | mcan_global_filter_config_struct |
| MCAN Global CAN configuration. More... | |
| struct | mcan_std_id_filter_elem_struct |
| MCAN Filter Element definitions. More... | |
| struct | mcan_filter_elem_list_struct |
| MCAN Filter Element List structure. More... | |
| struct | mcan_all_filters_config_struct |
| MCAN Configuration for all filters. More... | |
| struct | mcan_timestamp_value_struct |
| MCAN Timestamp Value. More... | |
| struct | mcan_tsu_config_struct |
| MCAN TSU Configuration. More... | |
| struct | mcan_internal_timestamp_config_struct |
| MCAN Internal timestamp configuration. More... | |
| struct | mcan_timeout_config_struct |
| MCAN Timeout configuration structure. More... | |
| struct | mcan_tdc_config_t |
| MCAN Transmitter Delay Compensation Configuration. More... | |
| struct | mcan_config_struct |
| MCAN Configuration Structure. More... | |
| struct | mcan_timeout_counter_config_struct |
| MCAN Timeout Counter Configuration. More... | |
| struct | mcan_error_count_struct |
| MCAN Error Count Information. More... | |
| struct | mcan_protocol_status |
| MCAN Protocol Status. More... | |
| struct | mcan_high_priority_message_status_struct |
| MCAN High Priority Message Status Information. More... | |
Enumerations | |
| enum | { status_mcan_filter_index_out_of_range = ((uint32_t)( status_group_mcan )*1000U + (uint32_t)( 0 )) , status_mcan_rxfifo_empty = ((uint32_t)( status_group_mcan )*1000U + (uint32_t)( 1 )) , status_mcan_rxfifo_full = ((uint32_t)( status_group_mcan )*1000U + (uint32_t)( 2 )) , status_mcan_txbuf_full = ((uint32_t)( status_group_mcan )*1000U + (uint32_t)( 3 )) , status_mcan_txfifo_full = ((uint32_t)( status_group_mcan )*1000U + (uint32_t)( 4 )) , status_mcan_rxfifo0_busy = ((uint32_t)( status_group_mcan )*1000U + (uint32_t)( 5 )) , status_mcan_rxfifo1_busy = ((uint32_t)( status_group_mcan )*1000U + (uint32_t)( 6 )) , status_mcan_txbuf_index_out_of_range = ((uint32_t)( status_group_mcan )*1000U + (uint32_t)( 7 )) , status_mcan_rxbuf_index_out_of_range = ((uint32_t)( status_group_mcan )*1000U + (uint32_t)( 8 )) , status_mcan_rxbuf_empty = ((uint32_t)( status_group_mcan )*1000U + (uint32_t)( 9 )) , status_mcan_tx_evt_fifo_empty = ((uint32_t)( status_group_mcan )*1000U + (uint32_t)( 10 )) , status_mcan_timestamp_not_exist = ((uint32_t)( status_group_mcan )*1000U + (uint32_t)( 11 )) , status_mcan_ram_out_of_range = ((uint32_t)( status_group_mcan )*1000U + (uint32_t)( 12 )) , status_mcan_timeout = ((uint32_t)( status_group_mcan )*1000U + (uint32_t)( 13 )) , status_mcan_invalid_bit_timing = ((uint32_t)( status_group_mcan )*1000U + (uint32_t)( 14 )) } |
| enum | mcan_last_error_code { mcan_last_error_code_no_error = 0 , mcan_last_error_code_stuff_error , mcan_last_error_code_format_error , mcan_last_error_code_ack_error , mcan_last_error_code_bit1_error , mcan_last_error_code_bit0_error , mcan_last_error_code_crc_error , mcan_last_error_code_no_change } |
| MCAN Last Error Code. More... | |
| enum | mcan_activity_enum { mcan_activity_sync = 0 , mcan_activity_idle , mcan_activity_receiver , mcan_activity_transmitter } |
| MCAN Communication State. More... | |
| enum | mcan_bit_timing_option { mcan_bit_timing_can2_0 , mcan_bit_timing_canfd_nominal , mcan_bit_timing_canfd_data } |
| CAN Bit Timing Options. More... | |
| enum | mcan_node_mode_enum { mcan_mode_normal = 0 , mcan_mode_loopback_internal = 1 , mcan_mode_loopback_external = 2 , mcan_mode_listen_only = 3 } |
| CAN Node Mode types. More... | |
| enum | mcan_timeout_sel_enum { mcan_timeout_continuous_operation = 0 , mcan_timeout_triggered_by_tx_evt_fifo = 1 , mcan_timeout_triggered_by_rx_fifo0 = 2 , mcan_timeout_triggered_by_rx_fifo1 = 3 } |
| MCAN Timeout Selection Options. More... | |
Functions | |
| static void | mcan_enable_transmit_pause (MCAN_Type *ptr) |
| Enable Transmit Pause. More... | |
| static void | mcan_disable_transmit_pause (MCAN_Type *ptr) |
| Disable Transmit Pause. More... | |
| static void | mcan_enable_edge_filtering (MCAN_Type *ptr) |
| Enable Edge Filtering. More... | |
| static void | mcan_disable_edge_filtering (MCAN_Type *ptr) |
| Disable Edge Filtering. More... | |
| static void | mcan_enable_protocol_exception_handling (MCAN_Type *ptr) |
| Enable Protocol Exception Handling. More... | |
| static void | mcan_disable_protocol_exception_handling (MCAN_Type *ptr) |
| Disable Protocol Exception Handling. More... | |
| static void | mcan_enable_wide_message_marker (MCAN_Type *ptr) |
| Enable Wide Message Marker. More... | |
| static void | mcan_disable_wide_message_marker (MCAN_Type *ptr) |
| Disable Wide Message Marker. More... | |
| static void | mcan_enable_tsu (MCAN_Type *ptr) |
| Enable External Timestamp Unit. More... | |
| static void | mcan_disable_tsu (MCAN_Type *ptr) |
| Disable External Timestamp Unit. More... | |
| static bool | mcan_is_tsu_used (MCAN_Type *ptr) |
| Check whether TSU is used. More... | |
| static bool | mcan_is_64bit_tsu_timestamp_used (MCAN_Type *ptr) |
| Check whether 64-bit TSU timestamp is used. More... | |
| static void | mcan_enable_bitrate_switch (MCAN_Type *ptr) |
| Enable Bit Rate Switch. More... | |
| static void | mcan_disable_bitrate_switch (MCAN_Type *ptr) |
| Disable Bit Rate Switch. More... | |
| static void | mcan_enable_auto_retransmission (MCAN_Type *ptr) |
| Enable Auto Retransmission. More... | |
| static void | mcan_disable_auto_retransmission (MCAN_Type *ptr) |
| Disable Auto Transmission. More... | |
| static void | mcan_enable_bus_monitoring_mode (MCAN_Type *ptr) |
| Enable Bus monitoring Mode. More... | |
| static void | mcan_stop_clock (MCAN_Type *ptr) |
| Stop MCAN clock. More... | |
| static void | mcan_enable_clock (MCAN_Type *ptr) |
| Enable MCAN clock. More... | |
| static bool | mcan_is_clock_enabled (MCAN_Type *ptr) |
| static void | mcan_disable_bus_monitoring_mode (MCAN_Type *ptr) |
| Disable Bus monitoring Mode. More... | |
| static bool | mcan_is_clock_stopped (MCAN_Type *ptr) |
| Check whether CAN clock is stopped or not. More... | |
| static void | mcan_enable_restricted_operation_mode (MCAN_Type *ptr) |
| Enable Restricted Operation Mode. More... | |
| static void | mcan_disable_restricted_operation_mode (MCAN_Type *ptr) |
| Disable Restricted Operation Mode. More... | |
| static void | mcan_enable_write_to_prot_config_registers (MCAN_Type *ptr) |
| Enable Write Access to Protected Configuration Registers. More... | |
| static void | mcan_disable_write_to_prot_config_registers (MCAN_Type *ptr) |
| Disable Write Access to Protected Configuration Registers. More... | |
| static uint16_t | mcan_get_timestamp_counter_value (MCAN_Type *ptr) |
| Get Timestamp Counter Value. More... | |
| static void | mcan_enter_init_mode (MCAN_Type *ptr) |
| Switch MCAN to Initialization mode. More... | |
| static void | mcan_enter_normal_mode (MCAN_Type *ptr) |
| Switch MCAN to Normal mode. More... | |
| static uint16_t | mcan_get_timeout_counter_value (MCAN_Type *ptr) |
| Get Timeout value. More... | |
| static void | mcan_reset_timeout_counter_value (MCAN_Type *ptr) |
| Reset Timeout counter value. More... | |
| static void | mcan_get_error_counter (MCAN_Type *ptr, mcan_error_count_t *err_cnt) |
| Get Error Counter Information. More... | |
| static uint8_t | mcan_get_last_error_code (MCAN_Type *ptr) |
| Get Last Error Code. More... | |
| static uint8_t | mcan_get_last_data_error_code (MCAN_Type *ptr) |
| Get Last Data Phase Error Code. More... | |
| static uint8_t | mcan_get_activity (MCAN_Type *ptr) |
| Get CAN Activity. More... | |
| static bool | mcan_is_in_err_passive_state (MCAN_Type *ptr) |
| Check whether the CAN node is under error passive state. More... | |
| static bool | mcan_is_in_error_warning_state (MCAN_Type *ptr) |
| Check whether the CAN mode is under Warning State. More... | |
| static bool | mcan_is_in_busoff_state (MCAN_Type *ptr) |
| Check whether the CAN node is under Bus-off state. More... | |
| static uint8_t | mcan_get_data_phase_last_error_code (MCAN_Type *ptr) |
| Get the Last Data Phase Error. More... | |
| static bool | mcan_is_error_state_indicator_flag_set_in_last_received_canfd_msg (MCAN_Type *ptr) |
| Check Whether the Error Status Indicator Flag is set in the last received CANFD message. More... | |
| static bool | mcan_is_bitrate_switch_flag_set_in_last_received_canfd_msg (MCAN_Type *ptr) |
| Check whether the Bitrate Switch Flag is set in the last received CANFD message. More... | |
| static bool | mcan_is_canfd_message_received (MCAN_Type *ptr) |
| Check whether CANFD messages were received. More... | |
| static bool | mcan_is_protocol_exception_event_occurred (MCAN_Type *ptr) |
| Check whether Protocol Exception Events were occurred. More... | |
| static uint8_t | mcan_get_transmitter_delay_compensation_value (MCAN_Type *ptr) |
| Get the Transmitter Delay Compensation Value. More... | |
| static uint32_t | mcan_get_interrupt_flags (MCAN_Type *ptr) |
| Get Interrupt Flags. More... | |
| static void | mcan_clear_interrupt_flags (MCAN_Type *ptr, uint32_t mask) |
| Clear Interrupt Flags. More... | |
| static void | mcan_enable_interrupts (MCAN_Type *ptr, uint32_t mask) |
| Enable Interrupts. More... | |
| static void | mcan_enable_txbuf_interrupt (MCAN_Type *ptr, uint32_t mask) |
| Enable TXBUF Interrupt. More... | |
| static void | mcan_disable_txbuf_interrupt (MCAN_Type *ptr, uint32_t mask) |
| Disable TXBUF Interrupt. More... | |
| static void | mcan_disable_interrupts (MCAN_Type *ptr, uint32_t mask) |
| Disable Interrupts. More... | |
| static void | mcan_enable_txbuf_transmission_interrupt (MCAN_Type *ptr, uint32_t mask) |
| Enable TXBUF Transmission interrupt. More... | |
| static void | mcan_disable_txbuf_transmission_interrupt (MCAN_Type *ptr, uint32_t mask) |
| Disable TXBUF Transmission interrupt. More... | |
| static void | mcan_enable_txbuf_cancel_finish_interrupt (MCAN_Type *ptr, uint32_t mask) |
| Enable TXBUF Cancellation Finish interrupt. More... | |
| static void | mcan_disable_txbuf_cancel_finish_interrupt (MCAN_Type *ptr, uint32_t mask) |
| Disable TXBUF Cancellation Finish interrupt. More... | |
| static void | mcan_interrupt_line_select (MCAN_Type *ptr, uint32_t mask, uint8_t line_index) |
| Select Interrupt Line. More... | |
| static bool | mcan_is_transmit_request_pending (MCAN_Type *ptr, uint32_t index) |
| Check whether a TXFIFO/TXBUF transmission request is pending. More... | |
| static bool | mcan_is_txfifo_full (MCAN_Type *ptr) |
| Check whether TXFIFO is full. More... | |
| static uint32_t | mcan_get_txfifo_put_index (MCAN_Type *ptr) |
| Get the TXFIFO Put Index. More... | |
| static void | mcan_send_add_request (MCAN_Type *ptr, uint32_t index) |
| Request A Transmission via specified TXBUF Index. More... | |
| static void | mcan_send_add_multiple_requests (MCAN_Type *ptr, uint32_t index_bitmask) |
| Request several transmission via specified TXBUF/FIFO Bit masks MCAN IP will transmit data in the buffer if corresponding bit in index_bitmask is asserted. More... | |
| static void | mcan_cancel_tx_buf_send_request (MCAN_Type *ptr, uint32_t index) |
| Cancel the TXBUF Send request. More... | |
| static bool | mcan_is_transmit_occurred (MCAN_Type *ptr, uint32_t index) |
| Check whether the Transmission completed via specified TXBUF/TXFIFO. More... | |
| static bool | mcan_is_rxbuf_data_available (MCAN_Type *ptr, uint32_t index) |
| Check Whether there are data available in specified RXBUF. More... | |
| static void | mcan_clear_rxbuf_data_available_flag (MCAN_Type *ptr, uint32_t index) |
| Clear RXBUF Data available Flag for specified RXBUF. More... | |
| static bool | mcan_is_interrupt_flag_set (MCAN_Type *ptr, uint32_t mask) |
| Check whether specified Interrupt is set. More... | |
| static bool | mcan_is_tsu_timestamp_available (MCAN_Type *ptr, uint32_t index) |
| Check whether the TSU timestamp is available. More... | |
| uint32_t | mcan_read_32bit_tsu_timestamp (MCAN_Type *ptr, uint32_t index) |
| Read 32bit Timestamp value from TSU. More... | |
| uint64_t | mcan_read_64bit_tsu_timestamp (MCAN_Type *ptr, uint32_t index) |
| Read 64bit Timestamp value from TSU. More... | |
| void | mcan_get_high_priority_message_status (MCAN_Type *ptr, mcan_high_priority_message_status_t *status) |
| Get High Priority Message Status. More... | |
| void | mcan_get_default_config (MCAN_Type *ptr, mcan_config_t *config) |
| Get Default CAN configuration. More... | |
| uint8_t | mcan_get_message_size_from_dlc (uint8_t dlc) |
| Get message Size from Data Length Code. More... | |
| uint8_t | mcan_get_data_field_size (uint8_t data_field_size_option) |
| Get the Data field size from data field size option. More... | |
| void | mcan_get_default_ram_flexible_config (MCAN_Type *ptr, mcan_ram_flexible_config_t *ram_config, bool enable_canfd) |
| Get Default Full MCAN RAM configuration If the device is configured as classic CAN node, the default CAN RAM settings are as below: More... | |
| void | mcan_get_default_ram_config (MCAN_Type *ptr, mcan_ram_config_t *simple_config, bool enable_canfd) |
| Get Default MCAN RAM configuration If the device is configured as classic CAN node, the default CAN RAM settings are as below: More... | |
| hpm_stat_t | mcan_init (MCAN_Type *ptr, mcan_config_t *config, uint32_t src_clk_freq) |
| Initialize CAN controller. More... | |
| void | mcan_deinit (MCAN_Type *ptr) |
| De-Initialize CAN controller. More... | |
| hpm_stat_t | mcan_config_ram_with_flexible_config (MCAN_Type *ptr, mcan_ram_flexible_config_t *config) |
| Configure MCAN RAM will Full RAM configuration. More... | |
| hpm_stat_t | mcan_config_ram (MCAN_Type *ptr, mcan_ram_config_t *config) |
| Configure MCAN RAM will Simplified RAM configuration. More... | |
| hpm_stat_t | mcan_config_all_filters (MCAN_Type *ptr, mcan_all_filters_config_t *config) |
| Configure All CAN filters. More... | |
| hpm_stat_t | mcan_config_transmitter_delay_compensation (MCAN_Type *ptr, mcan_tdc_config_t *config) |
| Configure Transmitter Delay Compensation. More... | |
| hpm_stat_t | mcan_set_global_filter_config (MCAN_Type *ptr, mcan_global_filter_config_t *filter_config) |
| Configure Global Filter. More... | |
| hpm_stat_t | mcan_set_filter_element (MCAN_Type *ptr, const mcan_filter_elem_t *filter_elem, uint32_t index) |
| Set CAN filter element. More... | |
| hpm_stat_t | mcan_write_txbuf (MCAN_Type *ptr, uint32_t index, mcan_tx_frame_t *tx_frame) |
| Write Frame to CAN TX Buffer. More... | |
| hpm_stat_t | mcan_write_txfifo (MCAN_Type *ptr, mcan_tx_frame_t *tx_frame) |
| Write Frame CAN to TXFIFO. More... | |
| hpm_stat_t | mcan_read_rxbuf (MCAN_Type *ptr, uint32_t index, mcan_rx_message_t *rx_frame) |
| Read message from CAN RXBUF. More... | |
| hpm_stat_t | mcan_read_rxfifo (MCAN_Type *ptr, uint32_t fifo_index, mcan_rx_message_t *rx_frame) |
| Read message from CAN RXBUF. More... | |
| hpm_stat_t | mcan_read_tx_evt_fifo (MCAN_Type *ptr, mcan_tx_event_fifo_elem_t *tx_evt) |
| Read TX Event from CAN TX EVENT FIFO. More... | |
| hpm_stat_t | mcan_transmit_blocking (MCAN_Type *ptr, mcan_tx_frame_t *tx_frame) |
| Transmit CAN message in blocking way. More... | |
| hpm_stat_t | mcan_request_and_fill_txfifo (MCAN_Type *ptr, mcan_tx_frame_t *tx_frame, uint32_t *fifo_index) |
| Request TXFIFO and fill data into TXFIFO. More... | |
| hpm_stat_t | mcan_transmit_via_txfifo_nonblocking (MCAN_Type *ptr, mcan_tx_frame_t *tx_frame, uint32_t *fifo_index) |
| Transmit CAN message via TX FIFO in non-blocking way. More... | |
| hpm_stat_t | mcan_transmit_via_txbuf_nonblocking (MCAN_Type *ptr, uint32_t index, mcan_tx_frame_t *tx_frame) |
| Transmit CAN message via TX in non-blocking way. More... | |
| hpm_stat_t | mcan_receive_from_buf_blocking (MCAN_Type *ptr, uint32_t index, mcan_rx_message_t *rx_frame) |
| Receive CAN Frame from RXBUF in blocking way. More... | |
| hpm_stat_t | mcan_receive_from_fifo_blocking (MCAN_Type *ptr, uint32_t fifo_index, mcan_rx_message_t *rx_frame) |
| Receive CAN Frame from RXFIFO in blocking way. More... | |
| hpm_stat_t | mcan_get_timestamp_from_tx_event (MCAN_Type *ptr, const mcan_tx_event_fifo_elem_t *tx_evt, mcan_timestamp_value_t *timestamp) |
| Get Timestamp from MCAN TX Event. More... | |
| hpm_stat_t | mcan_get_timestamp_from_received_message (MCAN_Type *ptr, const mcan_rx_message_t *rx_msg, mcan_timestamp_value_t *timestamp) |
| Get Timestamp from MCAN RX frame. More... | |
| hpm_stat_t | mcan_parse_protocol_status (uint32_t psr, mcan_protocol_status_t *protocol_status) |
| Parse the Protocol Status register value. More... | |
| hpm_stat_t | mcan_get_protocol_status (MCAN_Type *ptr, mcan_protocol_status_t *protocol_status) |
| Get MCAN Protocol Status. More... | |