I am reading only 0x00 in ECSPI RXDATA register.
I am using iMX6 with BSP 4.1.0. Kernel version 3.0.35.
I am using spidev4.2 as master and mode =0.
I can see that SCK and MOSI are sending out correct data.
I can also see correct data in MISO line.
But the RXDATA register always reads 0. I put a printk in spi_imx_buf_rx_##type in spi_imx.c file.
#define MXC_SPI_BUF_RX(type) \
static void spi_imx_buf_rx_##type(struct spi_imx_data *spi_imx) \
{ \
unsigned int val = readl(spi_imx->base + MXC_CSPIRXDATA); \
printk(KERN_INFO"%s: %s: %d: rxdata = %u\n", __FILE__, __func__, __LINE__, val); \ \
if (spi_imx->rx_buf) { \
*(type *)spi_imx->rx_buf = val; \
spi_imx->rx_buf += sizeof(type); \
} \
}
Val always prints 0.
I am not able to figure out why.
I am send two bytes. 1st is command and 2nd byte is dummy(0x00). On sending the second byte I can see the correct response on MISO line but it doesn’t reflect in RXDATA register.
I am doing 16 bits-per-word burst transfer. Since one command-response sequence takes 2 bytes.
I did multiple 16bpw transfer. But still I read only 0x00 in RXDATA register.
Request some help for me.
Thanks!
I have the same issue on my IMX6DL sabresd board, my question link is :
https://community.freescale.com/thread/332450dd
can any one help me about this issue? thanks.
Hi Muthuswamy
actually there many i.MX6 processors: i.MXDQ,DLS,SL -
which one are you using ? Had you chance to test on Freescale
Reference boards: Sabre SDP/SDB/AI ?
Had you checked IOMUX settings, what pads were used, had
you checked if Daisy Chain involved in ECSPI input path ?
A resistor was not populated. That was causing the MISO line give correct output, but when looked closely, it could be observed that the amplitude of the data was ~1V. SO, the uC would read a 0 always. Solved.
chipexpert, thanks for your suggestions.
I have to complete it asap. Request your help.