Giter Site home page Giter Site logo

Comments (15)

bdamarjati avatar bdamarjati commented on August 25, 2024 1

mine's already work so i think i'm going to close the issue now

thanks

from arduino-stm32-can.

nopnop2002 avatar nopnop2002 commented on August 25, 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.
  • 3.3V transceiver and 5V transceiver are mixed.
    +1V Ground Shift using Split Termination.
    Check here.
  • 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.
  • Noise effects.
    It occurs when the wire cable is thin or wire cable is crossing.
    It is preferable to use wires that are noise-proof.

Arduino core support for STM32 based boards uses different clock frequencies depending on the Board Part Number.
BlackPill & BluePill use 72Mhz.
Generic F103 board use 64Mhz instead of 72Mhz.

You can use the F_CPU macro to check the actual frequency
I don't have an STM32F407VE discovery board, but this frequency may not be 168MHZ.
Try building with these.
genericSTM32F407xxxx
black_f407xx

from arduino-stm32-can.

bdamarjati avatar bdamarjati commented on August 25, 2024

i already double check the frequency, and it was 168mhz... i also change the clock to 72mhz the same as bluepil and still get send fail output...

i try the connection using bluepil it was running well, so i think there aren't any problem whatsoever in the conection and the receiver side

may i know what clock speed you use for the F407 one? maybe the problem was on the cpu clock

from arduino-stm32-can.

bdamarjati avatar bdamarjati commented on August 25, 2024

this is the STM32F407VE that i used
20230210_170005.jpg

from arduino-stm32-can.

nopnop2002 avatar nopnop2002 commented on August 25, 2024

Are you using the Arduino IDE?
Or PlatformIO are you using?

from arduino-stm32-can.

bdamarjati avatar bdamarjati commented on August 25, 2024

im using arduino ide with stm32 core that you included here as the reference

from arduino-stm32-can.

nopnop2002 avatar nopnop2002 commented on August 25, 2024

i want to see your build options
This is my build option.
f407

from arduino-stm32-can.

bdamarjati avatar bdamarjati commented on August 25, 2024

mine are the same as yours but using serial as the upload method

from arduino-stm32-can.

nopnop2002 avatar nopnop2002 commented on August 25, 2024

it's definitely a wiring issue.
In your picture it looks like the CAN bus stub length is long

Can packets from other nodes be received correctly?

from arduino-stm32-can.

bdamarjati avatar bdamarjati commented on August 25, 2024

the initializing is success but the transmitting is the issue, so i think the board can detect the transceiver module but fail when sending/receiving message

i use awg 24 cable for the stub, it's roughly 20cm long

from arduino-stm32-can.

bdamarjati avatar bdamarjati commented on August 25, 2024

i try to receive packet from other can bus device with the same baudrate, and there aren't any message receive on STM32F407VE
here's my serial monitor on arduino (left one is receiver and the right one is transmitter)
image

from arduino-stm32-can.

nopnop2002 avatar nopnop2002 commented on August 25, 2024

One hint is that the sender did not detect the transmission failure.
A sender detects a send failure when it cannot send.
Try this with F103.

from arduino-stm32-can.

bdamarjati avatar bdamarjati commented on August 25, 2024

oh hi thank for the reply, i already checked using F103 send to F407, the output is Send Fail on F103 and blank on F407

the thing is, i check the wiring using F103 send to Arduino Nano is running well

any idea about this issue?

from arduino-stm32-can.

nopnop2002 avatar nopnop2002 commented on August 25, 2024

There have been many reports of F103 sending failures in the past.
Most of them can receive but fail to send.

AtMega328 uses a 5V transceiver.
STM32 uses a 3.3V transceiver.
This difference is related to the value of the terminating resistor.

Transmission failures on F103 were mostly due to termination resistors or cable quality.

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.
  • 3.3V transceiver and 5V transceiver are mixed.
    +1V Ground Shift using Split Termination.
    Check here.
  • 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.
  • Noise effects.
    It occurs when the wire cable is thin or wire cable is crossing.
    It is preferable to use wires that are noise-proof.

I changed the single wire to twisted wire. It's fixed.
CAN-SendFail

from arduino-stm32-can.

bdamarjati avatar bdamarjati commented on August 25, 2024

okay thank for the reply, i managed to make it work somehow

turns out it was the can speed, possibly because of the signal frequency on F407 is higher or some kind of thing, so i used half can bus speed of the receiver

e.g: Arduino (receiver) using 500kbps on F407 (sender) using 250kbps and vice versa in order to make the transmission work, at least in my case

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.