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

  • \$\begingroup\$ The link to the specification you mention seems to be broken. I'm getting a Security Error. Would you please take a look at that? Thanks! \$\endgroup\$ – Ricardo May 20 '14 at 16:24
  • \$\begingroup\$ Odd, I've reuploaded it here Hopefully that works. \$\endgroup\$ – 0x1111 May 20 '14 at 18:33
  • \$\begingroup\$ Do you have any code we can see? Are you trying to generate a clock frquency of 32khz or have to set the avr cpu clock frequency to 32khz? \$\endgroup\$ – crowie Dec 4 '16 at 7:54

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.