1.dts配置如下 &spi2 { status = "okay"; max-freq = <24000000>; spi_wk2xxx@00{ status = "disabled"; }; spi_test@00 { compatible = "rockchip,spidev"; reg = <0>; spi-max-frequency = <24000000>; pinctrl-names = "default"; pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0>; cs-gpio = <&gpio2 RK_PB4 GPIO_ACTIVE_HIGH>; }; }; &pinctrl { spi2 { spi2_clk: spi2-clk { rockchip,pins = <2 11 RK_FUNC_2 &pcfg_pull_up_3ma>; }; spi2_cs0: spi2-cs0 { rockchip,pins = <2 12 RK_FUNC_2 &pcfg_pull_up_3ma>; }; spi2_rx: spi2-rx { rockchip,pins = <2 9 RK_FUNC_2 &pcfg_pull_up_3ma>; }; spi2_tx: spi2-tx { rockchip,pins = <2 10 RK_FUNC_2 &pcfg_pull_up_3ma>; }; }; }; 2.利用spidev_test.c进行数据收发测试,在spi2的接口上插上逻辑分析仪,运行测试程序后,没有反应 |
-
114 Bytes, 下载次数: 1, 下载积分: 灯泡 -1 , 经验 -1