TI中文支持网
TI专业的中文技术问题搜集分享网站

TDA4VM: 主域Main_CAN2/Main_CAN3/Main_CAN4无法正常通信

Part Number:TDA4VM

1、运行内核:MCU域MCU1_0

2、问题详述:

      2.1、主域Main_CAN2/Main_CAN3/Main_CAN4无法正常通信

      2.2、主域Main_CAN4配置失效“CAN_APP: Error in SciClient Interrupt Params Configuration!!! 6”

3、MCU域串口log:

注意:MCU域MCU_CAN0/MCU_CAN1,主域Main_CAN0/Main_CAN1能正常通信

4、CAN配置代码

void CanApp_BuildIntList(void)
{uint32 idx, flag, intNum;const Can_ConfigType *Can_ConfigPtr;CanApp_IsrType pIsrHandler = NULL;uint32 canMaxControllerCnt = 0U;uint32 canDevId, routIntNum = 0U;//20230419/** 1. Determine the number of Can Instances used* 2. Build valid Can Instances list* 3. Build isr and interrupt number for enabled Can Instances only*//* Do Can Init */
#if (STD_ON == CAN_VARIANT_PRE_COMPILE)Can_ConfigPtr = &CAN_INIT_CONFIG_PC;Can_Init((const Can_ConfigType *) NULL_PTR);
#if (CAN_INITIAL_PRINT_DISABLE_BEFORE_CAN_RESPONSE == STD_OFF)/*AppUtils_Printf(MSG_NORMAL, MSG_APP_NAME"Variant - Pre Compile being used !!!\n");*/
#endif
#elseCan_ConfigPtr = &CanConfigSet;Can_Init(Can_ConfigPtr);
#if (CAN_INITIAL_PRINT_DISABLE_BEFORE_CAN_RESPONSE == STD_OFF)AppUtils_Printf(MSG_NORMAL, MSG_APP_NAME"Variant - Post Build being used !!!\n");
#endif
#endif/* Enable SCI Client */Sciclient_init(NULL_PTR);canMaxControllerCnt = Can_ConfigPtr->CanMaxControllerCount;for (idx = 0U; idx < canMaxControllerCnt; idx++){CanApp_IntNumbers[idx] = 0U;CanApp_InstanceSrcId[idx] = 0U;CanApp_RoutIntNumbers[idx] = 0U;}for (idx = 0U; idx < canMaxControllerCnt; idx++){flag = 0U;if (CAN_CONTROLLER_INSTANCE_MCU_MCAN0 ==CanConfigSet_CanController_List_PC[idx]->CanControllerInst){intNum = APP_MCU_MCAN_0_INT0;pIsrHandler = Can_0_Int0ISR;canDevId = TISCI_DEV_MCU_MCAN0;//20230419flag = 1U;}if (CAN_CONTROLLER_INSTANCE_MCU_MCAN1 ==CanConfigSet_CanController_List_PC[idx]->CanControllerInst){intNum = APP_MCU_MCAN_1_INT0;pIsrHandler = Can_1_Int0ISR;canDevId = TISCI_DEV_MCU_MCAN1;//20230419flag = 1U;}//20230419if (CAN_CONTROLLER_INSTANCE_MCAN0 ==CanConfigSet_CanController_List_PC[idx]->CanControllerInst){intNum = APP_MCAN_0_INT0;pIsrHandler = Can_2_Int0ISR;routIntNum = INTRTR_CFG_MAIN_DOMAIN_MCAN_0_OUT_INT_NO +INTRTR_CFG_START_LEVEL_INT_NUMBER;canDevId = TISCI_DEV_MCAN0;flag = 1U;}//20230505 Add Main_MCAN1if (CAN_CONTROLLER_INSTANCE_MCAN1 ==CanConfigSet_CanController_List_PC[idx]->CanControllerInst){intNum = APP_MCAN_1_INT0;pIsrHandler = Can_3_Int0ISR;routIntNum = INTRTR_CFG_MAIN_DOMAIN_MCAN_1_OUT_INT_NO +INTRTR_CFG_START_LEVEL_INT_NUMBER;canDevId = TISCI_DEV_MCAN1;flag = 1U;}//20230508 Add Main_MCAN2if (CAN_CONTROLLER_INSTANCE_MCAN2 ==CanConfigSet_CanController_List_PC[idx]->CanControllerInst){intNum = APP_MCAN_2_INT0;pIsrHandler = Can_4_Int0ISR;routIntNum = INTRTR_CFG_MAIN_DOMAIN_MCAN_2_OUT_INT_NO +INTRTR_CFG_START_LEVEL_INT_NUMBER;canDevId = TISCI_DEV_MCAN2;flag = 1U;}//20230508 Add Main_MCAN3if (CAN_CONTROLLER_INSTANCE_MCAN3 ==CanConfigSet_CanController_List_PC[idx]->CanControllerInst){intNum = APP_MCAN_3_INT0;pIsrHandler = Can_5_Int0ISR;routIntNum = INTRTR_CFG_MAIN_DOMAIN_MCAN_3_OUT_INT_NO +INTRTR_CFG_START_LEVEL_INT_NUMBER;canDevId = TISCI_DEV_MCAN3;flag = 1U;}//20230508 Add Main_MCAN4if (CAN_CONTROLLER_INSTANCE_MCAN4 ==CanConfigSet_CanController_List_PC[idx]->CanControllerInst){intNum = APP_MCAN_4_INT0;pIsrHandler = Can_6_Int0ISR;routIntNum = INTRTR_CFG_MAIN_DOMAIN_MCAN_4_OUT_INT_NO +INTRTR_CFG_START_LEVEL_INT_NUMBER;canDevId = TISCI_DEV_MCAN4;flag = 1U;}if (0U != flag){CanApp_IntNumbers[idx] = intNum;CanApp_Isr[idx] = pIsrHandler;CanApp_InstanceSrcId[idx] = canDevId;//20230419CanApp_RoutIntNumbers[idx] = routIntNum;//20230419flag = 0U;}}return;
}

Cherry Zhou:

您好,您的问题我们需要升级到英文论坛看下,链接如下,有答复尽快给您。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1225421/tda4vm-main-domain-main_can2-main_can3-main_can4-cannot-communicate-properly

,

Victory:

@Cherry Zhou  SDK是0806,请尽快回复哈,谢谢

,

Cherry Zhou:

您好,

请问您使用的是TI的板子还是自制板?

是否已经在 EB tresos 工具生成了配置代码 CAN_Cfg.c 来满足示例代码中所做的更改? 

,

Victory:

1.使用的是自制板

2.已用EB tresos工具生成了CAN_Cfg.c

