2010-03-29 01:17 PM
CAN2 in STM32F105
2011-05-17 04:45 AM
You must activate clock for CAN1 to send with CAN2.
2011-05-17 04:45 AM
Thank you michi.
I can transmit data so I use the CAN 1 clock. My problem is that I can't receive data? Any Idea? Ragards JeePee2011-05-17 04:45 AM
Nobody can help you unless you give some more detail about your code,
2011-05-17 04:45 AM
I had the same problem with the STM23F107 with CAN2.
You must activate clock for CAN1 and CAN2 and set the filter for CAN2: /* CAN1 Periph clock enable */ RCC_APB1PeriphClockCmd(RCC_APB1Periph_CAN1, ENABLE); /* CAN2 Periph clock enable */ RCC_APB1PeriphClockCmd(RCC_APB1Periph_CAN2, ENABLE); Filter settings for example for all IDs /** * @brief Configures the CAN2 filter. * @param None * @retval None */ void CAN2_Filter_Config_None(void) { CAN_FilterInitTypeDef CAN_FilterInitStructure; /* CAN filter init */ CAN_FilterInitStructure.CAN_FilterNumber=14; // for CAN2 begins the filter number with number 14 CAN_FilterInitStructure.CAN_FilterMode=CAN_FilterMode_IdMask; CAN_FilterInitStructure.CAN_FilterScale=CAN_FilterScale_32bit; CAN_FilterInitStructure.CAN_FilterIdHigh=0x0000; CAN_FilterInitStructure.CAN_FilterIdLow=0x0000; CAN_FilterInitStructure.CAN_FilterMaskIdHigh=0x0000; CAN_FilterInitStructure.CAN_FilterMaskIdLow=0x0000; CAN_FilterInitStructure.CAN_FilterFIFOAssignment=0; CAN_FilterInitStructure.CAN_FilterActivation=ENABLE; CAN_FilterInit(&CAN_FilterInitStructure); } lg michi