![]() |
Kinetis Bootloader
2.0.0
Common bootloader for Kinetis devices
|
FLEXCAN peripheral interface. More...
Collaboration diagram for FLEXCAN Peripheral:Data Structures | |
| struct | flexcan_state_t |
| Internal driver state information. More... | |
| struct | flexcan_data_info_t |
| FlexCAN data info from user. More... | |
| struct | flexcan_transfer_info_t |
| flexCAN global information structure. More... | |
Functions | |
| static bool | flexcan_poll_for_activity (const peripheral_descriptor_t *self) |
| flexCAN poll for activity function | |
| static status_t | flexcan_full_init (const peripheral_descriptor_t *self, serial_byte_receive_func_t function) |
| flexCAN init function | |
| static void | flexcan_full_shutdown (const peripheral_descriptor_t *self) |
| flexCAN shutdown function | |
| static void | flexcan_initial_data_sink (uint8_t sink_byte, uint32_t instance) |
| flexCAN receiving first byte data sink function | |
| static void | flexcan_data_sink (uint8_t sink_byte, uint32_t instance) |
| flexCAN receiving data sink function | |
| static void | flexcan_peripheral_init (uint32_t instance) |
| flexCAN internal init function | |
| static status_t | flexcan_write (const peripheral_descriptor_t *self, const uint8_t *buffer, uint32_t byteCount) |
| flexCAN sending data function | |
| static status_t | FLEXCAN_Send (uint8_t instance, uint32_t mb_idx, flexcan_data_info_t *tx_info, uint32_t msg_id, uint8_t *mb_data, uint32_t timeout_ms) |
| void | FLEXCAN_SoftReset (CAN_Type *baseAddr) |
| void | FLEXCAN_ExitFreezeMode (CAN_Type *baseAddr) |
| void | FLEXCAN_EnterFreezeMode (CAN_Type *baseAddr) |
| void | FLEXCAN_EnableOperationMode (CAN_Type *baseAddr, flexcan_operation_modes_t mode) |
| void | FLEXCAN_DisableOperationMode (CAN_Type *baseAddr, flexcan_operation_modes_t mode) |
| void | FLEXCAN_IRQBusoffHandler (uint8_t instance) |
| void | FLEXCAN_IRQErrorHandler (uint8_t instance) |
| void | FLEXCAN_IRQHandler (uint8_t instance) |
| void | FLEXCAN_CANIRQHandler (uint8_t instance) |
| void | CAN0_Oredbuf_IRQHandler (void) |
| void | CAN0_Bus_Off_IRQHandler (void) |
| void | CAN0_Error_IRQHandler (void) |
| void | CAN0_Wakeup_IRQHandler (void) |
| void | CAN0_IRQHandler (void) |
| void | CAN1_ORed_Message_buffer_IRQHandler (void) |
| void | CAN1_Bus_Off_IRQHandler (void) |
| void | CAN1_Error_IRQHandler (void) |
| void | CAN1_Wake_Up_IRQHandler (void) |
Variables | |
| const flexcan_timing_config_t | bit_rate_table_8Mhz [FLEXCAN_MAX_SPEED] |
| FlexCAN bit timing parameters calculated by using the method outlined in AN1798, section 4.1. More... | |
| const flexcan_timing_config_t | bit_rate_table [] |
| flexCAN timing table (20.9715Mhz)contains propseg, pseg1, pseg2, pre_divider, rjw More... | |
| const flexcan_timing_config_t | bit_rate_table_12Mhz [FLEXCAN_MAX_SPEED] |
| const flexcan_timing_config_t | bit_rate_table_6Mhz [FLEXCAN_MAX_SPEED] |
| const flexcan_timing_config_t | bit_rate_table_10Mhz [FLEXCAN_MAX_SPEED] |
| const peripheral_control_interface_t | g_flexcanControlInterface |
| flexCAN control interface information More... | |
| const peripheral_byte_inteface_t | g_flexcanByteInterface |
| flexCAN byte interface information More... | |
| flexcan_transfer_info_t | s_flexcanInfo |
| Global state for the FLEXCAN peripheral interface. | |
| static bool | s_flexcanIntialized [FSL_FEATURE_SOC_FLEXCAN_COUNT] = { false } |
| Flag for flexcan intialization state. | |
| static bool | s_flexcanActivity [FSL_FEATURE_SOC_FLEXCAN_COUNT] = { false } |
| static serial_byte_receive_func_t | s_flexcan_app_data_sink_callback |
| flexCAN receiving data call back function | |
| static const uint32_t | g_flexcanBaseAddr [] = CAN_BASE_ADDRS |
| const IRQn_Type | g_flexcanRxWarningIrqId [] = CAN_Rx_Warning_IRQS |
| const IRQn_Type | g_flexcanTxWarningIrqId [] = CAN_Tx_Warning_IRQS |
| const IRQn_Type | g_flexcanWakeUpIrqId [] = CAN_Wake_Up_IRQS |
| const IRQn_Type | g_flexcanErrorIrqId [] = CAN_Error_IRQS |
| const IRQn_Type | g_flexcanBusOffIrqId [] = CAN_Bus_Off_IRQS |
| const IRQn_Type | g_flexcanOredMessageBufferIrqId [] = CAN_ORed_Message_buffer_IRQS |
FLEXCAN peripheral interface.
| struct flexcan_state_t |
Internal driver state information.
Collaboration diagram for flexcan_state_t:| Data Fields | ||
|---|---|---|
| volatile uint32_t | rx_mb_idx |
Index of the message buffer for receiving |
| semaphore_t | rxIrqSync |
Used to wait for ISR to complete its RX business. |
| volatile uint32_t | tx_mb_idx |
Index of the message buffer for transmitting |
| semaphore_t | txIrqSync |
Used to wait for ISR to complete its TX business. |
| struct flexcan_data_info_t |
FlexCAN data info from user.
| Data Fields | ||
|---|---|---|
| uint32_t | data_length |
Length of Data in Bytes |
| flexcan_frame_format_t | msg_id_type |
Type of message ID (standard or extended) |
| struct flexcan_transfer_info_t |
flexCAN global information structure.
flexCAN common information structure
Collaboration diagram for flexcan_transfer_info_t:Data Fields | |
| flexcan_state_t | state |
| state | |
| flexcan_data_info_t | rx_info |
| tx info | |
| flexcan_data_info_t | tx_info |
| tx info | |
| int8_t | baudrate |
| baudrate (index) | |
| flexcan_operation_modes_t | mode |
| bool | baudrateDetect |
| auto baudrate detection | |
| uint16_t | txId |
| tx id | |
| uint16_t | rxId |
| rx id | |
| void(* | data_source )(uint8_t *source_byte) |
| void(* | data_sink )(uint8_t sink_byte, uint32_t instance) |
| uint32_t | rxId |
| rx id | |
| uint32_t | txId |
| tx id | |
| uint32_t | rx_mailbox_num |
| rx mb number | |
| uint32_t | tx_mailbox_num |
| tx mb number | |
| uint8_t | rx_buf [64] |
| rx buffer | |
| uint8_t | rx_buf_write_index |
| rx buffer write index | |
| uint8_t | rx_buf_read_index |
| rx buffer read index | |
FlexCAN operation modes.
| flexcan_timing_config_t bit_rate_table |
flexCAN timing table (20.9715Mhz)contains propseg, pseg1, pseg2, pre_divider, rjw
| const flexcan_timing_config_t bit_rate_table_10Mhz[FLEXCAN_MAX_SPEED] |
| const flexcan_timing_config_t bit_rate_table_12Mhz[FLEXCAN_MAX_SPEED] |
| const flexcan_timing_config_t bit_rate_table_6Mhz[FLEXCAN_MAX_SPEED] |
| const flexcan_timing_config_t bit_rate_table_8Mhz |
FlexCAN bit timing parameters calculated by using the method outlined in AN1798, section 4.1.
The table contains propseg, pseg1, pseg2, pre_divider, and rjw.
| const peripheral_byte_inteface_t g_flexcanByteInterface |
flexCAN byte interface information
Byte I/O interface for the FLEXCAN peripheral driver.
| const peripheral_control_interface_t g_flexcanControlInterface |
flexCAN control interface information
Control interface for the FLEXCAN peripheral driver.