AnsweredAssumed Answered

STM32F0 CAN pin configuration

Question asked by schmidt.reiner.001 on Mar 24, 2015
Latest reply on Mar 24, 2015 by Clive One
Hello, I am basing this post off of the STM32F0 firmware V1.5. 

I am working on a CAN project where we recently migrated to a smaller package chip (we are now using the STM32F072RB). The firmware example for CAN networking uses the CAN bus on PORTD. However we are now using the CAN bus on PORTB (PB8, PB9). However i am unable to get the pin configuration to work at all. Below are the defines in main.h of the firmware example ported to portB. 

#define CANx                    CAN
#define CAN_CLK             RCC_APB1Periph_CAN
#define CAN_RX_PIN          GPIO_Pin_8
#define CAN_TX_PIN          GPIO_Pin_9
#define CAN_GPIO_PORT       GPIOB
#define CAN_GPIO_CLK                RCC_AHBPeriph_GPIOB
#define CAN_AF_PORT             GPIO_AF_1
#define CAN_RX_SOURCE       GPIO_PinSource8
#define CAN_TX_SOURCE       GPIO_PinSource9

Other than above the code is the same as the firmware example. I have gone through the much of the documentation and have been unable to find my error.