2024-08-27 11:20 PM - last edited on 2024-08-27 11:58 PM by Peter BENSCH
I'm currently working on an embedded project with stm32f469 microcontroller and trying to communicate with dps368 sensor using SPI communication. DPS368 is operating in mode 3 and now I'm facing an issue where I'm not receiving any data when I'm transmitting a command (0x8D) to get dps368's id. All I get is a flat line (0x00) for the MISO line from my logic analyzer.
Also, I noticed that when I'm in mode 3 (In the stm32cubdeide: CPOL high, CPHA 2Edge), the clock is not operating based on the expected operation of SPI communication. The expected operation of SPI in mode 3 is that when the chip select that's idle high is triggered (changes state to low), the clock will start with a high-level pulse. What I'm getting is, for the first time of transmission of the data, the clock is still initially low even if the chip select already changed its state to low. The clock will only become initially high when there's a transmission of data.
2024-08-28 06:38 AM
For the first issue, if the signal coming out of the STM32 looks good, then it's not an STM32 issue. Perhaps the DPS368 isn't powered or isn't hooked up correctly. Show the logic analyzer trace of what you're doing. Verify the chip you're talking to is powered correctly and soldered correctly. Is this all on a custom board?
For the second issue, the SCK line isn't being driven until the peripheral is active. Send 1 byte with CS high to initialize the peripheral.