/********************************************************************************INCLUDES******************************************************************************/#include "Can.h"#include "Can_Cfg.h"/*Requirements : MCAL-2439, MCAL-2440, MCAL-2441 *//*Version checking*/#if ((CAN_SW_MAJOR_VERSION != (3U))||(CAN_SW_MINOR_VERSION != (0U)))#error "Version numbers of Can_Cfg.c and Can.h are inconsistent!"#endif/********************************************************************************GLOBAL DATA******************************************************************************/#define CAN_START_SEC_CONFIG_DATA#include "Can_MemMap.h"/* Baud Rate Structure for all configsets */CAN_CONFIG_DATA_SECTION_NON_CONST static Can_BaudConfigTypeCanConfigSet_CanController_0_CanControllerBaudrateConfig_0 ={500U,/* in Kbps */8U,/* Prop Segement value */7U,/* Phase Segment 1 */4U,/* Phase Segment 2 */2U, /* Sync jump width */19U,/* Sum of all timing parameters*/8U,/* Controller BRP value for Baud *//* Data phase Baudrate */{2000U,/* in Kbps */7U,/* Prop Segement value */7U,/* Phase Segment 1 */5U,/* Phase Segment 2 */2U,/* Sync jump width */19U,/* Sum of all timing parameters*/2U,/* Controller BRP value for Baud */180U, /* Specifies the Transceiver Delay Compensation Offset in ns */(boolean)TRUE, /* Specifies if the bit rate switching shall be used */}};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_BaudConfigTypeCanConfigSet_CanController_1_CanControllerBaudrateConfig_0 ={500U,/* in Kbps */8U,/* Prop Segement value */7U,/* Phase Segment 1 */4U,/* Phase Segment 2 */2U, /* Sync jump width */19U,/* Sum of all timing parameters*/8U,/* Controller BRP value for Baud *//* Data phase Baudrate */{2000U,/* in Kbps */7U,/* Prop Segement value */7U,/* Phase Segment 1 */5U,/* Phase Segment 2 */2U,/* Sync jump width */19U,/* Sum of all timing parameters*/2U,/* Controller BRP value for Baud */180U, /* Specifies the Transceiver Delay Compensation Offset in ns */(boolean)TRUE, /* Specifies if the bit rate switching shall be used */}};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_BaudConfigTypeCanConfigSet_CanController_2_CanControllerBaudrateConfig_0 ={500U,/* in Kbps */8U,/* Prop Segement value */7U,/* Phase Segment 1 */4U,/* Phase Segment 2 */2U, /* Sync jump width */19U,/* Sum of all timing parameters*/8U,/* Controller BRP value for Baud *//* Data phase Baudrate */{2000U,/* in Kbps */7U,/* Prop Segement value */7U,/* Phase Segment 1 */5U,/* Phase Segment 2 */2U,/* Sync jump width */19U,/* Sum of all timing parameters*/2U,/* Controller BRP value for Baud */180U, /* Specifies the Transceiver Delay Compensation Offset in ns */(boolean)TRUE, /* Specifies if the bit rate switching shall be used */}};//20230505 Add Main_MCAN1CAN_CONFIG_DATA_SECTION_NON_CONST static Can_BaudConfigTypeCanConfigSet_CanController_3_CanControllerBaudrateConfig_0 ={500U,/* in Kbps */8U,/* Prop Segement value */7U,/* Phase Segment 1 */4U,/* Phase Segment 2 */2U, /* Sync jump width */19U,/* Sum of all timing parameters*/8U,/* Controller BRP value for Baud *//* Data phase Baudrate */{2000U,/* in Kbps */7U,/* Prop Segement value */7U,/* Phase Segment 1 */5U,/* Phase Segment 2 */2U,/* Sync jump width */19U,/* Sum of all timing parameters*/2U,/* Controller BRP value for Baud */180U, /* Specifies the Transceiver Delay Compensation Offset in ns */(boolean)TRUE, /* Specifies if the bit rate switching shall be used */}};//20230508 Add Main_MCAN2CAN_CONFIG_DATA_SECTION_NON_CONST static Can_BaudConfigTypeCanConfigSet_CanController_4_CanControllerBaudrateConfig_0 ={500U,/* in Kbps */8U,/* Prop Segement value */7U,/* Phase Segment 1 */4U,/* Phase Segment 2 */2U, /* Sync jump width */19U,/* Sum of all timing parameters*/8U,/* Controller BRP value for Baud *//* Data phase Baudrate */{2000U,/* in Kbps */7U,/* Prop Segement value */7U,/* Phase Segment 1 */5U,/* Phase Segment 2 */2U,/* Sync jump width */19U,/* Sum of all timing parameters*/2U,/* Controller BRP value for Baud */180U, /* Specifies the Transceiver Delay Compensation Offset in ns */(boolean)TRUE, /* Specifies if the bit rate switching shall be used */}};//20230508 Add Main_MCAN3CAN_CONFIG_DATA_SECTION_NON_CONST static Can_BaudConfigTypeCanConfigSet_CanController_5_CanControllerBaudrateConfig_0 ={500U,/* in Kbps */8U,/* Prop Segement value */7U,/* Phase Segment 1 */4U,/* Phase Segment 2 */2U, /* Sync jump width */19U,/* Sum of all timing parameters*/8U,/* Controller BRP value for Baud *//* Data phase Baudrate */{2000U,/* in Kbps */7U,/* Prop Segement value */7U,/* Phase Segment 1 */5U,/* Phase Segment 2 */2U,/* Sync jump width */19U,/* Sum of all timing parameters*/2U,/* Controller BRP value for Baud */180U, /* Specifies the Transceiver Delay Compensation Offset in ns */(boolean)TRUE, /* Specifies if the bit rate switching shall be used */}};//20230508 Add Main_MCAN4CAN_CONFIG_DATA_SECTION_NON_CONST static Can_BaudConfigTypeCanConfigSet_CanController_6_CanControllerBaudrateConfig_0 ={500U,/* in Kbps */8U,/* Prop Segement value */7U,/* Phase Segment 1 */4U,/* Phase Segment 2 */2U, /* Sync jump width */19U,/* Sum of all timing parameters*/8U,/* Controller BRP value for Baud *//* Data phase Baudrate */{2000U,/* in Kbps */7U,/* Prop Segement value */7U,/* Phase Segment 1 */5U,/* Phase Segment 2 */2U,/* Sync jump width */19U,/* Sum of all timing parameters*/2U,/* Controller BRP value for Baud */180U, /* Specifies the Transceiver Delay Compensation Offset in ns */(boolean)TRUE, /* Specifies if the bit rate switching shall be used */}};/*List of the Baudrate structures */CAN_CONFIG_DATA_SECTION_NON_CONST static Can_BaudConfigType*CanConfigSet_CanController_0_BaudRateConfigList[]={&CanConfigSet_CanController_0_CanControllerBaudrateConfig_0,};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_BaudConfigType*CanConfigSet_CanController_1_BaudRateConfigList[]={&CanConfigSet_CanController_1_CanControllerBaudrateConfig_0,};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_BaudConfigType*CanConfigSet_CanController_2_BaudRateConfigList[]={&CanConfigSet_CanController_2_CanControllerBaudrateConfig_0,};//20230505 Add Main_MCAN1CAN_CONFIG_DATA_SECTION_NON_CONST static Can_BaudConfigType*CanConfigSet_CanController_3_BaudRateConfigList[]={&CanConfigSet_CanController_3_CanControllerBaudrateConfig_0,};//20230508 Add Main_MCAN2CAN_CONFIG_DATA_SECTION_NON_CONST static Can_BaudConfigType*CanConfigSet_CanController_4_BaudRateConfigList[]={&CanConfigSet_CanController_4_CanControllerBaudrateConfig_0,};//20230508 Add Main_MCAN3CAN_CONFIG_DATA_SECTION_NON_CONST static Can_BaudConfigType*CanConfigSet_CanController_5_BaudRateConfigList[]={&CanConfigSet_CanController_5_CanControllerBaudrateConfig_0,};//20230508 Add Main_MCAN4CAN_CONFIG_DATA_SECTION_NON_CONST static Can_BaudConfigType*CanConfigSet_CanController_6_BaudRateConfigList[]={&CanConfigSet_CanController_6_CanControllerBaudrateConfig_0,};/* Controller structure defined here for all config sets */CAN_CONFIG_DATA_SECTION_NON_CONST static Can_ControllerTypeCanConfigSet_CanController_0 ={&CanConfigSet_CanController_0_CanControllerBaudrateConfig_0,/* pointer to default Baud structure */CanConfigSet_CanController_0_BaudRateConfigList,/* List of available Baudrate structs */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_ControllerTypeCanConfigSet_CanController_1 ={&CanConfigSet_CanController_1_CanControllerBaudrateConfig_0,/* pointer to default Baud structure */CanConfigSet_CanController_1_BaudRateConfigList,/* List of available Baudrate structs */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_ControllerTypeCanConfigSet_CanController_2 ={&CanConfigSet_CanController_2_CanControllerBaudrateConfig_0,/* pointer to default Baud structure */CanConfigSet_CanController_2_BaudRateConfigList,/* List of available Baudrate structs */};//20230505 Add Main_MCAN1CAN_CONFIG_DATA_SECTION_NON_CONST static Can_ControllerTypeCanConfigSet_CanController_3 ={&CanConfigSet_CanController_3_CanControllerBaudrateConfig_0,/* pointer to default Baud structure */CanConfigSet_CanController_3_BaudRateConfigList,/* List of available Baudrate structs */};//20230508 Add Main_MCAN2CAN_CONFIG_DATA_SECTION_NON_CONST static Can_ControllerTypeCanConfigSet_CanController_4 ={&CanConfigSet_CanController_4_CanControllerBaudrateConfig_0,/* pointer to default Baud structure */CanConfigSet_CanController_4_BaudRateConfigList,/* List of available Baudrate structs */};//20230508 Add Main_MCAN3CAN_CONFIG_DATA_SECTION_NON_CONST static Can_ControllerTypeCanConfigSet_CanController_5 ={&CanConfigSet_CanController_5_CanControllerBaudrateConfig_0,/* pointer to default Baud structure */CanConfigSet_CanController_5_BaudRateConfigList,/* List of available Baudrate structs */};//20230508 Add Main_MCAN4CAN_CONFIG_DATA_SECTION_NON_CONST static Can_ControllerTypeCanConfigSet_CanController_6 ={&CanConfigSet_CanController_6_CanControllerBaudrateConfig_0,/* pointer to default Baud structure */CanConfigSet_CanController_6_BaudRateConfigList,/* List of available Baudrate structs */};/* Controller structure defined here for all config sets */CAN_CONFIG_DATA_SECTION_CONST const struct Can_ControllerStruct_PCCanConfigSet_PC_CanController_0 ={CanConf_CanController_CanController_0,/* Id as provided by GUI */(boolean)TRUE,/* Contoller is used=1 or not_used=0*/0x40500000U, /* Can Controller Base Address */CAN_TX_RX_PROCESSING_INTERRUPT,/* Can Rx Processing Type */CAN_TX_RX_PROCESSING_INTERRUPT,/* Can Tx Processing Type */(boolean)TRUE,/* BusOffTRUE = Interrupt FALSE = Polling */CAN_CONTROLLER_INSTANCE_MCU_MCAN0,/* Controller Instance */(boolean)TRUE,/* CAN FD Mode Enable */};CAN_CONFIG_DATA_SECTION_CONST const struct Can_ControllerStruct_PCCanConfigSet_PC_CanController_1 ={CanConf_CanController_CanController_1,/* Id as provided by GUI */(boolean)TRUE,/* Contoller is used=1 or not_used=0*/0x40540000U, /* Can Controller Base Address */CAN_TX_RX_PROCESSING_INTERRUPT,/* Can Rx Processing Type */CAN_TX_RX_PROCESSING_INTERRUPT,/* Can Tx Processing Type */(boolean)TRUE,/* BusOffTRUE = Interrupt FALSE = Polling */CAN_CONTROLLER_INSTANCE_MCU_MCAN1,/* Controller Instance */(boolean)TRUE,/* CAN FD Mode Enable */};CAN_CONFIG_DATA_SECTION_CONST const struct Can_ControllerStruct_PCCanConfigSet_PC_CanController_2 ={CanConf_CanController_CanController_2,/* Id as provided by GUI */(boolean)TRUE,/* Contoller is used=1 or not_used=0*/0x2708000U, /* Can Controller Base Address */CAN_TX_RX_PROCESSING_INTERRUPT,/* Can Rx Processing Type */CAN_TX_RX_PROCESSING_INTERRUPT,/* Can Tx Processing Type */(boolean)TRUE,/* BusOffTRUE = Interrupt FALSE = Polling */CAN_CONTROLLER_INSTANCE_MCAN0,/* Controller Instance */(boolean)TRUE,/* CAN FD Mode Enable */};//20230505 Add Main_MCAN1CAN_CONFIG_DATA_SECTION_CONST const struct Can_ControllerStruct_PCCanConfigSet_PC_CanController_3 ={CanConf_CanController_CanController_3,/* Id as provided by GUI */(boolean)TRUE,/* Contoller is used=1 or not_used=0*/0x2718000U, /* Can Controller Base Address */CAN_TX_RX_PROCESSING_INTERRUPT,/* Can Rx Processing Type */CAN_TX_RX_PROCESSING_INTERRUPT,/* Can Tx Processing Type */(boolean)TRUE,/* BusOffTRUE = Interrupt FALSE = Polling */CAN_CONTROLLER_INSTANCE_MCAN1,/* Controller Instance */(boolean)TRUE,/* CAN FD Mode Enable */};//20230508 Add Main_MCAN2CAN_CONFIG_DATA_SECTION_CONST const struct Can_ControllerStruct_PCCanConfigSet_PC_CanController_4 ={CanConf_CanController_CanController_4,/* Id as provided by GUI */(boolean)TRUE,/* Contoller is used=1 or not_used=0*/0x2728000U, /* Can Controller Base Address */CAN_TX_RX_PROCESSING_INTERRUPT,/* Can Rx Processing Type */CAN_TX_RX_PROCESSING_INTERRUPT,/* Can Tx Processing Type */(boolean)TRUE,/* BusOffTRUE = Interrupt FALSE = Polling */CAN_CONTROLLER_INSTANCE_MCAN2,/* Controller Instance */(boolean)TRUE,/* CAN FD Mode Enable */};//20230508 Add Main_MCAN3CAN_CONFIG_DATA_SECTION_CONST const struct Can_ControllerStruct_PCCanConfigSet_PC_CanController_5 ={CanConf_CanController_CanController_5,/* Id as provided by GUI */(boolean)TRUE,/* Contoller is used=1 or not_used=0*/0x2738000U, /* Can Controller Base Address */CAN_TX_RX_PROCESSING_INTERRUPT,/* Can Rx Processing Type */CAN_TX_RX_PROCESSING_INTERRUPT,/* Can Tx Processing Type */(boolean)TRUE,/* BusOffTRUE = Interrupt FALSE = Polling */CAN_CONTROLLER_INSTANCE_MCAN3,/* Controller Instance */(boolean)TRUE,/* CAN FD Mode Enable */};//20230508 Add Main_MCAN4CAN_CONFIG_DATA_SECTION_CONST const struct Can_ControllerStruct_PCCanConfigSet_PC_CanController_6 ={CanConf_CanController_CanController_6,/* Id as provided by GUI */(boolean)TRUE,/* Contoller is used=1 or not_used=0*/0x2748000U, /* Can Controller Base Address */CAN_TX_RX_PROCESSING_INTERRUPT,/* Can Rx Processing Type */CAN_TX_RX_PROCESSING_INTERRUPT,/* Can Tx Processing Type */(boolean)TRUE,/* BusOffTRUE = Interrupt FALSE = Polling */CAN_CONTROLLER_INSTANCE_MCAN4,/* Controller Instance */(boolean)TRUE,/* CAN FD Mode Enable */};/*List of the Controller structures */CAN_CONFIG_DATA_SECTION_NON_CONST static Can_ControllerType*CanConfigSet_CanController_List[]={&CanConfigSet_CanController_0,&CanConfigSet_CanController_1,&CanConfigSet_CanController_2,&CanConfigSet_CanController_3,/*20230505 Add Main_MCAN1*/&CanConfigSet_CanController_4,&CanConfigSet_CanController_5,&CanConfigSet_CanController_6,};CAN_CONFIG_DATA_SECTION_CONST const struct Can_ControllerStruct_PC*CanConfigSet_CanController_List_PC[CAN_NUM_CONTROLLER]={&CanConfigSet_PC_CanController_0,&CanConfigSet_PC_CanController_1,&CanConfigSet_PC_CanController_2,&CanConfigSet_PC_CanController_3,/*20230505 Add Main_MCAN1*/&CanConfigSet_PC_CanController_4,&CanConfigSet_PC_CanController_5,&CanConfigSet_PC_CanController_6,};/* HW Filter structure for all configsets */CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_3_CanHwFilter_0 ={0x776,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};/* HW Filter structure for all configsets */CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_3_CanHwFilter_1 ={0x760,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};/* HW Filter structure for all configsets */CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_3_CanHwFilter_2 ={0x27F,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_4_CanHwFilter_0 ={0x4A,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_4_CanHwFilter_1 ={0x370,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_5_CanHwFilter_0 ={0x1EE,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_5_CanHwFilter_1 ={0x26F,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_6_CanHwFilter_0 ={0x1ED,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_6_CanHwFilter_1 ={0x319,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_8_CanHwFilter_0 ={0x29F,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_10_CanHwFilter_0 ={0x110,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_10_CanHwFilter_1 ={0x121,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_11_CanHwFilter_0 ={0x210,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_11_CanHwFilter_1 ={0x221,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};//MAIN_CAN2 Receive msgCAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_13_CanHwFilter_0 ={0x310,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_13_CanHwFilter_1 ={0x321,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};//MAIN_CAN3 Receive msgCAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_15_CanHwFilter_0 ={0x410,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_15_CanHwFilter_1 ={0x421,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};//MAIN_CAN4 Receive msgCAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_17_CanHwFilter_0 ={0x510,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterTypeCanConfigSet_CanHardwareObject_17_CanHwFilter_1 ={0x521,/*CanHwFilterCode*/0xFFFFFFFF,/*Filter Mask*/};/*List of the HW Filter structures */CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterType*CanConfigSet_CanHardwareObject_3_HwFilterConfigList[]={&CanConfigSet_CanHardwareObject_3_CanHwFilter_0,&CanConfigSet_CanHardwareObject_3_CanHwFilter_1,&CanConfigSet_CanHardwareObject_3_CanHwFilter_2,};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterType*CanConfigSet_CanHardwareObject_4_HwFilterConfigList[]={&CanConfigSet_CanHardwareObject_4_CanHwFilter_0,&CanConfigSet_CanHardwareObject_4_CanHwFilter_1,};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterType*CanConfigSet_CanHardwareObject_5_HwFilterConfigList[]={&CanConfigSet_CanHardwareObject_5_CanHwFilter_0,&CanConfigSet_CanHardwareObject_5_CanHwFilter_1,};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterType*CanConfigSet_CanHardwareObject_6_HwFilterConfigList[]={&CanConfigSet_CanHardwareObject_6_CanHwFilter_0,&CanConfigSet_CanHardwareObject_6_CanHwFilter_1,};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterType*CanConfigSet_CanHardwareObject_8_HwFilterConfigList[]={&CanConfigSet_CanHardwareObject_8_CanHwFilter_0,};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterType*CanConfigSet_CanHardwareObject_10_HwFilterConfigList[]={&CanConfigSet_CanHardwareObject_10_CanHwFilter_0,&CanConfigSet_CanHardwareObject_10_CanHwFilter_1,};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterType*CanConfigSet_CanHardwareObject_11_HwFilterConfigList[]={&CanConfigSet_CanHardwareObject_11_CanHwFilter_0,&CanConfigSet_CanHardwareObject_11_CanHwFilter_1,};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterType*CanConfigSet_CanHardwareObject_13_HwFilterConfigList[]={&CanConfigSet_CanHardwareObject_13_CanHwFilter_0,&CanConfigSet_CanHardwareObject_13_CanHwFilter_1,};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterType*CanConfigSet_CanHardwareObject_15_HwFilterConfigList[]={&CanConfigSet_CanHardwareObject_15_CanHwFilter_0,&CanConfigSet_CanHardwareObject_15_CanHwFilter_1,};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_HwFilterType*CanConfigSet_CanHardwareObject_17_HwFilterConfigList[]={&CanConfigSet_CanHardwareObject_17_CanHwFilter_0,&CanConfigSet_CanHardwareObject_17_CanHwFilter_1,};/* All the Mailbox objects(MB's) will be defined here for all config sets */CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_0 ={1U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/0U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_TX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_0,/* Controller */NULL_PTR,/* List of HW Filter structs */0U,/* Hw Filter Count */204U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_1 ={1U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/1U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_TX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_0,/* Controller */NULL_PTR,/* List of HW Filter structs */0U,/* Hw Filter Count */204U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_2 ={1U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/0U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_TX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_1,/* Controller */NULL_PTR,/* List of HW Filter structs */0U,/* Hw Filter Count */204U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_3 ={0U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/0U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_RX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_0,/* Controller */CanConfigSet_CanHardwareObject_3_HwFilterConfigList,/* List of HW Filter structs */3U, /* Hw Filter Count */0U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_4 ={0U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/1U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_RX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_0,/* Controller */CanConfigSet_CanHardwareObject_4_HwFilterConfigList,/* List of HW Filter structs */2U, /* Hw Filter Count */0U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_5 ={0U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/2U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_RX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_0,/* Controller */CanConfigSet_CanHardwareObject_5_HwFilterConfigList,/* List of HW Filter structs */2U, /* Hw Filter Count */0U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_6 ={0U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/3U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_RX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_0,/* Controller */CanConfigSet_CanHardwareObject_6_HwFilterConfigList,/* List of HW Filter structs */2U, /* Hw Filter Count */0U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_7 ={1U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/0U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_TX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_2,/* Controller */NULL_PTR,/* List of HW Filter structs */0U,/* Hw Filter Count */204U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_8 ={0U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/4U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_RX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_0,/* Controller */CanConfigSet_CanHardwareObject_8_HwFilterConfigList,/* List of HW Filter structs */1U, /* Hw Filter Count */0U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_9 ={1U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/0U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_TX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_3,/* Controller */NULL_PTR,/* List of HW Filter structs */0U,/* Hw Filter Count */204U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_10 ={0U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/0U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_RX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_2,/* Controller */CanConfigSet_CanHardwareObject_10_HwFilterConfigList,/* List of HW Filter structs */2U, /* Hw Filter Count */0U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_11 ={0U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/0U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_RX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_3,/* Controller */CanConfigSet_CanHardwareObject_11_HwFilterConfigList,/* List of HW Filter structs */2U, /* Hw Filter Count */0U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_12 ={1U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/0U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_TX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_4,/* Controller */NULL_PTR,/* List of HW Filter structs */0U,/* Hw Filter Count */204U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_13 ={0U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/0U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_RX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_4,/* Controller */CanConfigSet_CanHardwareObject_13_HwFilterConfigList,/* List of HW Filter structs */2U, /* Hw Filter Count */0U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_14 ={1U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/0U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_TX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_5,/* Controller */NULL_PTR,/* List of HW Filter structs */0U,/* Hw Filter Count */204U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_15 ={0U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/0U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_RX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_5,/* Controller */CanConfigSet_CanHardwareObject_15_HwFilterConfigList,/* List of HW Filter structs */2U, /* Hw Filter Count */0U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_16 ={1U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/0U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_TX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_6,/* Controller */NULL_PTR,/* List of HW Filter structs */0U,/* Hw Filter Count */204U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxTypeCanConfigSet_CanHardwareObject_17 ={0U,/*CanHandleType 0=Full, 1=Basic */0U,/* CanIdType 0=standard 1=Extended 2=Mixed*/0U,/* HwHandle i.e Mailbox - Hw object in the controller */1U,/* Length of the Mailbox */CAN_MAILBOX_DIRECTION_RX,/* CanObjectType - Direction of Mailbox*/&CanConfigSet_PC_CanController_6,/* Controller */CanConfigSet_CanHardwareObject_17_HwFilterConfigList,/* List of HW Filter structs */2U, /* Hw Filter Count */0U,/* Padding value for CAN FD message */(boolean)FALSE,/* CanHardwareObjectUsesPolling */};/* All the Mailbox objects(MB's) will be defined here for all config sets */CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_0 ={CanConf_CanHardwareObject_CanHardwareObject_0,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_1 ={CanConf_CanHardwareObject_CanHardwareObject_1,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_2 ={CanConf_CanHardwareObject_CanHardwareObject_2,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_3 ={CanConf_CanHardwareObject_CanHardwareObject_3,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_4 ={CanConf_CanHardwareObject_CanHardwareObject_4,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_5 ={CanConf_CanHardwareObject_CanHardwareObject_5,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_6 ={CanConf_CanHardwareObject_CanHardwareObject_6,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_7 ={CanConf_CanHardwareObject_CanHardwareObject_7,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_8 ={CanConf_CanHardwareObject_CanHardwareObject_8,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_9 ={CanConf_CanHardwareObject_CanHardwareObject_9,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_10 ={CanConf_CanHardwareObject_CanHardwareObject_10,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_11 ={CanConf_CanHardwareObject_CanHardwareObject_11,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_12 ={CanConf_CanHardwareObject_CanHardwareObject_12,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_13 ={CanConf_CanHardwareObject_CanHardwareObject_13,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_14 ={CanConf_CanHardwareObject_CanHardwareObject_14,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_15 ={CanConf_CanHardwareObject_CanHardwareObject_15,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_16 ={CanConf_CanHardwareObject_CanHardwareObject_16,/* CanObjectId - Holds handle Id */};CAN_CONFIG_DATA_SECTION_CONST static const struct Can_MailboxStruct_PCCanConfigSet_PC_CanHardwareObject_17 ={CanConf_CanHardwareObject_CanHardwareObject_17,/* CanObjectId - Holds handle Id */};/* List of the Mailboxes */CAN_CONFIG_DATA_SECTION_NON_CONST static Can_MailboxType*CanConfigSet_CanHardwareObject_List[] ={&CanConfigSet_CanHardwareObject_0,&CanConfigSet_CanHardwareObject_1,&CanConfigSet_CanHardwareObject_2,&CanConfigSet_CanHardwareObject_3,&CanConfigSet_CanHardwareObject_4,&CanConfigSet_CanHardwareObject_5,&CanConfigSet_CanHardwareObject_6,&CanConfigSet_CanHardwareObject_7,&CanConfigSet_CanHardwareObject_8,&CanConfigSet_CanHardwareObject_9,&CanConfigSet_CanHardwareObject_10,&CanConfigSet_CanHardwareObject_11,&CanConfigSet_CanHardwareObject_12,&CanConfigSet_CanHardwareObject_13,&CanConfigSet_CanHardwareObject_13,&CanConfigSet_CanHardwareObject_14,&CanConfigSet_CanHardwareObject_15,&CanConfigSet_CanHardwareObject_16,&CanConfigSet_CanHardwareObject_17,};/* List of the Mailboxes */CAN_CONFIG_DATA_SECTION_CONST const struct Can_MailboxStruct_PC*CanConfigSet_CanHardwareObject_List_PC[CAN_NUM_MAILBOXES] ={&CanConfigSet_PC_CanHardwareObject_0,&CanConfigSet_PC_CanHardwareObject_1,&CanConfigSet_PC_CanHardwareObject_2,&CanConfigSet_PC_CanHardwareObject_3,&CanConfigSet_PC_CanHardwareObject_4,&CanConfigSet_PC_CanHardwareObject_5,&CanConfigSet_PC_CanHardwareObject_6,&CanConfigSet_PC_CanHardwareObject_7,&CanConfigSet_PC_CanHardwareObject_8,&CanConfigSet_PC_CanHardwareObject_9,&CanConfigSet_PC_CanHardwareObject_10,&CanConfigSet_PC_CanHardwareObject_11,&CanConfigSet_PC_CanHardwareObject_12,&CanConfigSet_PC_CanHardwareObject_13,&CanConfigSet_PC_CanHardwareObject_14,&CanConfigSet_PC_CanHardwareObject_15,&CanConfigSet_PC_CanHardwareObject_16,&CanConfigSet_PC_CanHardwareObject_17,};/*Can Config struct */CAN_CONFIG_DATA_SECTION_CONST const struct Can_ConfigType_s CanConfigSet ={CanConfigSet_CanController_List, /* Controller List Pointer */(CAN_NUM_CONTROLLER),/* max Controllers */CanConfigSet_CanHardwareObject_List, /* Mailbox List Pointer */(CAN_NUM_MAILBOXES),/* total number of mail boxes in this configset */.MaxBaudConfigID ={[0] = 0U,[1] = 0U,[2] = 0U,[3] = 0U,[4] = 0U,[5] = 0U,[6] = 0U,}, /* Baud rate structure id */NULL_PTR,/* Reserved Param used for future use */};CAN_VAR_CONST_32_SECTION extern CONST(uint32, CAN_CONST)Can_MsgmemRAMBaseAddr[CAN_MAX_CONTROLLER] ={0x40500000U, /* MCU MCAN0 */0x40540000U, /* MCU MCAN1 */0x2708000U, /* Main MCAN0 */0x2718000U, /* Main MCAN1 */0x2728000U, /* Main MCAN2 */0x2738000U, /* Main MCAN3 */0x2748000U, /* Main MCAN4 */0x2758000U, /* Main MCAN5 */0x2768000U, /* Main MCAN6 */0x2778000U, /* Main MCAN7 */0x2788000U, /* Main MCAN8 */0x2798000U, /* Main MCAN9 */0x27a8000U, /* Main MCAN10 */0x27b8000U, /* Main MCAN11 */0x27c8000U, /* Main MCAN12 */0x27d8000U, /* Main MCAN13 */};CAN_VAR_CONST_32_SECTION extern CONST(uint32, CAN_CONST)Can_MCANSSBaseAddr[CAN_MAX_CONTROLLER] ={0x40520000U, /* MCU_MCAN0_SS */0x40560000U, /* MCU_MCAN1_SS*/0x2700000U, /* MCAN0_SS */0x2710000U, /* MCAN1_SS*/0x2720000U, /* MCAN2_SS */0x2730000U, /* MCAN3_SS */0x2740000U, /* MCAN4_SS */0x2750000U, /* MCAN5_SS */0x2760000U, /* MCAN6_SS */0x2770000U, /* MCAN7_SS */0x2780000U, /* MCAN8_SS*/0x2790000U, /* MCAN9_SS*/0x27a0000U, /* MCAN10_SS */0x27b0000U, /* MCAN11_SS */0x27c0000U, /* MCAN12_SS*/0x27d0000U, /* MCAN13_SS */};CAN_VAR_CONST_32_SECTION extern CONST(uint32, CAN_CONST)Can_MCANCoreRegBaseAddr[CAN_MAX_CONTROLLER] ={0x40528000U, /* MCU_MCAN0_CFG */0x40568000U, /* MCU_MCAN1_CFG*/0x2701000U, /* MCAN0_CFG */0x2711000U, /* MCAN1_CFG*/0x2721000U, /* MCAN2_CFG */0x2731000U, /* MCAN3_CFG */0x2741000U, /* MCAN4_CFG */0x2751000U, /* MCAN5_CFG */0x2761000U, /* MCAN6_CFG */0x2771000U, /* MCAN7_CFG */0x2781000U, /* MCAN8_CFG*/0x2791000U, /* MCAN9_CFG*/0x27a1000U, /* MCAN10_CFG */0x27b1000U, /* MCAN11_CFG */0x27c1000U, /* MCAN12_CFG*/0x27d1000U, /* MCAN13_CFG */};CAN_VAR_CONST_32_SECTION extern CONST(uint32, CAN_CONST)Can_MCANECCAggrRegBaseAddr[CAN_MAX_CONTROLLER] ={0x40700000U, /* MCU_MCAN0_ECC_AGGR */0x40701000U, /* MCU_MCAN1_ECC_AGGR*/0x2A78000U, /* MCAN0_ECC_AGGR */0x2A79000U, /* MCAN1_ECC_AGGR */0x2A7A000U, /* MCAN2_ECC_AGGR*/0x2A7B000U, /* MCAN3_ECC_AGGR */0x2A7C000U, /* MCAN4_ECC_AGGR */0x2A7D000U, /* MCAN5_ECC_AGGR */0x2A7E000U, /* MCAN6_ECC_AGGR */0x2A7F000U, /* MCAN7_ECC_AGGR */0x2A40000U, /* MCAN8_ECC_AGGR */0x2A41000U, /* MCAN9_ECC_AGGR*/0x2A42000U, /* MCAN10_ECC_AGGR*/0x2A43000U, /* MCAN11_ECC_AGGR */0x2A44000U, /* MCAN12_ECC_AGGR */0x2A45000U, /* MCAN13_ECC_AGGR*/};#defineCAN_STOP_SEC_CONFIG_DATA#include "Can_MemMap.h"/* ========================================================================== *//*Function Definitions*//* ========================================================================== */#define CAN_START_SEC_ISR_CODE#include "Can_MemMap.h"/** \brief MCU_MCAN0 Controller Instance ISR */FUNC(void, CAN_CODE) Can_0_Int0ISR(void){Can_IntISR_Function(CAN_CONTROLLER_INSTANCE_MCU_MCAN0, 0x40500000U);}/** \brief MCU_MCAN1 Controller Instance ISR */FUNC(void, CAN_CODE) Can_1_Int0ISR(void){Can_IntISR_Function(CAN_CONTROLLER_INSTANCE_MCU_MCAN1, 0x40540000U);}/** \brief MCAN0 Controller Instance ISR */FUNC(void, CAN_CODE) Can_2_Int0ISR(void){Can_IntISR_Function(CAN_CONTROLLER_INSTANCE_MCAN0, 0x2708000U);}/** \brief MCAN1 Controller Instance ISR */FUNC(void, CAN_CODE) Can_3_Int0ISR(void){Can_IntISR_Function(CAN_CONTROLLER_INSTANCE_MCAN1, 0x2718000U);}/** \brief MCAN2 Controller Instance ISR */FUNC(void, CAN_CODE) Can_4_Int0ISR(void){Can_IntISR_Function(CAN_CONTROLLER_INSTANCE_MCAN2, 0x2728000U);}/** \brief MCAN3 Controller Instance ISR */FUNC(void, CAN_CODE) Can_5_Int0ISR(void){Can_IntISR_Function(CAN_CONTROLLER_INSTANCE_MCAN3, 0x2738000U);}/** \brief MCAN4 Controller Instance ISR */FUNC(void, CAN_CODE) Can_6_Int0ISR(void){Can_IntISR_Function(CAN_CONTROLLER_INSTANCE_MCAN4, 0x2748000U);}#define CAN_STOP_SEC_ISR_CODE#include "Can_MemMap.h"/********************************************************************************End of File: Can_Cfg.c******************************************************************************/

