Hi Nordic team,
I'm currently facing a bit of a snag while trying to establish communication between the nRF52840 (NCS 2.5.0) and the MS5540C sensor using a 3-wire SPI protocol (note that the device doesn't require a ‘Chip select’ signal).
Here's the setup: I'm using SPI MODE 0 (CPOL=0, CPHA = 0) to transmit commands to the sensor and SPIM MODE 1 to retrieve data from it.
However, I've hit a roadblock. It seems like the data I'm receiving in the buffer is consistently shifted by 1 bit. Take a look at the attached image - upon system boot, there's always a single clock pulse from low to high. Upon my analysis, it seems to be recognized as an SPIM pulse, leading to data misalignment.
The data I'm getting back is 0xC73C instead of the expected 0x8E79.
So, here's my question: Is there a way to keep the clock signal at the low level by default after powering on the system? Or perhaps, is there a method to reset the receiver MISO counter or buffer?
Any insights or suggestions would be highly appreciated.
Thanks a bunch.
3603.SPIM shift clock mode 0.sal