mcp2515驱动函数调用记录

///////////////////////////////////////////////////////////////////////////
[root@TE6410 disk]# insmod mcp251x.ko 
[  245.400000] mcp251x init..
[  245.400000] mcp251x_can_probe..
[  245.400000] mcp251x: setup gpio pins CS and External Int
[  245.410000] mcp251x_hw_probe..
[  245.410000] mcp251x_hw_reset..
[  245.430000] mcp251x_read_reg..
[  245.430000] mcp251x_spi_trans..
[  245.440000] .... val:128
[  245.440000] mcp251x_read_reg..
[  245.440000] mcp251x_spi_trans..
[  245.440000] .... val:128
[  245.440000] mcp251x_read_reg..
[  245.440000] mcp251x_spi_trans..
[  245.450000] .... val:135
[  245.450000] mcp251x_hw_sleep..
[  245.450000] mcp251x_write_reg..
[  245.460000] mcp251x_spi_trans..
[  245.460000] mcp251x spi1.0: probed

///////////////////////////////////////////////////////////////////////////
[root@TE6410 disk]# up link set can0 up type can bitrate 250000
[  183.720000] mcp251x_open..
[  183.720000] mcp251x_hw_reset..
[  183.730000] mcp251x_read_reg..
[  183.730000] mcp251x_spi_trans..
[  183.730000] .... val:128
[  183.730000] mcp251x_setup..
[  183.730000] mcp251x_do_set_bittiming..
[  183.740000] mcp251x_write_reg..
[  183.740000] mcp251x_spi_trans..
[  183.740000] mcp251x_write_reg..
[  183.750000] mcp251x_spi_trans..
[  183.750000] mcp251x_write_bits..
[  183.750000] mcp251x_spi_trans..
[  183.750000] mcp251x_read_reg..
[  183.760000] mcp251x_spi_trans..
[  183.760000] .... val:0
[  183.760000] mcp251x_read_reg..
[  183.770000] mcp251x_spi_trans..
[  183.770000] .... val:181
[  183.770000] mcp251x_read_reg..
[  183.770000] mcp251x_spi_trans..
[  183.780000] .... val:1
[  183.780000] mcp251x spi1.0: CNF: 0x00 0xb5 0x01
[  183.780000] mcp251x_write_reg..
[  183.790000] mcp251x_spi_trans..
[  183.790000] mcp251x_write_reg..
[  183.790000] mcp251x_spi_trans..
[  183.800000] mcp251x_set_normal_mode..
[  183.800000] mcp251x_write_reg..
[  183.800000] mcp251x_spi_trans..
[  183.810000] !!! put device into loopback mode!
[  183.810000] mcp251x_write_reg..
[  183.810000] mcp251x_spi_trans..

///////////////////////////////////////////////////////////////////////////
[root@TE6410 disk]# ./can_client 
can0 can_ifindex = 3[  233.270000] mcp251x_hard_start_xmit..
[  233.270000] mcp251x_tx_work_handler..
[  233.270000] mcp251x_hw_tx..
[  233.270000] mcp251x_hw_tx_frame..
[  233.280000] mcp251x_spi_trans..
[  233.280000] mcp251x_write_reg..
[  233.280000] mcp251x_spi_trans..
[  233.290000] mcp251x_can_ist..
[  233.290000] mcp251x_read_reg..
[  233.290000] mcp251x_spi_trans..
[  233.300000] .... val:5
[  233.300000] mcp251x_hw_rx..
[  233.300000] mcp251x_hw_rx_frame..
[  233.300000] mcp251x_spi_trans..
[  233.310000] mcp251x_write_bits..
[  233.310000] mcp251x_spi_trans..
[  233.310000] mcp251x_write_bits..
[  233.320000] mcp251x_spi_trans..
[  233.320000] mcp251x_read_reg..
[  233.320000] mcp251x_spi_trans..
[  233.330000] .... val:0
[  233.330000] mcp251x_write_reg..
[  233.330000] mcp251x_spi_trans..
[  233.330000] mcp251x_read_reg..
[  233.340000] mcp251x_spi_trans..
[  233.340000] .... val:0
[  233.340000] mcp251x_write_bits..
[  233.350000] mcp251x_spi_trans..
[  233.350000] mcp251x_read_reg..
[  233.350000] mcp251x_spi_trans..
[  233.360000] .... val:0
[  233.360000] mcp251x_write_reg..
[  233.360000] mcp251x_spi_trans..

Send a CAN frame from interface can0

///////////////////////////////////////////////////////////

[root@TE6410 disk]# ./can_server 
can0 can_ifindex = 3
------------------ [1]waiting can data.. ----------------
[  129.890000] mcp251x_hard_start_xmit..
[  129.890000] mcp251x_tx_work_handler..
[  129.890000] mcp251x_hw_tx..
[  129.890000] mcp251x_hw_tx_frame..
[  129.900000] mcp251x_spi_trans..
[  129.900000] mcp251x_write_reg..
[  129.900000] mcp251x_spi_trans..
[  129.910000] mcp251x_can_ist..
[  129.910000] mcp251x_read_reg..
[  129.910000] mcp251x_spi_trans..
[  129.910000] .... val:5
[  129.920000] mcp251x_hw_rx..
[  129.920000] mcp251x_hw_rx_frame..
[  129.920000] mcp251x_spi_trans..
[  129.930000] mcp251x_write_bits..
[  129.930000] mcp251x_spi_trans..
[  129.930000] mcp251x_write_bits..
[  129.940000] mcp251x_spi_trans..
[  129.940000] mcp251x_read_reg..
[  129.940000] mcp251x_spi_trans..
[  129.940000] .... val:0
[  129.950000] mcp251x_write_reg..
[  129.950000] mcp251x_spi_trans..
[  129.950000] mcp251x_read_reg..
[  129.960000] mcp251x_spi_trans..
[  129.960000] .... val:0
[  129.960000] mcp251x_write_bits..
[  129.970000] mcp251x_spi_trans..
[  129.970000] mcp251x_read_reg..
[  129.970000] mcp251x_spi_trans..
[  129.970000] .... val:0
[  129.980000] mcp251x_write_reg..
[  129.980000] mcp251x_spi_trans..
Received a CAN frame from interface can0
frame message
--can_id = 123
--can_dlc = 5
--data = hello
------------------ [2]waiting can data.. ----------------
Received a CAN frame from interface can0
frame message
--can_id = 123
--can_dlc = 5
--data = hello
------------------ [3]waiting can data.. ----------------


你可能感兴趣的:(UP,360,interface,disk)