Comments (16)
I solved the problems they work now thank you for your help. I used the arduino codes you suggested and changed the clock settings. It works perfectly now.
from arduino-stm32-can.
Yes, I used USB as a serial port
from arduino-stm32-can.
It is work fine with stm32F405/406.
https://github.com/nopnop2002/Arduino-STM32-CAN/tree/master/stm32f407
from arduino-stm32-can.
I used your code but I am getting send fail on my screen. I tried the things you said and they didnt seem to work for me. My two arduinos talk to each other just fine but when I add stm32 with your code my receiver doesnt get anything and yours say send fail.
from arduino-stm32-can.
If the transmission fails, these are the possible causes.
There is no receiving app on CanBus.
The speed does not match the receiver.
There is no terminating resistor on the CanBus.
There are three terminating resistors on the CanBus.
The resistance value of the terminating resistor is incorrect.
Stub length in CAN bus is too long.
Though the ISO11898 Standard specifies a maximum bus length of 40m and maximum stub length of 0.3m at 1Mbps. See here.
from arduino-stm32-can.
Your CAN-BUS may be affected by noise.
If you review the wiring of CAN-BUS, it may work.
It occurs when the wire cable is thin or wire cable is crossing.
It is preferable to use twisted wire.
I changed the wire cable to twisted wire. Fixed.
from arduino-stm32-can.
I am going to try the cables. Do you have the code for arduino receiver. Did you share it somewhere? Maybe I can try that.
from arduino-stm32-can.
And I tried the code you said it works perfectly. My UART-USB converter connection is fine.
from arduino-stm32-can.
My problem isnt solved. Only Serial connection is ok. But communication problem continious.
from arduino-stm32-can.
I really need to try the arduino code you used.
from arduino-stm32-can.
I really need to try the arduino code you used.
Read carefully.
https://github.com/nopnop2002/Arduino-STM32-CAN/blob/master/README.md
README say;
Communication with Arduino-UNO
You can use this library.
If you search the Internet, you will find a lot of sample code.
from arduino-stm32-can.
Sir, I am trying to send data from Mega and Stm32 then read it from Nano. Mega and Nano works perfectly together but when I connect Stm32 with your code. Nano stops receiving and Stm32 says send fail. I connected resistors and everyting. I am asking if you shared the code that you used in Arduino to try it. I have read the README.
from arduino-stm32-can.
I am asking if you shared the code that you used in Arduino to try it.
https://github.com/coryjfowler/MCP_CAN_lib
Mega and Nano works perfectly together but when I connect Stm32 with your code. Nano stops receiving and Stm32 says send fail.
simply a wire cable or terminating resistor or bitrate or connection problem.
Is the STM32 BitRate correct?
Are STM32 wires short enough?
Are the STM32 wires well shielded?
Are all wires adequately shielded?
Are the terminating resistors really on both ends?
I changed the wire cable to twisted wire. It Fixed.
from arduino-stm32-can.
1000KBPS is susceptible to noise.
Try it at 250KBPS or 500KBPS.
from arduino-stm32-can.
Mega and Nano works perfectly together but when I connect Stm32 with your code. Nano stops receiving and Stm32 says send fail.
Mega and Nano are working perfectly, what happens when you add STM32 to CAN-BUS?
Connect stm32 to tranceiver.
Add tranceiver to CAN-BUS.
But without turning on the STM32.
from arduino-stm32-can.
I found that:
STM32F405/407 can use a Virtual COM port.
If you enable Virtual COM port, you can use the USB port as a serial port.
With STM32F103, Basic Extended CAN(BxCan) and USB Support can not be used at the same time.
With STM32F405/407, Basic Extended CAN(BxCan) and USB Support can be used at the same time.
from arduino-stm32-can.
Related Issues (20)
- the lib didn't work well HOT 4
- Canard HOT 1
- Possible to read but can't send data. HOT 28
- Raspberry Pi wiring example issue HOT 1
- CAN messages dropped, sometime receiving message up to six times HOT 9
- STM32F103C8T6 hangs on CANInit(CAN_1000KBPS, 2) HOT 3
- STM32F103 gets stuck inside while (!(CAN1->MSR & 0x1UL)); HOT 26
- Send Fail on STM32F407VE HOT 15
- how is Serial and CAN being used simultaneously in STM32F103? HOT 3
- STM32F413ZH NUCLEO-F413ZH HOT 13
- CAN on STM32G4 series HOT 1
- Discuss: other ways to clear mailbox? HOT 1
- Mistake in Line 277 HOT 5
- STM32F042F6P6TR HOT 1
- feature request: support multiple transmit mailboxes HOT 12
- BARTH STG-850 Support HOT 5
- Unable to communicate STM32f103 vs ESP32 via CAN BUS HOT 2
- Sending data issue HOT 9
- dlc bigger than 8 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-stm32-can.