Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
3 years, 3 months ago.
Why does the SPI clock end up in an uncertain state?
Hi, in my code here:
On my teensy 3.2 I get very odd behaviour.
Its test code, for reading the ROM off an MS5611 pressure sensor via SPI.
I reset the device, wait for it to reset. Then read each ROM address 0-7 (which fails - but ignore that). I pause for 1s between each read - just to see whats happening ...
Now the SPI CLK is also the pin with the Teensy LED is on.
The reset, and prom reads 0-6 and the clock seems fine (as much as you can wat a 1MHz clock!) and during the 1s pause, is low as expected for mode 0 SPI.
Whats odd though, is after prom 7, the clock ends up in an on state, e.g. the LED is illuminated.
Isn't this incorrect behaviour for Mode 0 SPI? So what is going wrong?