Hello community,
I want to use 2 flexCAN devices on Colibri iMX8QXP.
First should be used from M4 (freertos) and second from A35 (linux).
We’ve got own carrier board and already tested both CAN devices are usable from linux and they’re working great.
For the M4 I looked on example flexcan/interrupt_transfer and bumped on issues which leads to HardFault_handler in freertos.
It looks that we’ve got problem in device tree, bacause when I do not boot linux in u-boot, CAN from M4 is working well. During the linux booting I got HardFault_handler in M4. So this leads me to bad usage of something in linux part…
We’re using flexcan1 (pins 32/34) and flexcan2 (pins 55/63), flexcan1 is used by M4.
Updating device tree is done in u-boot - completely removing flexcan1 node:
fdt rm /can@5a8d0000
We use this even for lpuarts to have debug console out from M4 and it works perfectly.
[Update] Just figured out that if I remove both CAN devices from device-tree, I can boot linux and CAN from M4 works well
fdt rm /can@5a8e0000 && fdt rm /can@5a8d0000
[Update] We’re using BSP 3.0.4 / 4 (we couldn’t update to higher version on v1.0B). Found some problems in device-tree which are corrected in BSP 5. Also figured out, that all flexcan devices uses the same clocks. Suppose that this should be the problem. Are we able to set clock only once for all devices? And from each of CPUs? E.g. when M4 boots, set it there and linux wouldn’t set it then. But when M4 doesn’t boot, set clocks during linux boot?
So my questions are:
- Is this even possible - to use one flexcan from linux and second one from M4?
- What should I edit in device-tree to make this work?
I have already read some questions here mentioning pinmux & clock settings.
Should I change something in device-tree or use something else than was used in the example for M4?
Thank You.
Kind regards