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.

关于DM8127 SPI问题



大家好,

      我使用的APPRO软件版是DM8127_IPNC_3.50.00,在我们的硬件上有s25fl256s的SPI flash。使用spi0,cs0.

1,硬件使用的是SPI0,CS使用的是SPI0_CS0。在U-boot可以正常读写。

2,在linux中,在board-ti8148ipnc.c配置如下:

struct spi_board_info __initdata ti8148_spi_slave_info[] = {
{
.modalias = "m25p80",//.modalias = "m25p80", spansion
.platform_data = &ti8148_spi_flash,
.irq = -1,
.max_speed_hz = 48000000,
.bus_num = 1,/*挂在SPI0上,片选为cs0*/
.chip_select = 0,
.mode =SPI_MODE_3,
},
};

在读取调用tmp = spi_write_then_read(spi, &code, 1, id, 3);读取flash ID时,读出来的全部是FF。我把spi的发送和接收的脚短接在一起,自发自收是正常的,说明spi驱动是正常的。是怎么回事啊?是不是DM8127_IPNC_3.50.00中SPI驱动有问题?