3.通过MCU_UART串口打印出来的路由寄存器MAIN2MCU_LVL_INTRTR0_MUXCNTL_n的log(如下图),显示Main_CAN2/Main_CAN3/Main_CAN4的路由寄存器值是对的(中断已使能),但无法进入FUNC(void, CAN_CODE) Can_4_Int0ISR(void),FUNC(void, CAN_CODE) Can_5_Int0ISR(void),FUNC(void, CAN_CODE) Can_6_Int0ISR(void)相应的中断函数。

,

Cherry Zhou:

按照规定使用定制板,引脚复用必须做相应地处理。

您是否正在修改 CanApp_Startup.c example? 

,

Victory:

1、引脚已做相应处理,且Main_CAN2/Main_CAN3/Main_CAN4所在的CAN收发器工作状态是正常的

2、CanApp_Startup.c有修改过了,如附件

#include "CanApp_Startup.h"
#include "can_profile.h"/* ========================================================================== */
/*Global Variables*/
/* ========================================================================== */
uint32CanApp_IntNumbers[CAN_MAX_CONTROLLER];
/**< Store the interrupt numbers for all enabled CAN instances */
uint32CanApp_InstanceSrcId[CAN_MAX_CONTROLLER];
/**< Store the interrupt source id for all enabled CAN instances */
CanApp_IsrTypeCanApp_Isr[CAN_MAX_CONTROLLER];
/**< Associated ISR */
uint32CanApp_RoutIntNumbers[CAN_MAX_CONTROLLER];
/**< Store the output interrupt number routed */
extern Can_PduTypeCanApp_Pdu, CanApp_Pdu1;
/**< Variable used for copying protocol data unit */
extern uint8CanApp_InputData[64U];
/**< Variables which contains Can PDU data used in Can transmission */
extern const Can_PduType*CanApp_PduInfo;
/**< Variable which contains Can PDU data passed during Transmission */
/* ========================================================================== */
/*Function Definitions*/
/* ========================================================================== */
/** \brief Start up sequence : Program the interrupt muxes / priorities */
void CanApp_Startup(void)
{/* Build Interrupt list for the enabled Can Instances */CanApp_BuildIntList();Intc_Init();/* Interrupt handler initialized, here as other functions* can use API's to clear pending interrupts if any*//* Interrupt configuration for the enabled Can Instances */CanApp_InterruptConfig();/* Initialize counters, that would be required for profiling operations */AppUtils_ProfileInit(0);/* Initialize memory sections, which is used to check memory corruption */AppUtils_CanSectionInit();}void CanApp_BuildIntList(void)
{uint32 idx, flag, intNum;const Can_ConfigType *Can_ConfigPtr;CanApp_IsrType pIsrHandler = NULL;uint32 canMaxControllerCnt = 0U;uint32 canDevId, routIntNum = 0U;//20230419/** 1. Determine the number of Can Instances used* 2. Build valid Can Instances list* 3. Build isr and interrupt number for enabled Can Instances only*//* Do Can Init */
#if (STD_ON == CAN_VARIANT_PRE_COMPILE)Can_ConfigPtr = &CAN_INIT_CONFIG_PC;Can_Init((const Can_ConfigType *) NULL_PTR);
#if (CAN_INITIAL_PRINT_DISABLE_BEFORE_CAN_RESPONSE == STD_OFF)/*AppUtils_Printf(MSG_NORMAL, MSG_APP_NAME"Variant - Pre Compile being used !!!\n");*/
#endif
#elseCan_ConfigPtr = &CanConfigSet;Can_Init(Can_ConfigPtr);
#if (CAN_INITIAL_PRINT_DISABLE_BEFORE_CAN_RESPONSE == STD_OFF)AppUtils_Printf(MSG_NORMAL, MSG_APP_NAME"Variant - Post Build being used !!!\n");
#endif
#endif/* Enable SCI Client */Sciclient_init(NULL_PTR);canMaxControllerCnt = Can_ConfigPtr->CanMaxControllerCount;for (idx = 0U; idx < canMaxControllerCnt; idx++){CanApp_IntNumbers[idx] = 0U;CanApp_InstanceSrcId[idx] = 0U;CanApp_RoutIntNumbers[idx] = 0U;}for (idx = 0U; idx < canMaxControllerCnt; idx++){flag = 0U;if (CAN_CONTROLLER_INSTANCE_MCU_MCAN0 ==CanConfigSet_CanController_List_PC[idx]->CanControllerInst){intNum = APP_MCU_MCAN_0_INT0;pIsrHandler = Can_0_Int0ISR;canDevId = TISCI_DEV_MCU_MCAN0;//20230419flag = 1U;}if (CAN_CONTROLLER_INSTANCE_MCU_MCAN1 ==CanConfigSet_CanController_List_PC[idx]->CanControllerInst){intNum = APP_MCU_MCAN_1_INT0;pIsrHandler = Can_1_Int0ISR;canDevId = TISCI_DEV_MCU_MCAN1;//20230419flag = 1U;}//20230419if (CAN_CONTROLLER_INSTANCE_MCAN0 ==CanConfigSet_CanController_List_PC[idx]->CanControllerInst){intNum = APP_MCAN_0_INT0;//16UpIsrHandler = Can_2_Int0ISR;routIntNum = INTRTR_CFG_MAIN_DOMAIN_MCAN_0_OUT_INT_NO +INTRTR_CFG_START_LEVEL_INT_NUMBER;//28+160canDevId = TISCI_DEV_MCAN0;flag = 1U;}//20230505 Add Main_MCAN1if (CAN_CONTROLLER_INSTANCE_MCAN1 ==CanConfigSet_CanController_List_PC[idx]->CanControllerInst){intNum = APP_MCAN_1_INT0;//19UpIsrHandler = Can_3_Int0ISR;routIntNum = INTRTR_CFG_MAIN_DOMAIN_MCAN_1_OUT_INT_NO +INTRTR_CFG_START_LEVEL_INT_NUMBER;//29+160canDevId = TISCI_DEV_MCAN1;flag = 1U;}//20230508 Add Main_MCAN2if (CAN_CONTROLLER_INSTANCE_MCAN2 ==CanConfigSet_CanController_List_PC[idx]->CanControllerInst){intNum = APP_MCAN_2_INT0;//22UpIsrHandler = Can_4_Int0ISR;routIntNum = INTRTR_CFG_MAIN_DOMAIN_MCAN_2_OUT_INT_NO +INTRTR_CFG_START_LEVEL_INT_NUMBER;//30+160canDevId = TISCI_DEV_MCAN2;flag = 1U;}//20230508 Add Main_MCAN3if (CAN_CONTROLLER_INSTANCE_MCAN3 ==CanConfigSet_CanController_List_PC[idx]->CanControllerInst){intNum = APP_MCAN_3_INT0;//25UpIsrHandler = Can_5_Int0ISR;routIntNum = INTRTR_CFG_MAIN_DOMAIN_MCAN_3_OUT_INT_NO +INTRTR_CFG_START_LEVEL_INT_NUMBER;//31+160canDevId = TISCI_DEV_MCAN3;flag = 1U;}//20230508 Add Main_MCAN4if (CAN_CONTROLLER_INSTANCE_MCAN4 ==CanConfigSet_CanController_List_PC[idx]->CanControllerInst){intNum = APP_MCAN_4_INT0;//278UpIsrHandler = Can_6_Int0ISR;routIntNum = INTRTR_CFG_MAIN_DOMAIN_MCAN_4_OUT_INT_NO +INTRTR_CFG_START_LEVEL_INT_NUMBER;//32+160canDevId = TISCI_DEV_MCAN4;flag = 1U;}if (0U != flag){CanApp_IntNumbers[idx] = intNum;CanApp_Isr[idx] = pIsrHandler;CanApp_InstanceSrcId[idx] = canDevId;//20230419CanApp_RoutIntNumbers[idx] = routIntNum;//20230419flag = 0U;}}return;
}void CanApp_PlatformInit()
{uint32 regVal = 0U;/* Unlock lock key registers for Partition 7: IO PADconfiguration registers in MAIN_CTRL_MMR *//* write Partition 7 Lock Key 0 Register */CSL_REG32_WR(CSL_WKUP_CTRL_MMR0_CFG0_BASE + 0x1D008, 0x68EF3490);/* write Partition 7 Lock Key 1 Register */CSL_REG32_WR(CSL_WKUP_CTRL_MMR0_CFG0_BASE + 0x1D00C, 0xD172BC5A);/* Check for unlock */regVal = CSL_REG32_RD(CSL_WKUP_CTRL_MMR0_CFG0_BASE + 0x1D008);while ((regVal & 0x1) != 0x1U){regVal = CSL_REG32_RD(CSL_WKUP_CTRL_MMR0_CFG0_BASE + 0x1D008);}/* Unlock lock key registers for Partition 7: IO PADconfiguration registers in MAIN_CTRL_MMR *//* write Partition 7 Lock Key 0 Register */CSL_REG32_WR(CSL_CTRL_MMR0_CFG0_BASE + 0x1D008, 0x68EF3490);/* write Partition 7 Lock Key 1 Register */CSL_REG32_WR(CSL_CTRL_MMR0_CFG0_BASE + 0x1D00C, 0xD172BC5A);/* Check for unlock */regVal = CSL_REG32_RD(CSL_CTRL_MMR0_CFG0_BASE + 0x1D008);while ((regVal & 0x1) != 0x1U){regVal = CSL_REG32_RD(CSL_CTRL_MMR0_CFG0_BASE + 0x1D008);}/* Unlocking done *//* Below code will be replaced by Port module in further releases *//* MCU MCAN 0 Tx PAD configuration */regVal = 0x60000U;CSL_REG32_WR(CSL_WKUP_CTRL_MMR0_CFG0_BASE + 0x1C0A8U, regVal);/* MCU MCAN 0 Rx PAD configuration */regVal = 0x60000U;CSL_REG32_WR(CSL_WKUP_CTRL_MMR0_CFG0_BASE + 0x1C0ACU, regVal);/* MCU MCAN 1 Tx PAD configuration */regVal = 0x60000U;CSL_REG32_WR(CSL_WKUP_CTRL_MMR0_CFG0_BASE + 0x1C0C0U, regVal);/* MCU MCAN 1 Rx PAD configuration */regVal = 0x60000U;CSL_REG32_WR(CSL_WKUP_CTRL_MMR0_CFG0_BASE + 0x1C0C4U, regVal);/* MAIN MCAN 0 Tx PAD configuration */regVal = 0x60000U;CSL_REG32_WR(CSL_CTRL_MMR0_CFG0_BASE + 0x1C20CU, regVal);/* MAIN MCAN 0 Rx PAD configuration */regVal = 0x60000U;CSL_REG32_WR(CSL_CTRL_MMR0_CFG0_BASE + 0x1C208U, regVal);/* MAIN MCAN 1 Tx PAD configuration */regVal = 0x60000U;CSL_REG32_WR(CSL_CTRL_MMR0_CFG0_BASE + 0x1C214U, regVal);/* MAIN MCAN 1 Rx PAD configuration */regVal = 0x60000U;CSL_REG32_WR(CSL_CTRL_MMR0_CFG0_BASE + 0x1C210U, regVal);/* MAIN MCAN 2 Tx PAD configuration */regVal = 0x60003U;CSL_REG32_WR(CSL_CTRL_MMR0_CFG0_BASE + 0x1C21CU, regVal);/* MAIN MCAN 2 Rx PAD configuration */regVal = 0x60003U;CSL_REG32_WR(CSL_CTRL_MMR0_CFG0_BASE + 0x1C218U, regVal);/* MAIN MCAN 3 Tx PAD configuration */regVal = 0x60001U;CSL_REG32_WR(CSL_CTRL_MMR0_CFG0_BASE + 0x1C204U, regVal);/* MAIN MCAN 3 Rx PAD configuration */regVal = 0x60001U;CSL_REG32_WR(CSL_CTRL_MMR0_CFG0_BASE + 0x1C200U, regVal);/* MAIN MCAN 4 Tx PAD configuration */regVal = 0x60006U;CSL_REG32_WR(CSL_CTRL_MMR0_CFG0_BASE + 0x1C020U, regVal);/* MAIN MCAN 4 Rx PAD configuration */regVal = 0x60006U;CSL_REG32_WR(CSL_CTRL_MMR0_CFG0_BASE + 0x1C024U, regVal);/* Take MCAN transceivers out of STB mode i.e NORMAL Mode */CanApp_EnableTransceivers();
}void CanApp_EnableTransceivers(void)
{uint32 regVal = 0U;Dio_LevelType dioPinLevel[2U];/* Take MCAN transceiver out of STB mode for MCU MCAN0 *//* Below code will be replaced by Port module in further releases *//* Pin mux configuration of Dio Pin 15(MCU_MCAN0_EN J27 WKUP_GPIO0_15) */regVal = 0x08050007U;CSL_REG32_WR(CSL_WKUP_CTRL_MMR0_CFG0_BASE + CSL_WKUP_CTRL_MMR_CFG0_PADCONFIG59, regVal);/* Set Pin direction to output */regVal = CSL_REG32_RD(CSL_WKUP_GPIO0_BASE + 0x10U);regVal &= (~(1U << 0x0FU));CSL_REG32_WR(CSL_WKUP_GPIO0_BASE + 0x10U, regVal);/* Drive Pin to High */Dio_WriteChannel(15U, STD_HIGH);/* Read Pin level */dioPinLevel[1U] = Dio_ReadChannel(15U);/*Read back the pin levels to ensure transceiver is enabled*/if (STD_HIGH != dioPinLevel[1U]){AppUtils_Printf(MSG_NORMAL, MSG_APP_NAME" Error in Enabling CAN Transceiver MCU MCAN0!!!\n");}else{/* Pin mux configuration of Dio Pin 51(MCU_CAN0_STBZ F23 WKUP_GPIO0_51) */regVal = 0x08050007U;CSL_REG32_WR(CSL_WKUP_CTRL_MMR0_CFG0_BASE +CSL_WKUP_CTRL_MMR_CFG0_PADCONFIG35, regVal);/* Set Pin direction to output */regVal = CSL_REG32_RD(CSL_WKUP_GPIO0_BASE + 0x38U);regVal &= (~(1U << 0x13U));CSL_REG32_WR(CSL_WKUP_GPIO0_BASE + 0x38U, regVal);/* Drive Pin to High */Dio_WriteChannel(51U, STD_HIGH);/* Read Pin level */dioPinLevel[1U] = Dio_ReadChannel(51U);/*Read back the pin levels to ensure transceiver is enabled*/if (STD_HIGH != dioPinLevel[1U]){AppUtils_Printf(MSG_NORMAL, MSG_APP_NAME" Error in Enabling CAN Transceiver MCU MCAN0!!!\n");}else{/*AppUtils_Printf(MSG_NORMAL, MSG_APP_NAME" Successfully Enabled CAN Transceiver MCU MCAN0!!!\n");*/}}return;
}void CanApp_InterruptConfig(void)
{uint32 idx;OsalRegisterIntrParams_tintrPrms;OsalInterruptRetCode_eosalRetVal;HwiP_Handle hwiHandle;struct tisci_msg_rm_irq_set_reqrmIrqReq;//20230504struct tisci_msg_rm_irq_set_resprmIrqResp;//20230504Int32 retVal;//20230504const Can_ConfigType *Can_ConfigPtr;uint32 AddressOffset,regVal = 0;
#if (STD_ON == CAN_VARIANT_PRE_COMPILE)Can_ConfigPtr = &CAN_INIT_CONFIG_PC;
#elseCan_ConfigPtr = &CanConfigSet;
#endif/*set MAIN2MCU_LVL_INTRTR0_MUXCNTL_n n= 0 ~ 63*/regVal |= (1U << 16U);//INT_ENABLEregVal |= APP_MCAN_4_INT0;//MAIN2MCU_LVL_INTRTR0_IN_278AddressOffset = (4 + 32*4);//CSL_REG32_WR(CSL_MAIN2MCU_LVL_INTRTR0_CFG_BASE + AddressOffset, regVal);//Page13473 MAIN2MCU_LVL_INTRTR0_MUXCNTL_n RegisterAddressOffset = 0;for (idx = 0U; idx < Can_ConfigPtr->CanMaxControllerCount; idx++){/* If the CAN instance is not in MCU domain, the interrupt router willhave to be configured *//* Set the destination interrupt */if ((CAN_CONTROLLER_INSTANCE_MCU_MCAN0 !=CanConfigSet_CanController_List_PC[idx]->CanControllerInst) &&(CAN_CONTROLLER_INSTANCE_MCU_MCAN1 !=CanConfigSet_CanController_List_PC[idx]->CanControllerInst)){CanApp_IntNumbers[idx] = CanApp_RoutIntNumbers[idx];rmIrqReq.valid_params= TISCI_MSG_VALUE_RM_DST_ID_VALID;rmIrqReq.valid_params|= TISCI_MSG_VALUE_RM_DST_HOST_IRQ_VALID;rmIrqReq.src_id= CanApp_InstanceSrcId[idx];rmIrqReq.global_event= 0U;/* Src Index 0 - mcanss_ext_ts_rollover_lvl_int,Src Index 1 - mcanss_mcan_lvl_int Line 0,Src Index 2 - mcanss_mcan_lvl_int Line 1 */rmIrqReq.src_index= 1U;rmIrqReq.dst_id= TISCI_DEV_MCU_R5FSS0_CORE0;rmIrqReq.dst_host_irq= CanApp_RoutIntNumbers[idx];rmIrqReq.ia_id= 0U;rmIrqReq.vint= 0U;rmIrqReq.vint_status_bit_index= 0U;rmIrqReq.secondary_host= TISCI_MSG_VALUE_RM_UNUSED_SECONDARY_HOST;retVal = Sciclient_rmIrqSet(&rmIrqReq, &rmIrqResp, APP_SCICLIENT_TIMEOUT);if(CSL_PASS != retVal){AppUtils_Printf(MSG_NORMAL,"CAN_APP: Error in SciClient Interrupt Params Configuration %d !!!\n",idx);}}Osal_RegisterInterrupt_initParams(&intrPrms);intrPrms.corepacConfig.arg= (uintptr_t)CanApp_Isr[idx];intrPrms.corepacConfig.isrRoutine= &CanApp_CanXIsr;intrPrms.corepacConfig.priority= 1U;intrPrms.corepacConfig.corepacEventNum = 0U; /* NOT USED ? */intrPrms.corepacConfig.intVecNum= CanApp_IntNumbers[idx];osalRetVal = Osal_RegisterInterrupt(&intrPrms, &hwiHandle);if(OSAL_INT_SUCCESS != osalRetVal){AppUtils_Printf(MSG_NORMAL,"CAN_APP: Error %d !!!\n",idx);break;}}/*for (idx = 0U; idx < 64; idx++){AddressOffset = 4 + idx*4;regVal = CSL_REG32_RD(CSL_MAIN2MCU_LVL_INTRTR0_CFG_BASE + AddressOffset);//MAIN2MCU_LVL_INTRTR0 0~27 and 50~62 have no valueAppUtils_Printf(MSG_NORMAL,"MAIN2MCU_LVL_INTRTR0_MUXCNTL_CH MAIN2MCU_LVL_INTRTR0_MUXCNTL_Value: %d, %0x\n",idx,regVal);}*/return;
}/** \brief None, SBL/GEL powers up the timers and clock sources */
void CanApp_PowerAndClkSrc(void)
{/* Mcu module, when included will replace this operation */return;
}

