7 years, 2 months ago.

CAN with Nucleo f767ZI

Hi guys,

I'm trying the get the CAN running on the Nucleo F767ZI board but have not been successful. The mbed CAN_api and CAN example doesn't seem to work although other peripheral (SPI, I2C) are working fine. Any ideas?

P.S. I connected the CAN1 pins to a transceiver (mcp2551), and testing with a PCAN-USB from PEAK-System. The bus is terminated with 120 ohms resistors on both sides.

Regards

2 Answers

7 years, 1 month ago.

I am having the same problem. I don't know what the solution is, but I wanted to be here when someone finds the answer.

7 years, 1 month ago.

Both posts offer very little details of the fault other than "it does not work".

Is this what you are using ?

https://developer.mbed.org/users/hudakz/code/CANnucleo/file/e29bc8e0dddd/can_api.h

<< Note the warning of compatibility >>

https://developer.mbed.org/users/hudakz/code/CANnucleo_Hello/

Which code are you using ? What is the wiring diagram ? What is the definition of "it does not work" ?

Suggest to work with a proven mbed board to assist with the debugging. For example, found this very well documented webpage on CAN interfacing with mbed:

http://langster1980.blogspot.ca/2014/10/mbed-can-bus-tutorial.html

Pick up the LPC1768 as a board for debugging your case. You will save hours of time since this author is offering full details of the interfacing.

https://developer.mbed.org/users/hudakz/code/STM32F103C8T6_Hello/

  • source 2 x of these boards + 2 of the Microchip xcvrs and apply the posted mbed code before moving to using the PEAK tool

is another alternative for quick CAN bus testing using the same boards as the author.

Also, from the Microchip website (although not an issue to create a simple CAN project to get started), the CAN transceiver you have selected is not recommended for new designs. The replacement is the MCP2561:

http://www.microchip.com/wwwproducts/en/en010405

What baud rate are you using with mbed ? with the PEAK tool ? Wiring of the transceiver and the USB dongle ?

Hi, well I clearly said "The mbed CAN_api" not the CanNucleo library. (check can.h in https://developer.mbed.org/users/mbed_official/code/mbed/file/5364839841bd/CAN.h)

and by it doesn't work I mean I'm sending but the pcan is not receiving and vice versa !

anyway I gave up on using mbed for the project and now I'm using something else and it's working fine

thank you for your effort

posted by Mohammad Hukan 28 Feb 2017