SPI MISO on Verdin Eval Board


I have a Verdin Development Board with an IMX8M Mini module and try to setup a SPI connection with an external Slave.
I try to connect a SPI slave (ET1100 from Beckhoff) via SPI1 (ecspi2) to the IMX8M mini. The four SPI signals (MOSI, MISO, CLK and CS) are routed from the connector X7 via the level shifter X40 (3,3V <-> 1,8V) to the SPI Slave which is in the 3,3V domain. As the imx8m mini does not support 3,3V I have to levelshift all signals.
The signals from the IMX8 (Master) Clock, MOSI and CS look fine but the response from the slave (MISO) is somehow tied to 0V with some sporadic high bits from time to time, but it does not behave really deterministic. The bits also do not reflect the real data that I should receive.
When I disconnect the MISO line from the IMX8 the signal looks fine on the oscilloscope: MISO is always high except while transmitting data to the master (the data looks correct and the signal after the level shifter, on the 1.8V side is fine).
The corresponding pad is configured in the devicetree with 0x1c4 which means: Pull-up is enabled and shmitt-trigger is used. (When I connect 1,8V VDD I read in 0xff what looks correct.)

Due to the pull-up of the input pad and the signal I saw on the oscilloscope when MISO was not connected to the IMX8, I’d expect the signal to be 1,8V when no transmission is done. But the opposite is the case. As soon as I connect it to the IMX8 the signal is down at 0V and only goes to 1,8V sporadically.

Do I miss some configuration here? Or did I miss something in the wiring?
Any ideas?

Thx and BR,

It’s hard to say something without seeing details about your wiring, level shifter schematics and ET1100 datasheet.

hey, I added the requested information to the answer section of the post. thx

Greetings @Ralph!

Is there any external pull resistor on the MISO line? Do you have any other SPI device you can test this with?

Hi @gustavo.tx ,
no there is no external pull resistor on the MISO line.
For me it seems as if the bi-directional level shifter might drive to the wrong direction. But I do not know why and how to solve it. Is there any other possibility to connect the 3v3 signals to the imx8m mini pads?
I also tried another SPI device on ECSPI1 with the same pad config but I get issues there as well…
BR Ralph


Unfortunately there’s no other way to connect 3v3 signals to the 1v8 pads other than level shifting. Is it possible for you to try this with another level shifter? Just to make sure it’s not the source of the issues.

@gustavo.tx, Unfortunately I do not have other level shifters right now. I’m curious if anybody faced issues with that level-shifters on the verdin eval-board yet?

Hi again,

here are some more infos about the issue and the schematic of the circuit. The level shifter from the Verdin Devel Board has been used:
alt text

The ET1100 datasheet can be found here (SPI page 55ff):

SPI signals with open (unconnected) MISO connection to IMX8 look fine:

(blue: MISO, green: CS, brown: MOSI, red: CLK)
alt text

But when the MISO is connected to the IMX8:
alt text

thx for any hints,

BR Ralph

@gustavo.tx, did you get some feedback from the hardware team reagarding similar issues with SPI connections?

Hi @Ralph,
I am from the Toradex HW development team. I do not remember seeing this specific issue with the SPI interface and the level shifters. However, we have seen issues with these bi-directional level shifters on the Verdin Development Board. Therefore, we have replaced some of the bidirectional shifters with unidirectional on the latest version of the Verdin Development Board.

To detect the direction, the bidirectional level shifter needs to have a difference in the low level between the input and the output. The output needs to be slightly higher than the input. This is normally the case if there is no extensive load or special circuit on the output of the shifter. The Verdin SoC pins can have a keeper function enabled. This is a function that keeps inputs actively stable at one level until it is forced to be driven to the other side. This keeper can cause issues with the bidirectional level shifter since it forces the output to a lower level, and therefore, the direction cannot be detected anymore.

Can you check whether the keeper function is enabled at the MISO signal? I recommend you disable the keeper function. Maybe enable the pull-up function instead. Please let us know whether this has resolved the issue.

I would always replace bidirectional level shifters with unidirectional ones in a final design if you have a defined signal direction. The performance and signal levels of unidirectional level shifters are better.

Hi @peter.tx,
thanks for your answer! I tried to find a configuration for the keeper in the IMX8M Mini reference manual but except the pull-up/down, hystheresis and open-drain configuration for the IOMUX pads, I could not find a keeper config there. Is the keeper config available in the imx8m mini? Could you point me to the setting that you are referring, please?
BR, Ralph

Hi @Ralph, you are actually right. The i.MX 8M Mini does not seem to have a keeper function. I was mixing it up with the i.MX 8X. It would have made perfect sense if this keeper was enabled. I searched in the reference manual for “keeper” and could also not find any information about this setting.

The question is why the bidirectional level shifter still has issues detecting the direction. I guess you have already checked whether disabling/enabling the pull-up/down resistors to make any difference.

Maybe you can do the following tests: instead of connecting the 3.3V side to the SPI device, connect it either to GND or 3.3V and measure the output side of the level switcher if the pin is connected to the module or left floating. Do you see a difference in the low or high level? I am especially interested to see what the shifter output level is if the shifter input is low. Is the level lower if the module pin is connected or not. Unfortunately, I am currently in the home office and do not have the hardware for measuring it myself.

Hi @peter.tx, we do not see the issue on our PCB prototype any more. So it must have been related to the experimental setup with long wires in combination with the bi-directional levelshifters from the eval board. We use other levelshifters on our PCB now and it works fine. But Uni-directional level shifters would be a nice to have on the Eval Board in order to rule out error sources.

Good to know that your issue is solved. Thanks for your Input.