This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335X使用SPI接口时cs脚无信号输出的问题

Other Parts Discussed in Thread: AM3352

大家好,我的板子是AM3352,SDK包为ti-processor-sdk-linux-am335x-evm-03.02.00.05,我使用SPI接口外挂一个芯片,硬件上使用的是A13 B13 D12 C12,硬件连接图如下:

dts文件配置如下:

spi1_pins: spi1_pins {
pinctrl-single,pins = <
0x190 ( PIN_INPUT_PULLUP |PIN_INPUT | MUX_MODE3 ) /* (A13) mcasp0_aclkx.spi1_sclk */
0x194 ( PIN_INPUT_PULLUP |PIN_INPUT | MUX_MODE3 ) /* (B13) mcasp0_fsx.spi1_d0 */
0x198 ( PIN_INPUT_PULLUP |PIN_OUTPUT | MUX_MODE3 ) /* (D12) mcasp0_axr0.spi1_d1 */
0x19c ( PIN_INPUT_PULLUP |PIN_OUTPUT | MUX_MODE3 ) /* (C12) mcasp0_ahclkr.spi1_cs0 */
>;
};

&spi1 {
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins>;
status = "okay";

spidev1: spi@0 {
compatible = "linux,spidev";
reg = <1>;
spi-max-frequency = <24000000>;
};
};

内核配置如下:

--- SPI support │ │
│ │ [ ] Debug support for SPI drivers │ │
│ │ *** SPI Master Controller Drivers *** │ │
│ │ < > Altera SPI Controller │ │
│ │ < > Utilities for Bitbanging SPI masters │ │
│ │ < > Cadence SPI controller │ │
│ │ < > GPIO-based bitbanging SPI Master │ │
│ │ < > Freescale SPI controller and Aeroflex Gaisler GRLIB SPI controller │ │
│ │ < > OpenCores tiny SPI │ │
│ │ <*> McSPI driver for OMAP │ │
│ │ <*> DRA7xxx QSPI controller support │ │
│ │ < > PXA2xx SSP SPI master │ │
│ │ < > Rockchip SPI controller driver │ │
│ │ < > NXP SC18IS602/602B/603 I2C to SPI bridge │ │
│ │ < > Analog Devices AD-FMCOMMS1-EBZ SPI-I2C-bridge driver │ │
│ │ < > Xilinx SPI controller common module │ │
│ │ < > Xilinx ZynqMP GQSPI controller │ │
│ │ < > DesignWare SPI controller core support │ │
│ │ *** SPI Protocol Masters *** │ │
│ │ <*> User mode SPI device driver support │ │
│ │ < > Infineon TLE62X0 (for power switching)

然后编译后在目标板上运行,dev目录下产生spidev1.1,但是使用测试程序进行测试时发现无法从芯片读取数据,直接短接SPI1_D0和SPI1_D1时可以将发送出去的数据收回来,使用示波器观察SPI1_SCLK和SPI1_CS0,发现在读写时SCLK有信号输出,但是CS0却一直是低电平,这是什么原因呢?请大神们给点意见!