,

Cherry Zhou:

/*set MAIN2MCU_LVL_INTRTR0_MUXCNTL_n n= 0 ~ 63*/regVal |= (1U << 16U);//INT_ENABLEregVal |= APP_MCAN_4_INT0;//MAIN2MCU_LVL_INTRTR0_IN_278AddressOffset = (4 + 32*4);//CSL_REG32_WR(CSL_MAIN2MCU_LVL_INTRTR0_CFG_BASE + AddressOffset, regVal);//Page13473 MAIN2MCU_LVL_INTRTR0_MUXCNTL_n RegisterAddressOffset = 0;

请问这一部分代码是用来做什么的?

Victory 说:3、MCU域串口log:

以上的log中,为什么会出现MCU_CAN bus 0 error bus 1 error 以及 MAIN CAN 1 error?

工程师认为问题应该是由于中断路由以及 MCAN4被分配给192 ID,请确保system.Reg中的任何其它设备都不使用它。

,

Victory:

1、为什么会出现MCU_CAN bus 0 error bus 1 error 以及 MAIN CAN 1 error?

回复:出现MCU_CAN bus 0 error bus 1 error 以及  MAIN CAN 0or MAIN CAN 1 error的原因是这4路CAN通道都没接CAN节点,因此产生error 中断

2、工程师认为问题应该是由于中断路由以及 MCAN4被分配给192 ID,请确保system.Reg中的任何其它设备都不使用它

