Enable can bus on ZEPHYR for IMX8MP

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Enable can bus on ZEPHYR for IMX8MP

1,074件の閲覧回数
afernandezro
Contributor I

Hello,

I'm currently developing an application that needs to use the CAN bus and other buses like I2C, SPI, etc. My application needs to use one core of the A53 processor included in the IMX8MP processor over an RTOS. I'm trying to enable the flexcan1 interface by adding it to the .dtsi file:

 


flexcan1: can@308c0000 {
compatible = "nxp,flexcan";
reg = <0x308c0000 0x10000>;
interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
interrupt-parent = <&gic>;
clocks = <&ccm IMX_CCM_CAN_CLK 0x68 14>;
clk-source = <2>;
status = "okay";
pinctrl-names = "default";
};

But when I try to compile a sample CAN bus application for this processor, several errors occur related to the clock and the IRQ:


zephyrproject/zephyr/drivers/clock_control/clock_control_mcux_ccm.c:276:49: error: 'kCLOCK_CanMux' undeclared (first use in this function); did you mean 'kCLOCK_Can2'?
276 | uint32_t can_mux = CLOCK_GetMux(kCLOCK_CanMux);

zephyrproject/zephyr/drivers/clock_control/clock_control_mcux_ccm.c:279:50: error: 'kCLOCK_PllUsb1' undeclared (first use in this function); did you mean 'kCLOCK_Pll'?
279 | *rate = CLOCK_GetPllFreq(kCLOCK_PllUsb1) / 8

zephyrproject/zephyr/drivers/can/can_mcux_flexcan.c:1428:64: error: 'FLEXCAN_IRQ_CONFIG_CODE' undeclared (first use in this function)
1428 | DT_INST_FOREACH_PROP_ELEM(id, interrupt_names, FLEXCAN_IRQ_CONFIG_CODE);

Could you tell me how to enable the can bus interface for my project?

0 件の賞賛
返信
1 返信

1,045件の閲覧回数
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Please note that support for zephyr is community based, not direct from NXP. I'll recommend for issue using zephyr in the i.MX MPUs post them at zephyr community.

Best regards/Saludos,
Aldo.

0 件の賞賛
返信