交強險未出險第二年為什么沒優惠?第一年不出險第二年打幾折?
2023-06-10 22:29:22
(相關資料圖)
CONFIG_CAN=yCONFIG_CAN_DEV=yCONFIG_CAN_ROCKCHIP=yCONFIG_CANFD_ROCKCHIP=y
內核配置:cd kernelmake ARCH=arm64 menuconfigmake savedefconfig
選擇:Networking support ---> CAN bus subsystem support ( )--->CAN Device Drivers() ---> Platform CAN drivers with Netlink support(*)interrupts = ;
轉換完成,產生中斷信號。
clock
時鐘屬性,用于驅動開關clk,reset屬性,用于每次復位總線。
pinctrl
can1: can@fea60000 { compatible = "rockchip,can-2.0"; reg = < 0x0 0xfea60000 0x0 0x1000 >; interrupts = < GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH >; clocks = < &cru CLK_CAN1 >, < &cru PCLK_CAN1 >; clock-names = "baudclk", "apb_pclk"; resets = < &cru SRST_CAN1 >, < &cru SRST_P_CAN1 >; reset-names = "can", "can-apb"; pinctrl-names = "default"; pinctrl-0 = < &can1m0_pins >; tx-fifo-depth = < 1 >; rx-fifo-depth = < 6 >; status = "disabled"; };
compatible = “rockchip,can-1.0” ,rockchip,can-1.0用來匹配can控制器驅動。compatible = “rockchip,can-2.0” ,rockchip,can-2.0用來匹配canfd控制器驅動。assigned-clock-rates用來配置can的始終頻率,如果CAN的比特率低于等于3M建議修改CAN時鐘到100M,信號更穩定。高于3M比特率的,時鐘設置200M就可以。pinctrl配置:根據實際板卡連接情況配置can_h和can_l的iomux作為can功能使用。/* can1 */&can1 { status = "okay"; assigned-clocks = < &cru CLK_CAN1 >; assigned-clock-rates = < 200000000 >; pinctrl-names = "default"; pinctrl-0 = < &can1m1_pins >; //根據原理圖配置};
由于系統根據上述dts節點創建的CAN設備只有一個,而第一個創建的設備為CAN0ifconfig -a
CAN啟動ip link set can0 down //關閉CANip link set can0 type can bitrate 500000 //設置?特率500KHzip -details -statistics link show can0 //打印can0信息ip link set can0 up //啟動CAN
CAN發送cansend can0 123#DEADBEEF //發送(標準幀,數據幀,ID:123,date:DEADBEEF)cansend can0 123#R //發送(標準幀,遠程幀,ID:123)cansend can0 00000123#12345678 //發送(擴展幀,數據幀,ID:00000123,date:DEADBEEF)cansend can0 00000123#R //發送(擴展幀,遠程幀,ID:00000123)
CAN接收candump can0 //candump can0
審核編輯:湯梓紅
關鍵詞:
關于本站 管理團隊 版權申明 網站地圖 聯系合作 招聘信息
Copyright © 2005-2023 創投網 - www.extremexp.net All rights reserved
聯系我們:39 60 29 14 2@qq.com
皖ICP備2022009963號-3