回复:好的,我确认下

,

Victory:

1、/*set MAIN2MCU_LVL_INTRTR0_MUXCNTL_n n= 0 ~ 63*/regVal |= (1U << 16U);//INT_ENABLEregVal |= APP_MCAN_4_INT0;//MAIN2MCU_LVL_INTRTR0_IN_278AddressOffset = (4 + 32*4);//CSL_REG32_WR(CSL_MAIN2MCU_LVL_INTRTR0_CFG_BASE + AddressOffset, regVal);//Page13473 MAIN2MCU_LVL_INTRTR0_MUXCNTL_n RegisterAddressOffset = 0

这部分代码是用来强制赋值MAIN2MCU_LVL_INTRTR0_MUXCNTL_32 = 0x10116(指向Main_MCAN4的

MAIN2MCU_LVL_INTRTR0_IN_278

),如果没加这部分代码MAIN2MCU_LVL_INTRTR0_MUXCNTL_32 = 0x1001C

2、工程师认为问题应该是由于中断路由以及 MCAN4被分配给192 ID,请确保system.Reg中的任何其它设备都不使用它

2.1、路由中断号MCAN不应该是192吗,如下截取 CanApp_Startup.c的代码

 

2.2、system.Reg?

,

Cherry Zhou:

已跟进给工程师。

