2018-03-27 03:17 AM
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 #stm32f72018-03-29 12:41 AM
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
.2018-03-29 12:49 AM
Hello Vladislav, thank you! Vaclav
2018-04-03 01:08 PM
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
2018-04-03 01:46 PM
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
2018-04-03 08:40 PM
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:
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
2018-04-04 06:06 AM
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
2018-04-04 08:50 AM
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.
2018-04-04 01:01 PM
Hello
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.
Bob
2018-04-12 01:04 AM
It finally works, the MCP2551 was dead. Vaclav