Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 9 months ago.
NUCLEO F302R8 CAN problem
Hi, I tried to use USART3(PC10,PC11) and CAN(PB8,PB9) in my program. After I checked USART3 transmission is fine. I declared CAN port from API like this
than test the program on the NUCLEO board, but USART3 have no output from its RX. It seems the problem is this declaration of CAN, so I comment out CAN port declaration and tried again, USART3 can work normally. I wonder how to use this two function together?
1 Answer
7 years, 9 months ago.
I just looked in mbed-dev and it has the following comments (which don't make sense to me)
const PinMap PinMap_CAN_RD[] = { // {PB_8 , CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN)}, // Not available in 32 pins package {PA_11, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN)}, {NC, NC, 0} }; const PinMap PinMap_CAN_TD[] = { // {PB_9 , CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN)}, // Not available in 32 pins package {PA_12, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN)}, {NC, NC, 0}