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
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 CAN Bit Time Calculation .
Hello Vladislav, thank you! Vaclav
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
µVision User's Guide: Pack Installer
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
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.
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: Application Note 236: CAN Primer for STM32F4 Discovery Board
I have version 2.9 available - I will try to get it up on the Keil website Wednesday.
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
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.
You have several places that can cause a problem. I recommend using a scope on CAN out on the processor CAN_Out to see if there is any action. To see signals on a CAN analyzer or on another node - you have to have so many things set properly - with a scope many things can be wrong and a signal of some sort can be visible with a scope. Cheap scopes work quite well.
If your CAN speed is not the same as set on your analyzer - you will see nothing. If your CAN speed is not what you think it is, the scope will still see any activity.
If you do not have another node connected (or working) - your CAN controller will send out the first message forever - it is waiting for the ACK signal. A scope will be able to see this activity.
If a stand-alone CAN controller is trying to send out messages and no transceiver is connected or not conected correctly - no signals will be output on CAN_Out. Not even a scope will see anything.
It is imperative that CAN_Out and CAN_IN are connected together via a CAN transceiver chip. Then a scope will see any activity. Somehow, CAN_OUT and CAN_IN must be connected in this fashion.
Here is another CAN trick: I have seen where without a transceiver if you short CAN_Out to CAN_In: the transceiver can then output a signal and a scope can see it. can't guarantee this happens on ST controllers. maybe I should try it sometime.
You might have issues with your CAN software - but using a scope (IMHO) is a very good idea.
It finally works, the MCP2551 was dead. Vaclav
Retrieving data ...