STEVAL-MKI109D + STEVAL-MKI207V1: SPI transaction completes cleanly (HAL_OK) but MISO always reads 0xFF — CS/mode/clock all verified correct
Board: STEVAL-MKI109D (STM32H563ZI) + STEVAL-MKI207V1 adapter (ISM330DHCX)
Goal: Bare-metal custom firmware reading WHO_AM_I over SPI1
Following up on my earlier thread about GPIO pin mapping [link to old thread] — pin mapping is now resolved (SPI1_NSS on PA15, confirmed via community input; PA4/PA5 are DAC1 Vdd_set/VddIO_set as discussed). Thanks for the help getting there.
I'm now stuck on a different issue and would appreciate a sanity check. WHO_AM_I consistently reads 0xFF, but every layer I can verify from firmware/multimeter checks out correctly:
- CS on PA15 (GPIO output, confirmed via MODER/ODR register dump)
- SPI1 Mode 3 (CPOL=1, CPHA=1) — confirmed via CFG2 register decode
- SCK/MISO/MOSI on PB3/PB4/PB5, AF5 — confirmed via GPIOB MODER/AFRL dump
- VDD/VDDIO measured 3.3V at the DIL24 breakout header (J13/J14 area on JP1/JP2), in spec
HAL_SPI_TransmitReceivereturns HAL_OK, ErrorCode=0x0, every call — no timeout, no fault- Tested at both SPI_BAUDRATEPRESCALER_32 and _256 (extremes) — identical 0xFF result at both, ruling out clock-speed/level-shifter-timing issues
- Swept 9 additional candidate CS pins as a sanity check — all 0xFF
Given a clean, fault-free SPI transaction that consistently returns 0xFF regardless of clock speed, this looks like MISO simply isn't being driven — but I don't have a scope/logic analyzer to confirm signal activity directly at the DIL24 socket or on the T14/T15 level shifter outputs.
Specific questions:
- Is there anything specific about the T14/T15 (NTA4151PT1G) level-shifter circuit that requires a particular power-up sequence or reference voltage beyond VDD/VDDIO themselves — e.g. does
VddIO2(referenced near T15 in the schematic) need to be independently supplied, and if so, from where? - Is there a minimum CS-to-first-clock-edge setup time the ISM330DHCX needs that HAL_SPI_TransmitReceive might not guarantee back-to-back?
- Any other MCU-side signal (chip select gating, ready/busy line) specific to this adapter board that a from-scratch bare-metal implementation might be missing, that ProfiMEMS handles internally?
Happy to share full register dumps / relevant code snippets if useful. Appreciate any pointers — been systematically ruling things out for a while now and this is the one piece I can't verify without a scope.
