2020-10-26 09:29 AM
Hello, I have been trying to interface a HTS221 3 wire spi sensor with my STM32 Master.
I need to use my master as bidirectional because I'm already communicating with another sensor.
I have found a solution which was shorting miso and mosi together with a 1k resistor. Doing this i could interface with bidirectional master but as I have the miso and mosi shorted I am always reading what i send for example: I want to read what is inside register 0x0f so i send 0x0f to the slave and i read 0x0f, afterwards i send a dummy byte and i read the dummy byte instead of what was inside the register 0x0f.
I have heard about bit banging but I have no idea how to implement it in a easy way as im a newbie in SPI.
Thank you for your time!