Issue in CAN Normal mode with STM32F412
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-29 4:59 AM - last edited on ‎2024-10-29 6:59 AM by mƎALLEm
If anyone Work on project that interfacing Can transceiver TJA1050 with STM32F412RET6 , if yes i hope anyone send Example code that work and clock configurations ,, the loopback mode work correctly .. but in normal mode problems start ... and operating voltages of TJA
Solved! Go to Solution.
- Labels:
-
CAN
-
STM32F4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-29 6:58 AM
Hello @mohamed_25 and welcome to the community,
Please share your schematics and the code you have used for tests. Are you using CubeMx? please share also the .ioc file
You can inspire from this example: https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Projects/STM324xG_EVAL/Examples/CAN/CAN_Networking
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-29 5:58 AM
@mohamed_25 wrote:If anyone Work on project that interfacing Can transceiver TJA1050 with STM32F412RET6 , if yes i hope anyone send Example code that work and clock configurations ,, the loopback mode work correctly .. but in normal mode problems start ... and operating voltages of TJA
The TJA1050 is just a simple "combinatorial" device, i.e. logic for voltage level adaption. There is no programmable functionality whatsoever.
Loopback mode works correctly because the loopback is usually internal (i.e. on-chip), and the signals don't leave the MCU (or have no consequence).
If loopback works, the next step is to connect two compatible CAN nodes on digital level directly.
Compatible means either two STM32F412 boards, or two CAN interfaces on the same board. (CAN-TX1 to CAN-RX2, and vice versa).
If that works, you can proceed to different nodes connected via transceivers. You will need a scope, or configurable logic analyser. CAN is a differential bus : https://en.wikipedia.org/wiki/CAN_bus#/media/File:ISO11898-2.svg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-29 6:16 AM
i understand this ,, i use 2 MCUS with 2 tja1050 Transciever but i dont work so i need example code to make sure that problem in hardware
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-29 6:29 AM
@mohamed_25 wrote:it dont work so i need example code to make sure that problem in hardware
So use a scope or logic analyser to see what's actually happening on the wires.
No point in messing with software if it is a hardware problem!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-29 6:58 AM
Hello @mohamed_25 and welcome to the community,
Please share your schematics and the code you have used for tests. Are you using CubeMx? please share also the .ioc file
You can inspire from this example: https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Projects/STM324xG_EVAL/Examples/CAN/CAN_Networking
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-29 7:10 AM - edited ‎2024-10-29 7:12 AM
The TJA1050 is a 5V transceiver but VIHmin = 2V which is OK.
Meanwhile, what do you set as voltage level for S pin (Silent mode)?
So check if S pin in connected to the ground.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-29 8:47 AM
Hello Andy, good to hear you are still around !
Had been off for months at times, busy with other projects and occupations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-11 7:02 AM
Hello @mohamed_25 ,
Could you please provide a status on this thread? did you solve your issue?
Thank you.