,

Cherry Zhou:

工程师问的是routIntNum =192已提供给主域 CAN4,是否实际上并没有用到?

,

Victory:

是没用到,所以加了以下这段代码,强制让主域 CAN4能使用routIntNum =192,不知是否可行

regVal |= (1U << 16U);//INT_ENABLEregVal |= APP_MCAN_4_INT0;//MAIN2MCU_LVL_INTRTR0_IN_278AddressOffset = (4 + 32*4);//CSL_REG32_WR(CSL_MAIN2MCU_LVL_INTRTR0_CFG_BASE + AddressOffset, regVal);//Page13473 MAIN2MCU_LVL_INTRTR0_MUXCNTL_n RegisterAddressOffset = 0

,

Cherry Zhou:

不可以的哈,因为稍后的 Sciclient_rmIrqSet 会受到影响。

Sciclient_rmIrqSet (&amp;rmIrqReq、&amp;rmIrqResp、APP_SCICLIENT_TIMEOUT);

中断配置 API 中的此行将会执行类似的功能并路由中断。 必须确保系统中使用的 routIntNum 是空闲的。 

,

Victory:

1、主域MCAN4实际上没用到routIntNum =192,那么MCAN4的中断路由值如何设置?

2、主域MCAN2/MCAN3/MCAN3无法进入中断,读出的中断相关寄存器是正常的,请帮忙分析原因。

