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 ago.
ST Nucleo STM32F446RE CAN2 bus not working
I am using online compiler and STM32F446RE board that have two CAN bus. My problem is that CAN1 works well but when I try to load binary to board that uses CAN2 bus, board that does not even start run code.
CAN can(PA_11, PA_12); code works fine, CAN1 bus
but when I try this CAN can(PB_12, PB_13); CAN2, board not start running code at all
I checked that PB_12, PB_13 are right pins for CAN2 bus. I am using newest mbed library.
UPDATE I updated to mbed-os-5.7.6 when it released and now CAN 2 works as it should. So there was bug in mbed-os previous release.
2 Answers
7 years ago.
I have personally not used CAN2 but have a dual-CAN board based on this exact processor. What I have found in the past is that I need to have a 9600 baud terminal connected to look for initialization errors. They will print to the terminal immediately after reset and then the application will hang. Any chance that you have done that? Other than this suggestion I would have to try this on my board to see if I run into a similar issue.
Sorry I don't have terminal.
I did some test If I give frequency same time as pins, code run..
CAN can2(PB_12, PB_13, 500000);
But Can2 gives messages whole time even if there is no CAN tranceiver connected at all. I did same to CAN 1 and it works right, no messages if not messages sent to it. I am thinking is my brand new board broken?
posted by 13 Feb 20187 years ago.
Hi,
I checked the CAN2 (on PB12/PB13 pins) on the NUCLEO_F446RE and it is OK for me.