CAN2 in STM32F105
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2010-03-29 1:17 PM
Posted on March 29, 2010 at 22:17
CAN2 in STM32F105
This discussion is locked. Please start a new topic to ask your question.
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 4:45 AM
Posted on May 17, 2011 at 13:45
You must activate clock for CAN1 to send with CAN2.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 4:45 AM
Posted on May 17, 2011 at 13:45
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 JeePeeOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 4:45 AM
Posted on May 17, 2011 at 13:45
Nobody can help you unless you give some more detail about your code,
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 4:45 AM
Posted on May 17, 2011 at 13:45
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