2024-06-11 09:47 AM - last edited on 2024-06-12 02:33 AM by SofLit
Hello
I am having an weird issue and was hoping if someone could provide some guidance.
Hardware :
What works :
Issue :
What have i done to troubleshoot
Below are my FDCan Parmeters from ioc file.
FDCAN1.AutoRetransmission=ENABLE
FDCAN1.CalculateBaudRateNominal=444444
FDCAN1.CalculateTimeBitNominal=2250
FDCAN1.CalculateTimeQuantumNominal=187.5
FDCAN1.ClockCalibrationCCU=DISABLE
FDCAN1.DataPrescaler=2
FDCAN1.DataSyncJumpWidth=4
FDCAN1.DataTimeSeg1=10
FDCAN1.DataTimeSeg2=3
FDCAN1.FrameFormat=FDCAN_FRAME_CLASSIC
FDCAN1.IPParameters=CalculateTimeQuantumNominal,CalculateTimeBitNominal,CalculateBaudRateNominal,Mode,AutoRetransmission,FrameFormat,NominalSyncJumpWidth,DataSyncJumpWidth,DataTimeSeg1,DataTimeSeg2,StdFiltersNbr,RxBuffersNbr,RxBufferSize,TxEventsNbr,TxBuffersNbr,TxElmtSize,NominalPrescaler,NominalTimeSeg1,NominalTimeSeg2,DataPrescaler,RxFifo1ElmtsNbr,TxFifoQueueElmtsNbr,RxFifo0ElmtsNbr,ClockCalibrationCCU,ProtocolException
FDCAN1.Mode=FDCAN_MODE_NORMAL
FDCAN1.NominalPrescaler=8
FDCAN1.NominalSyncJumpWidth=1
FDCAN1.NominalTimeSeg1=6
FDCAN1.NominalTimeSeg2=5
FDCAN1.ProtocolException=ENABLE
FDCAN1.RxBufferSize=FDCAN_DATA_BYTES_12
FDCAN1.RxBuffersNbr=10
FDCAN1.RxFifo0ElmtsNbr=10
FDCAN1.RxFifo1ElmtsNbr=10
FDCAN1.StdFiltersNbr=0
FDCAN1.TxBuffersNbr=10
FDCAN1.TxElmtSize=FDCAN_DATA_BYTES_12
FDCAN1.TxEventsNbr=10
FDCAN1.TxFifoQueueElmtsNbr=10
can anyone please advise on what to do to make STM32 communication work with other CAN devices?
Solved! Go to Solution.
2024-06-12 10:26 AM
Don't forget to check:
SB72 and R5 should be soldered:
2024-06-12 08:12 PM - edited 2024-06-12 08:18 PM
Thank you once again for the response and all the help thus far!
I tried what you suggested, but seems like I am still missing something.
2024-06-12 09:17 PM
draw a block diagram of how you're connecting the H7/CAN transceiver to the Canable. Include the terminating resistors, ground reference. Is the terminating resistor on the Canable enabled?
Canable are made from all kinds of 3rd party vendors. Some have isolation circuits. Do you have V1, V1 Pro or V2 of the Canable? A link to the Canable would help.
2024-06-13 01:15 AM - edited 2024-06-13 10:19 AM
Hello,
"do I need to remove R5 and jump it?"
-> No need for that.
Could you please check with an oscilloscope the HSE frequency using MCO pin (PA8)? Do you get 8MHz?
I've attached your ioc file where I enabled MCO on PA8 to output a mirror of the HSE signal.
Need also to share with us more details about your HW, the transceivers part number (if possible the schematics of that part) you are using and as stated by @Karl Yamashita a block diagram of your connections and check the availability termination resistors at each node side: you need only two terminating resistors (no more nor less) of 120 ohm at both sides of the bus.
2024-06-14 06:13 PM
Hello,
Good evening,
Sorry I could not get back earlier.
Please see below for the transceivers and the schematics of the circuits.
Please note I don't have a scope, and I have just ordered one and will take me a couple days to report the results.
Meanwhile, can you please give me any other ideas to try? I am going to try again with a with a different baud rates, but other than that I don't have any other ideas...
Have a good evening!!
Thank you for all your help thus far!!
2024-06-14 06:57 PM
More than likely the level shifter is causing an issue. An oscilloscope will help determine what is going on.
Also, I assume that you didn't connect the 3.3V to ground as shown in the schematic?
2024-06-14 07:34 PM
Hi Karl,
Yea, in first image stm32 to stm32 where can bus works there was an error with wiring. please see attached revised.
In my opinion level shifter is not the culprit because stm32->stm32 can bus works. Would you not agree?
So to conclude, I will report how does HSE/MCO on PA8 mirror looks like tomorrow once the scope arrives.
Thank you!
2024-06-15 07:02 AM
Thanks @Karl Yamashita @SofLit
My Can BUS works. I think it was a combination of clock, Bit timing parameters, and (maybe) RCC Prescaler disabled.
Thank you soo very much!!