Giter VIP home page Giter VIP logo

Comments (16)

ciamia avatar ciamia commented on June 15, 2024 1

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.

ciamia avatar ciamia commented on June 15, 2024 1

Yes, I used USB as a serial port

from arduino-stm32-can.

nopnop2002 avatar nopnop2002 commented on June 15, 2024

It is work fine with stm32F405/406.

https://github.com/nopnop2002/Arduino-STM32-CAN/tree/master/stm32f407

from arduino-stm32-can.

ciamia avatar ciamia commented on June 15, 2024

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.

nopnop2002 avatar nopnop2002 commented on June 15, 2024

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.

nopnop2002 avatar nopnop2002 commented on June 15, 2024

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.
CAN-SendFail

from arduino-stm32-can.

ciamia avatar ciamia commented on June 15, 2024

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.

ciamia avatar ciamia commented on June 15, 2024

And I tried the code you said it works perfectly. My UART-USB converter connection is fine.

from arduino-stm32-can.

ciamia avatar ciamia commented on June 15, 2024

My problem isnt solved. Only Serial connection is ok. But communication problem continious.

from arduino-stm32-can.

ciamia avatar ciamia commented on June 15, 2024

I really need to try the arduino code you used.

from arduino-stm32-can.

nopnop2002 avatar nopnop2002 commented on June 15, 2024

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.

ciamia avatar ciamia commented on June 15, 2024

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.

nopnop2002 avatar nopnop2002 commented on June 15, 2024

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.
CAN-SendFail

from arduino-stm32-can.

nopnop2002 avatar nopnop2002 commented on June 15, 2024

1000KBPS is susceptible to noise.

Try it at 250KBPS or 500KBPS.

from arduino-stm32-can.

nopnop2002 avatar nopnop2002 commented on June 15, 2024

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.

nopnop2002 avatar nopnop2002 commented on June 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.