Hi @all,
I'm currently in the process of evaluating a new SoC for a project. For this i have the FRDM-MCXN947 evalboard. This includes a CAN-FD port. Please be aware that I'm new to Zephyr / MCXN.
On evaluating the CAN IP, i was unable to communicate with other devices. On checking with the scope, i've found that the bitrate is way out of spec (118kBit / 125kBit, 943kBit / 1000kBit). This is with my test application and the zephyr example (west flash frdm_mcxn947/mcxn947/cpu0 zephyr/samples/drivers/can/babbling/) so I would assume some kind of clock setup problem.
I've found the (seemingly) relevant parts as part of the evaboard (board.c) and the devicetree nxp_mcxnx4x_common.dtsi
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcan0))
CLOCK_SetClkDiv(kCLOCK_DivFlexcan0Clk, 1U);
CLOCK_AttachClk(kFRO_HF_to_FLEXCAN0);
#endif
flexcan0: can@d4000 {
compatible = "nxp,flexcan";
reg = <0xd4000 0x4000>;
interrupts = <62 0>;
interrupt-names = "common";
clocks = <&syscon MCUX_FLEXCAN0_CLK>;
clk-source = <0>;
status = "disabled";
};
None of the labels seem to be part of the zephyr OS. Can you give me a hint how to set this up correctly ?
Thank you for your help!