AnsweredAssumed Answered

ECSPI5 Rx Problem

Question asked by Andre Labelle on Jan 22, 2019
Latest reply on Jan 24, 2019 by Andre Labelle

Hi,

 

I have a  RTC SPI device (PCF2123) connected to the i.MX6Q ECSPI5 peripheral. I'm using a GPIO to control the chip select.

 

A logic analyzer attached to the SCK,MOSI,MISO and CS pins show the external signals are good. I can read the current time and see the time increment on MISO.

 

The problem is the data received from the peripheral is always zero, even though I see the correct data on MISO.

 

I'm using:

u-boot: git://source.codeaurora.org/external/imx/uboot-imx.git imx_v2018.03_4.14.62_1.0.0_beta

linux: source.codeaurora.org/external/imx/linux-imx/ imx_4.14.62_1.0.0_beta

 

Here are some clues I have gathered:

-no problem if I downgrade to an older boundary u-boot (around 2014-12)

-if I put the peripheral in loopback mode, the tx data is received correctly (no longer rx all zeroes)

-same issue when using either the pcf2123 driver or the spidev driver

-the other ECSPIx peripherals are working fine

 

I tried comparing memory spaces (using memtool) between the working version (using the old u-boot) and non-working version.

ECSPI5 address space matches

IOMUX address had minor changes, new u-boot sets the drive strength to 48ohm instead of 40ohm on some pins

CCM address space matches

CCM analog, difference in CCM_ANALOG_PLL_ARM/CCM_ANALOG_PFD_528n

 

Thank you for reading this. Any hints or suggestions would be greatly appreciated.

Andre

Outcomes