Hi!
I want to use SPI to read out a sensor with ESP IDF and freeRTOS.
The Problem is that the default state of MOSI (using logic analyzer)
is LOW whereas when I used arduino framework and Teensy 3.2 the default state was HIGH and it worked.
Where can I change this?
Cheers
Default state of MOSI
Re: Default state of MOSI
Howdy,
I'm afraid I don't understand (and its likely my problem). I have always assumed that an SPI slave ignored the incoming MOSI signal until its Chip Select (CS) was driven high and the clock pulse said "read MOSI". Until both of those are true, it shouldn't matter what signal appears on the MOSI line?
I'm afraid I don't understand (and its likely my problem). I have always assumed that an SPI slave ignored the incoming MOSI signal until its Chip Select (CS) was driven high and the clock pulse said "read MOSI". Until both of those are true, it shouldn't matter what signal appears on the MOSI line?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
-
- Posts: 37
- Joined: Mon Aug 28, 2017 10:25 am
Re: Default state of MOSI
Agree to kolban.
Some additions, ESP32 peripheral seems to keep the MOSI output of the last sent bit. If you really cares about the MOSI state when spi is inactive (CS high), please use some tricks to make sure the last bit is 1.
e.g. send 1 or 8 more ``0`` bits each transaction, or add a new device without CS line and use it to send fake transactions full of 0 after each real transactions.
Some additions, ESP32 peripheral seems to keep the MOSI output of the last sent bit. If you really cares about the MOSI state when spi is inactive (CS high), please use some tricks to make sure the last bit is 1.
e.g. send 1 or 8 more ``0`` bits each transaction, or add a new device without CS line and use it to send fake transactions full of 0 after each real transactions.
Who is online
Users browsing this forum: No registered users and 112 guests