I have some problems understanding SPI:
I am currently using STMF2xx to connect with FTDI UM232H, I will configure my STMF2xx into slave and FTDI into master.
But, I am having problem getting the data in my STM32 from the FTDI, but when I check my signal, I could see my MOSI (FTDI to STM32) signal is correct!
May I know what could be wrong?
But, isn't that my MISO line should be getting the same data as MOSI but is bit shifted? (am I right? isn't that SPI works like a shift register, whenever sends data into MOSI, the hardware will automatically output to MISO?)
My second question is, does it matter if my MOSI line is always LOW, but MISO line is always HIGH? Or do I need to setup that MOSI and MISO must be low/high initial, or MOSI high, MISO low?
My current configuration for my SPI is:
- 2 line duplex
- 1 Mhz clock
- Phase = Low
- Polarity = Positive
- Hardware: 4 lines connection, CS, SCLK, MOSI, MISO