3 wire SPI on R32C

Hi!

Again stuck on SPI topic. I am trying to use Melexis 90316 SPI rotational sensor with R32C/111. I hate this extra transistor in Melexis datasheet to make 4 wire SPI to 3 SPI hack. I am trying to make

R32C work with 3 wire. Despite all attempt I still have failed. I have tried stuff like transmitting something in master mode, then switching to slave and trying to read result etc. With scope I see transmission,

I see data is responded but on R32C cannot read it out. Can someone please post related code or explain what is right way to implement it?

  Tonu

Parents
  • Which UART are you connected to.  On UART2 the TXD is open drain so you can connect RXD and TXD together and use an external pull-up.  To transmit you would send data per the specification.  To receive you would transmit "FF" since this would not drive the pins.  The slave will then control the line and you will read the slave data.

Reply
  • Which UART are you connected to.  On UART2 the TXD is open drain so you can connect RXD and TXD together and use an external pull-up.  To transmit you would send data per the specification.  To receive you would transmit "FF" since this would not drive the pins.  The slave will then control the line and you will read the slave data.

Children
No Data