Electronic – MIPI RFFE software implementation

antennaavrcprotocolRF

I'm currently trying to implement the MIPI RFFE (As master) protocol on a simple AVR microcontroller, the specs says that the clock frequency can go down to 32 kHz, so I guess this it should be possible to implement it this way. However it does not seem to work, in the figure below, a picture of the waveform is shown which seems to be matching the specification. Does anyone have any experience implementing RFFE on an MCU or some reference code?

enter image description here

Best Answer

I can see two problems:

  1. Your Clock signal seems to have some noise in the first couple of cycles.
  2. The clock polarity is OK but the clock phase is wrong. The RFEE clock transition from high to low should be in the middle of the data bit just like SPI MODE 1. This is what shifts the bits in the receiver. but because the transition is occurring while the data bit is changing, the received bit will be unpredictable.

If you are using the hardware SPI try changing the mode to 1.

If you are bitbanging the data follow this steps to build the bitbanging routine:

  • Set the clock high
  • Set the data line
  • Wait half Tbit
  • Set the clock low
  • Wait half Tbit
  • Loop