2026-04-10 6:45 AM
I am using the STEVAL-MKI238A kit with the LIS2DUX12 chip. This is connected to an NRF52840DK and interfaced using Zephyr's lis2dux12 driver. The eval kit is connected to the SPI3 device using its default settings. I am running an SPI clock of 1Mhz and the VDD and VDIO pins are supplied 1.85V+GND from a shared power supply with the nrf52840dk. The Zephyr lis2dux12 driver is hard coded to use SPI mode 3, so CPOL+CPHA.
The lis2dux12 driver fails its INIT sequence by mismatch of the WHO_AM_I readback. The device seemingly returns 0x0C.
I have connected a logic analyzer to the pins of the eval kit shows this sequence:
- 0x01 is written to register 0x3E to wake the device up from sleep
- Once the CS signal is disabled, 50ms passes before the next CS enable to allow the sensor to wake up
- A read request is made to register 0x8F (bit 7 read + 0x0F)
- The clock idles for 48.5µs before pulsing for the response
- The sensor effectively pulses 0000.1100b
- However the sensor seems to attempt to set a bit after the second clock falling edge that falls short of the minimum high level voltage of 0.7xVDD, which dies out before the clock rising edge where the master reads the line.
I have studied the datasheet, but am running out of ideas on why this is happening. Just to note, I have also attempted:
- Another STEVAL-MKI238A
- VDD and VDIO of 2.55V and 3.30V
- Supplying VDD/VDIO/GND from NRF52840DK header
- 125kHz, 500kHz, 1MHz, 5MHz, 10Mhz SPI frequencies
- SPI2 device on nrf
- Different pin mappings than default
- Disconnecting the SDA line from the eval kit does not affect the reading on the logic analyzer so interference from the nrf dk MISO pin is unlikely
Any of the attempts listed returns the exact same result (but the SDA voltage ≃ VDIO, expect the small initial ~0.5V pulse which is the same regardless of VDD/VDIO).
Any help will be greatly appreciated.
Solved! Go to Solution.
2026-04-12 12:37 PM
tl;dr - SDO drive strength is weaker than anticipated
Okay, so after trying setting up the STEVAL-MKI238A to a NUCLEO-U575ZI-Q and seeing the exact same problem I reverted to an older setup method using a spring loaded bread board and jumper wires in stead of direct jumper wires from eval kit to mcu. And to my surprise the bread board setup was able to get 0x47 from the WHO_AM_I register! To see how the bread board affected the signal I hooked up my Saleae Logic Pro 8 again, just to find that the register read-back now returned to 0x0C...
So to conclude:
- Direct wires from eval kit to mcu for some reason seems to fail (as this was the initial only change from a working setup to a non-working setup)
- Stuffing the eval kit onto a breadboard and jumping from it seems better (unlikely but though proven to work better)
- Connecting the passive probe of the Saleae Logic Pro 8 apparently loads the SDO line to the point where it is no longer able to maintain the signal level. However the drive strength of the mcu MOSI line is stronger, so that was probably what masked the Saleae as loading the line(s) too much
I will definitely be looking into getting some analyzer with active probes after this ordeal.
2026-04-12 12:37 PM
tl;dr - SDO drive strength is weaker than anticipated
Okay, so after trying setting up the STEVAL-MKI238A to a NUCLEO-U575ZI-Q and seeing the exact same problem I reverted to an older setup method using a spring loaded bread board and jumper wires in stead of direct jumper wires from eval kit to mcu. And to my surprise the bread board setup was able to get 0x47 from the WHO_AM_I register! To see how the bread board affected the signal I hooked up my Saleae Logic Pro 8 again, just to find that the register read-back now returned to 0x0C...
So to conclude:
- Direct wires from eval kit to mcu for some reason seems to fail (as this was the initial only change from a working setup to a non-working setup)
- Stuffing the eval kit onto a breadboard and jumping from it seems better (unlikely but though proven to work better)
- Connecting the passive probe of the Saleae Logic Pro 8 apparently loads the SDO line to the point where it is no longer able to maintain the signal level. However the drive strength of the mcu MOSI line is stronger, so that was probably what masked the Saleae as loading the line(s) too much
I will definitely be looking into getting some analyzer with active probes after this ordeal.