2020-02-19 10:44 AM
Hello,
I have the stm32mp157c-dk2 board and have connected two CAN Bus transceivers to it.
FDCAN1 is assigned to the A7 CPU and the FDCAN2 is assigned to the M4 CPU.
Both transmitters are connected to the same CAN bus. There is also a 3rd device connected to the same can bus.
When there is very low traffic on the can bus everything is fine.
All messages from all 3 CAN nodes can be received correctly everywhere.
When there gets little more traffic on the bus then the FDCAN2 on the M4 CPU starts to transmit wrong frames.
Also when the traffic goes low again the problem stays the same until reboot of the M4 CPU.
It is also hard to reproduce the issue. It sometimes takes a few hours or days for the issue to happen.
Here is the data on the bus when everything is ok:
# candump can0
can0 10000681 [3] 0A 00 05 <- Data from M4 CPU
can0 10000682 [3] 0A 00 19 <- Data from M4 CPU
can0 1810A080 [8] 80 00 00 18 00 01 00 00 <- Data from 3rd device
can0 18E050E5 [8] 00 00 00 00 08 00 00 00 <- Data from 3rd device
can0 02200000 [8] 10 04 00 00 00 00 00 00 <- Data from A7 CPU
can0 02200000 [8] 12 00 00 00 00 00 00 00 <- Data from A7 CPU
Here is the data on the bus when the M4 CPU gets a problem (all devices are still sending exactly the same frames):
# candump can0
can0 1F080681 [3] remote request <- Data from M4 CPU
can0 1F080682 [3] remote request <- Data from M4 CPU
can0 1810A080 [8] 80 00 00 18 00 01 00 00 <- Data from 3rd device
can0 18E050E5 [8] 00 00 00 00 08 00 00 00 <- Data from 3rd device
can0 02200000 [8] 10 04 00 00 00 00 00 00 <- Data from A7 CPU
can0 02200000 [8] 12 00 00 00 00 00 00 00 <- Data from A7 CPU
So the CAN ID 0x10000681 is getting to 0x1F080681 and also the payload is lost.
It looks like something goes wrong in the M4 can bus memory.
Any ideas?
2020-04-21 07:41 PM
Hi, Artem,
could you share you source code(especially the code of M4 in STM32CubeIDE & the dts files of linux system) on the github.
on my board, the FDCAN1 can work in engineering mode. I use the STM32CubeIDE to generate the ELF file, then I copy the ELF file to the linux system , and run the ELF file by the shell, but it can't work.
thanks!
best regards
2023-02-01 07:08 AM
Hi @Artem , I have the same issue here, I'm trying to use fdcan in m4, and i upload an new device tree which is generated by stm32cudeide, However nothing to seem to work, even though it's working in engineering mode.
what do you think is the problem?
I notice the clock is not enabled when I'm looking to clock summary
2023-02-01 07:11 AM
this the section for fdcan that is generated by stm32cudeide