,

Cherry Zhou:

Victory 说:1、主域MCAN4实际上没用到routIntNum =192,那么MCAN4的中断路由值如何设置?

它实际上是用来将主域中断路由到 MCU 域的。 Sciclient_rmIrqSet 将执行中断路由,MCU 端使用的 routIntNum 不应在任何其他位置使用。您对 MCAN2和 MCAN3执行了相同的操作,但没有遇到任何错误。现在您可能会遇到这个问题,因为这可能会被其他地方或您之前编写的段使用。 该过程与 MCAN0和 MCAN1相似,无任何区别。 

Victory 说:2、主域MCAN2/MCAN3/MCAN3无法进入中断,读出的中断相关寄存器是正常的,请帮忙分析原因。

您如何确保在上述节点上接收中断?有没有检查过 IP 的原始中断状态? 能否分享下相应中断的 R5FST_VIM_Registers 的寄存器转储? 

,

Victory:

1、您如何确保在上述节点上接收中断?有没有检查过 IP 的原始中断状态? 能否分享下相应中断的 R5FST_VIM_Registers 的寄存器转储? 

1.1、任何中断,都无法进入

1.2、 IP 的原始中断状态指的是什么

1.3、相应中断的 R5FST_VIM_Registers 的寄存器转储:具体哪些寄存器

,

Cherry Zhou:

跟进给工程师了。

,

Cherry Zhou:

工程师问的是, IP 是否首先接收中断。 无论节点是否从总线接收数据以及是否被过滤,在这之后我们只有一个中断。

能否分享下 MCAN2/3/4的 CAN_IR、CAN_IE 寄存器的寄存器转储? 以及所有上述单个(非公式1) VIM 寄存器、对于 j=5和6(使用公式1 )

因为我们对 MCAN2/3/4使用 rouIntNum =190/191/192。

赞(0)
未经允许不得转载:TI中文支持网 » TDA4VM: 主域Main_CAN2/Main_CAN3/Main_CAN4无法正常通信
分享到: 更多 (0)