Skip to main content
Vaclav Zajic
Associate III
March 27, 2018
Question

NUCLEO-F767ZI CAN bus example

  • March 27, 2018
  • 6 replies
  • 3969 views
Posted on March 27, 2018 at 12:17

Hello, is there a working example for CAN bus on NUCLEO-F767ZI board? I tried to search the STM32F7-Cube and was not successful. Thank you in advance! Vaclav

#can-interface #stm32f7
This topic has been closed for replies.

6 replies

Vladislav Kaloerov
Visitor II
March 29, 2018
Posted on March 29, 2018 at 09:41

Hello Vaclav, in my experience, you can use any can bus example, even for other mcu series like f4 or f3, bxCAN modules works the same. Baud rate calc for your project simple with 

http://www.bittiming.can-wiki.info/

 .
Vaclav Zajic
Associate III
March 29, 2018
Posted on March 29, 2018 at 09:49

Hello Vladislav, thank you! Vaclav

Bob Boys
Visitor II
April 3, 2018
Posted on April 03, 2018 at 22:08

Hello

There is a CAN example in the Keil examples for the STM32756-EVAL board.

You might try this.  There is a good chance it will work fro your processor.

You can use the free Keil MDK eval version to compile and evaluate this example if you turn the graphics off in Ui.c

.

http://www.keil.com/support/man/docs/uv4/uv4_ca_packinstaller.htm

 

Bob

Tesla DeLorean
Guru
April 3, 2018
Posted on April 03, 2018 at 22:46

It is not a board that ships with a CAN interface, find a board that comes with CAN and then port it to the NUCLEO, and configure the circuit/transceiver in an equivalent fashion

STM32Cube_FW_F7_V1.9.0\Projects\STM32756G_EVAL\Examples\CAN\CAN_Networking

STM32Cube_FW_F7_V1.9.0\Projects\STM32F769I_EVAL\Examples\CAN\CAN_Networking

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Bob Boys
Visitor II
April 4, 2018
Posted on April 04, 2018 at 03:40

Yes - this is true....but there is a CAN ''cheat'' you can use - it isn't CAN physical layer compliant: but for two (and maybe a few more) nodes - it is simple to add to any board. Diodes are 1N914 or 1N4148 or similar.

You can't connect to a real CAN network because the voltages are different and there is no differential signal.

0690X0000060APeQAM.png

There are not many boards with the CAN transceiver installed - the Keil MCB series and the  ST EVAL boards usually have them.  Maybe there are more ?

There are low cost external transceiver boards available:  search for can transceiver breakout board

There are many ST boards with two CAN controllers on them - remember you need at least 2 CAN nodes for a CAN network to work.

There are some more details on my CAN Primer

http://www.keil.com/appnotes/docs/apnt_236.asp

 

I have version 2.9 available - I will try to get it up on the Keil website Wednesday.

Thanks

Bob Boys

Vaclav Zajic
Associate III
April 4, 2018
Posted on April 04, 2018 at 15:06

So my setup is Nucleo-F767ZI connected to CAN transceiver MCP2551. CAN on MCP2551 is connected to USB to CAN converter, I have 120 Ohm resistor between CAN_H and CAN_L. I can not see anything on the bus. I used example 'CAN networking' from example for STM32F769I-eval, where I changed the pin configuration of CAN1 according to pin description of Nucleo-F767ZI. Any ideas? Thank you for help. Vaclav

Tesla DeLorean
Guru
April 4, 2018
Posted on April 04, 2018 at 15:50

Your device needs to communicate with other nodes on the bus.

You could try using loop-back mode to see if that works, seem to remember there is some signal bleed through on to the bus which can be seen on a scope.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Vaclav Zajic
Associate III
April 12, 2018
Posted on April 12, 2018 at 10:04

It finally works, the MCP2551 was dead. Vaclav